Bandwidth package

CSN

  • API Reference
    • API function release records
    • Appendix
    • Bandwidth Package Related
      • Bandwidth package price inquiry
      • Bandwidth upgrade-downgrade for the bandwidth package
      • Bind a bandwidth package to a Cloud Smart Network
      • Create bandwidth package
      • Delete bandwidth package
      • Query bandwidth package list
      • Query the specified bandwidth package details
      • Unbind a bandwidth package from a Cloud Smart Network
      • Update bandwidth package
    • Cloud Smart Network Related
      • Create a Cloud Smart Network
      • Delete a Cloud Smart Network
      • Network instances loaded by the Cloud Smart Network
      • Network instances unloaded by the Cloud Smart Network
      • Query Cloud Smart Network details
      • Query Cloud Smart Network instance list
      • Query the list of Cloud Smart Network
      • Update a Cloud Smart Network
    • Common Headers and Error Responses
    • General Description
    • Ingress Management Related Interfaces
      • Add a routing entry
      • Create affiliation
      • Create learning relationship
      • Delete a learning relationship
      • Delete a routing entry
      • Delete an association relationship
      • Query association relationships
      • Query learning relationships
      • Query route table list
      • Query routing entries
    • Interface Overview
    • Region Bandwidth Related Interfaces
      • Create cross-region bandwidth
      • Delete cross-region bandwidth
      • Query cross-region bandwidth
      • Query the cross-region bandwidth of the specified Cloud Smart Network
      • Update cross-region bandwidth
    • Service domain
    • TGW Related Interfaces
      • Query routing entries of a TGW
      • Query TGW list
      • Update TGW information
  • FAQs
    • Consultation
  • Function Release Records
  • Operation guide
    • Cross-Account Authorization Management
      • Cancel Authorized Network Instance
      • Create Authorized Network Instance
      • Delete Authorized Network Instance
      • View Authorized Network Instance
    • Cross-Region Bandwidth Package Management
    • CSN Instance
      • Create CSN Instance
      • Delete CSN Instance
      • Modify CSN Instance
    • Identity and access management
    • Monitor and Operations
      • CSN Instance Diagnosis
    • Network instance
      • Add Cross-Account Network Instance
      • Add Local Account Network Instance
      • Adjust Network Instance Bandwidth
      • Uninstall Network Instance
    • Region Bandwidth Management
      • Adjust Region Bandwidth
      • Create cross-region bandwidth
      • Delete cross-region bandwidth
    • Route management
      • Association Relationship
        • Create affiliation
        • Delete affiliation
      • Custom route tables
        • Create custom route table
        • Delete custom route table
        • View Custom Route Table
      • Learning Relationship
        • Add Custom Route Entry
        • Create learning relationship
        • Delete Custom Route Entry
        • Delete learning relationship
        • Publish and Revoke Network Instance Route
        • View Route Entry
    • Tag Management
  • Product Description
    • Application scenarios
    • Introduction
    • Usage restrictions
  • Product pricing
  • SDK
    • GO-SDK
      • Bandwidth package
      • CSN Instance
      • Exception handling
      • Initialization
      • Install
      • Overview
      • Region Bandwidth
      • Route management
      • TGW
    • Java-SDK
      • CSN
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python-SDK
      • Bandwidth package
      • CSN Instance
      • Initialization
      • Region Bandwidth
      • Route management
      • TGW
  • Service Level Agreement (SLA)
    • Cloud Smart Network Service Level Agreement SLA
  • Typical Practices
    • CSN supports VPC custom route tables for secure traffic access
    • Multi-IDC Disaster Recovery via Cloud Smart Network
    • Multi-IDC Interconnection via Cloud Smart Network
    • Private Network VPC Interconnection with Edge Network
All documents
menu
No results found, please re-enter

