Load Balance Dedicated Cluster (LBDC)
Create LBDC
Create an LBDC instance.
You can create LBDC instance with the following code
Function declaration
1def create_lbdc(self, name, type, ccu_count, billing, desc=None, renew=None, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: CreateLBDC: Create LBDC
Response Value
Operation succeeded:
1{
2 "id": "bgw_group-a3t786p1",
3 "type": "4Layer",
4 "desc":""
5}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_create_lbdc.py
Upgrade LBDC
Upgrade an LBDC instance.
You can upgrade an LBDC instance with the following code
Function declaration
1def upgrade_lbdc(self, lbdc_id, ccu_count, action=b'resize', client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: UpgradeLBDC: Upgrade LBDC
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_upgrade_lbdc.py
Renew LBDC
Renew an LBDC instance.
You can renew an LBDC instance with the following code
Function declaration
1def renew_lbdc(self, lbdc_id, billing, action=b'purchaseReserved', client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: RenewLBDC: Renew LBDC
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_renew_lbdc.py
Retrieve LBDC list
Retrieve the LBDC list.
You can retrieve LBDC list with the following code
Function declaration
1def list_lbdc(self, lbdc_id=None, name=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: ListLBDC: Retrieve LBDC List
Response Value
Operation succeeded:
1{
2 "clusterList": [{
3 "id": "bgw_group-a3t786p1",
4 "name": "abc",
5 "type": "4Layer",
6 "status": "available",
7 "ccuCount": 1,
8 "createTime": "2021-08-25T06:13:09Z",
9 "expireTime": "2021-09-25T06:13:09Z",
10 "desc": ""
11 }
12 ],
13 "marker": "bgw_group-a3t786p1",
14 "nextMarker": null,
15 "isTruncated": false,
16 "maxKeys": 1000
17}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_list_lbdc.py
Retrieve LBDC details
Retrieve detailed information about the LBDC.
You can retrieve LBDC details with the following code
Function declaration
1def get_lbdc(self, lbdc_id, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: DescribeLBDC: Retrieve LBDC Details
Response Value
Operation succeeded:
1{
2 "id": "bgw_group-a3t786p1",
3 "name": "abc",
4 "type": "4Layer",
5 "status": "available",
6 "ccuCount": 1,
7 "createTime": "2021-08-25T06:13:09Z",
8 "expireTime": "2021-09-25T06:13:09Z",
9 "desc": "",
10 "totalConnectCount":100,
11 "newConnectCps":100,
12 "networkInBps":100,
13 "networkOutBps":100
14}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_get_lbdc.py
Update LBDC
Update the LBDC instance.
You can update LBDC with the following code
Function declaration
1def update_lbdc(self, lbdc_id, name=None, desc=None, client_token=None, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: UpdateLBDC: Update LBDC
Response Value
Operation succeeded:
Respond with 200
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_update_lbdc.py
Retrieve list of BLBs associated with LBDC
Retrieve the list of BLBs associated with the LBDC.
You can retrieve list of BLBs associated with LBDC with the following code
Function declaration
1def list_lbdc_blb(self, lbdc_id, config=None)
Parameter Meaning
Refer to the OpenAPI documentation: GetBlbListOfLBDC: Retrieve List of BLBs Associated with LBDC
Response Value
Operation succeeded:
1{
2 "blbList": [
3 {
4 "blbId": "lb-1c791997",
5 "name": "abc",
6 "status": "available",
7 "blbType": "normal",
8 "publicIp": "10.10.10.10",
9 "eipRouteType": "bgp",
10 "bandwidth": 20,
11 "address": "192.168.0.7",
12 "ipv6": "2400:da00:e003:1820::4",
13 "vpcId": "vpc-0n1hhh8759b0",
14 "subnetId": "sbn-p09p0ihp7498"
15 }
16 ]
17}
Operation failed:
Throw an exception. For the exception list, refer to: Exception List
Code example
For specific code examples, refer to: example_list_lbdc_blb.py
