IPv6 BLB Instance
Create BLB instance
Set up a LoadBalancer and receive the associated service address and instance ID. The billing type is Postpay. Certification is required. Users who have not completed certification can go to the "Security Certification" section of the Baidu AI Cloud Official Website Console to complete the process.
You can create BLB instance with the following code:
Function declaration
1@required(vpc_id=(bytes, str),
2 subnet_id=(bytes, str))
3def create_ipv6_loadbalancer(self, vpc_id, subnet_id, name=None,
4 desc=None, client_token=None, config=None):
Parameter Meaning
Refer to the OpenAPI documentation: Create BLB Instance
Response Value
Operation succeeded:
1{
2 blb_id:'lb-56443af4',
3 name:'BLB-beijing-4f624697',
4 desc:'',
5 address:'2400:da00:e003:0:2cc:300:0:3'
6}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_create_ipv6_loadbalancer.py
Query BLB instance list
Retrieve information on all LoadBalancers under a user account. Supports queries by LoadBalancer ID, name, or address, with matching rules allowing partial matches (excluding regular expressions). Perform queries by bccId, currently supporting only single and exact bccId queries. Results contain the load balancer instance linked to the specified real server. The output reflects the intersection of multiple query conditions. If the BLB instance has public network access enabled, the response will include the public IP. Results support marker-based pagination with a default page size of 1000, which can be modified using the maxKeys parameter.
You can query the BLB list with the following code:
Function declaration
1def describe_ipv6_loadbalancers(self, address=None, name=None, blb_id=None,
2 bcc_id=None, marker=None, max_keys=None,
3 config=None):
Parameter Meaning
Refer to the OpenAPI documentation: Query Existing BLB Instances
Response Value
Operation succeeded:
1{
2 blb_list:[{
3 tags:None,
4 blb_id:'lb-a93a0d3d',
5 status:'available',
6 name:'BLB-beijing-4f7ecf2b',
7 desc:'',
8 address:'2400:da00:e003:0:2cc:300:0:2',
9 vpc_id:'vpc-5wseb8brnpxt',
10 subnet_id:'sbn-b2iqt2g6f00u',
11 allow_delete:True,
12 payment_timing:'Postpaid'},
13 ],
14 marker:'blb-05FA1C7F',
15 next_marker:None,
16 is_truncated:False,
17 max_keys:1000
18}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_describe_ipv6_loadbalancers.py