CSN

  • API Reference
    • API function release records
    • Appendix
    • Bandwidth Package Related
      • Bandwidth package price inquiry
      • Bandwidth upgrade-downgrade for the bandwidth package
      • Bind a bandwidth package to a Cloud Smart Network
      • Create bandwidth package
      • Delete bandwidth package
      • Query bandwidth package list
      • Query the specified bandwidth package details
      • Unbind a bandwidth package from a Cloud Smart Network
      • Update bandwidth package
    • Cloud Smart Network Related
      • Create a Cloud Smart Network
      • Delete a Cloud Smart Network
      • Network instances loaded by the Cloud Smart Network
      • Network instances unloaded by the Cloud Smart Network
      • Query Cloud Smart Network details
      • Query Cloud Smart Network instance list
      • Query the list of Cloud Smart Network
      • Update a Cloud Smart Network
    • Common Headers and Error Responses
    • General Description
    • Ingress Management Related Interfaces
      • Add a routing entry
      • Create affiliation
      • Create learning relationship
      • Delete a learning relationship
      • Delete a routing entry
      • Delete an association relationship
      • Query association relationships
      • Query learning relationships
      • Query route table list
      • Query routing entries
    • Interface Overview
    • Region Bandwidth Related Interfaces
      • Create cross-region bandwidth
      • Delete cross-region bandwidth
      • Query cross-region bandwidth
      • Query the cross-region bandwidth of the specified Cloud Smart Network
      • Update cross-region bandwidth
    • Service domain
    • TGW Related Interfaces
      • Query routing entries of a TGW
      • Query TGW list
      • Update TGW information
  • FAQs
    • Consultation
  • Function Release Records
  • Operation guide
    • Cross-Account Authorization Management
      • Cancel Authorized Network Instance
      • Create Authorized Network Instance
      • Delete Authorized Network Instance
      • View Authorized Network Instance
    • Cross-Region Bandwidth Package Management
    • CSN Instance
      • Create CSN Instance
      • Delete CSN Instance
      • Modify CSN Instance
    • Identity and access management
    • Monitor and Operations
      • CSN Instance Diagnosis
    • Network instance
      • Add Cross-Account Network Instance
      • Add Local Account Network Instance
      • Adjust Network Instance Bandwidth
      • Uninstall Network Instance
    • Region Bandwidth Management
      • Adjust Region Bandwidth
      • Create cross-region bandwidth
      • Delete cross-region bandwidth
    • Route management
      • Association Relationship
        • Create affiliation
        • Delete affiliation
      • Custom route tables
        • Create custom route table
        • Delete custom route table
        • View Custom Route Table
      • Learning Relationship
        • Add Custom Route Entry
        • Create learning relationship
        • Delete Custom Route Entry
        • Delete learning relationship
        • Publish and Revoke Network Instance Route
        • View Route Entry
    • Tag Management
  • Product Description
    • Application scenarios
    • Introduction
    • Usage restrictions
  • Product pricing
  • SDK
    • GO-SDK
      • Bandwidth package
      • CSN Instance
      • Exception handling
      • Initialization
      • Install
      • Overview
      • Region Bandwidth
      • Route management
      • TGW
    • Java-SDK
      • CSN
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python-SDK
      • Bandwidth package
      • CSN Instance
      • Initialization
      • Region Bandwidth
      • Route management
      • TGW
  • Service Level Agreement (SLA)
    • Cloud Smart Network Service Level Agreement SLA
  • Typical Practices
    • CSN supports VPC custom route tables for secure traffic access
    • Multi-IDC Disaster Recovery via Cloud Smart Network
    • Multi-IDC Interconnection via Cloud Smart Network
    • Private Network VPC Interconnection with Edge Network
  • Document center
  • arrow
  • CSN
  • arrow
  • SDK
  • arrow
  • Python-SDK
  • arrow
  • Bandwidth package
Table of contents on this page
  • Create bandwidth package
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Update bandwidth package
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Delete bandwidth package
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Bind a bandwidth package to a Cloud Smart Network
  • Query the specified bandwidth package details
  • Query bandwidth package list
  • Bandwidth upgrade/downgrade for the bandwidth package
  • Unbind a bandwidth package from a Cloud Smart Network
  • Bandwidth package price inquiry

Bandwidth package

