Region Bandwidth
Create cross-region bandwidth
Function declaration
1def create_csn_bp_limit(self, csn_bp_id, local_region, peer_region, bandwidth, client_token=None)
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Rl13cp20d
Response value
Operation succeeded:
1{
2 "metadata": {...} # Public description information
3}
Operation failed:
Return error. For the error code list, please refer to: https://cloud.baidu.com/doc/CSN/s/Tl56j65ym
Code example
For specific code examples, please refer to: example_create_csn_bp_limit.py
Update cross-region bandwidth
Function declaration
1def update_csn_bp_limit(self, csn_bp_id, local_region, peer_region, bandwidth, client_token=None)
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/7l13fm2xv
Response value
Operation succeeded:
1{
2 "metadata": {...} # Public description information
3}
Operation failed: Return error. For the error code list, please refer to: https://cloud.baidu.com/doc/CSN/s/Tl56j65ym
Code example For specific code examples, please refer to: example_update_csn_bp_limit.py
Delete cross-region bandwidth
Function declaration
1def delete_csn_bp_limit(self, csn_bp_id, local_region, peer_region, client_token=None)
Parameter meaning Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/al56e5kd3
Return value Operation succeeded:
1{
2 "metadata": {...} # Public description information
3}
Operation failed:
Return error. For the error code list, please refer to: https://cloud.baidu.com/doc/CSN/s/Tl56j65ym
Code example
For specific code examples, please refer to: example_delete_csn_bp_limit.py
Query cross-region bandwidth
Function declaration
1def list_csn_bp_limit(self, csn_bp_id=None)
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Xl13forme
Response value
Operation succeeded:
1{
2 "metadata": {...}, # Common Description Information
3 "bpLimits":[
4 {
5 "csnBpId":"csnBp-nkyiykbbu9js",
6 "localRegion":"cn-hangzhou-cm",
7 "peerRegion":"bj",
8 "bandwidth":4,
9 "csnId":"csn-uftcf4rvrbjii95r"
10 }
11 ]
12}
Operation failed:
Return error. For the error code list, please refer to: https://cloud.baidu.com/doc/CSN/s/Tl56j65ym
Code example
For specific code examples, please refer to: example_list_csn_bp_limit.py
Query the cross-region bandwidth of the specified Cloud Smart Network
Function declaration
1def list_csn_bp_limit_by_csn_id(self, csn_id=None)
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Zl56pu84u
Response value
Operation succeeded:
1{
2 "metadata": {...}, # Common Description Information
3 "bpLimits":[
4 {
5 "csnBpId":"csnBp-nkyiykbbu9js",
6 "localRegion":"cn-hangzhou-cm",
7 "peerRegion":"bj",
8 "bandwidth":4,
9 "csnId":"csn-uftcf4rvrbjii95r"
10 }
11 ]
12}
Operation failed:
Return error. For the error code list, please refer to: https://cloud.baidu.com/doc/CSN/s/Tl56j65ym
Code example
For specific code examples, please refer to: example_list_csn_bp_limit_by_csn_id.py