Updated at:2025-11-11

Create bandwidth package

Function declaration

Python
1def create_csn_bp(self, name, bandwidth, geographic_a, geographic_b, billing, interwork_type=None, tags=None, client_token=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/il138q5a0

Response value

Operation succeeded:

JSON
1{
2 "metadata": {...}, # Common Description Information
3    "csn_bp_id":"csnBp-avng9p6kp70x"
4}

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.py

Update bandwidth package

Function declaration

Python
1def update_csn_bp(self, csn_bp_id, name=None, client_token=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/5l139oayt

Response value

Operation succeeded:

JSON
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.py

Delete bandwidth package

Function declaration

Python
1def delete_csn_bp(self, csn_bp_id, client_token=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/9l139gf3s

Response value

Operation succeeded:

JSON
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.py

Bind a bandwidth package to a Cloud Smart Network

Function declaration

Python
1def bind_csn_bp(self, csn_bp_id, csn_id, client_token=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/tl13b14ho

Response value
Operation succeeded:

JSON
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_bind_csn_bp.py

Query the specified bandwidth package details

Function declaration

Python
1def get_csn_bp(self, csn_bp_id=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Ql13a4uin

Response value
Operation succeeded:

JSON
1{
2 "metadata": {...}, # Common Description Information
3    "csnBpId":"csnBp-gdrf6fukb36u",
4    "name":"csnBp",
5    "bandwidth":100,
6    "usedBandwidth":10,
7    "csnId":"",
8    "interworkType":"center",
9    "interworkRegion":"chinesemainland",
10    "status":"available",
11    "paymentTiming":"Prepaid",
12    "expireTime":"2018-08-13T08:10:59Z",
13    "createdTime":"2021-04-25 17:22:34",
14    "tags":[
15        {
16            "tagKey":"test",
17            "tagValue":"test"
18        },
19        {
20            "tagKey":"test",
21            "tagValue":""
22        }
23    ]
24}

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_get_csn_bp.py

Query bandwidth package list

Function declaration

Python
1def list_csn_bp(self, marker=None, max_keys=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/3l139tsq9

Response value
Operation succeeded:

JSON
1{
2 "metadata": {...}, # Common Description Information
3    "marker":"csnBp-gdrf6fukb36u",
4    "isTruncated":true,
5    "nextMarker":"csnBp-iuc756n5kkda",
6    "maxKeys":1,
7    "csnBps":[
8        {
9            "csnBpId":"csnBp-gdrf6fukb36u",
10            "name":"csnBp",
11            "bandwidth":100,
12            "usedBandwidth":10,
13            "csnId":"",
14            "interworkType":"center",
15            "interworkRegion":"chinesemainland",
16            "status":"available",
17            "paymentTiming":"Prepaid",
18            "expiredTime":"2018-08-13T08:10:59Z",
19            "createTime":"2021-04-25 17:22:34",
20            "tags":[
21                {
22                    "tagKey":"test",
23                    "tagValue":"test"
24                },
25                {
26                    "tagKey":"test",
27                    "tagValue":""
28                }
29            ]
30        }
31    ]
32}

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.py

Bandwidth upgrade/downgrade for the bandwidth package

Function declaration

Python
1def resize_csn_bp(self, csn_bp_id, bandwidth, client_token=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/0l13bs3zx

Response value
Operation succeeded:

JSON
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_resize_csn_bp.py

Unbind a bandwidth package from a Cloud Smart Network

Function declaration

Python
1def unbind_csn_bp(self, csn_bp_id, csn_id, client_token=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Xl13bcliw

Response value
Operation succeeded:

JSON
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_resize_csn_bp.py

Bandwidth package price inquiry

Function declaration

Python
1def get_csn_bp_price(self, name, geographic_a, geographic_b, billing, bandwidth=None)

Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/CSN/s/Ylsy10izt

Response value
Operation succeeded:

JSON
1{
2 "metadata": {...}, # Common Description Information
3    "price":"440.00000"
4}

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_resize_csn_bp.py

Previous
Java-SDK
Next
CSN Instance