CSN Instance

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
  • GO-SDK
  • arrow
  • CSN Instance
Table of contents on this page
  • Create a Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Update a Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Delete a Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Query the list of Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Query Cloud Smart Network details
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Network instances loaded by the Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Network instances unloaded by the Cloud Smart Network
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example
  • Query Cloud Smart Network instance list
  • Function declaration
  • Parameter meaning
  • Response value
  • Code example

CSN Instance

Updated at:2025-11-11

Create a Cloud Smart Network

Function declaration

Go
1func (c *Client) CreateCsn(body *CreateCsnRequest, clientToken string)

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{
2    "csnId":"csn-2rvpjzcaupnv1xqg"
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.go

Update a Cloud Smart Network

Function declaration

Go
1func (c *Client) UpdateCsn(csnId string, body *UpdateCsnRequest, clientToken string) error

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{}

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

Delete a Cloud Smart Network

Function declaration

Go
1func (c *Client) DeleteCsn(csnId string, clientToken string) error

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{}

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

Query the list of Cloud Smart Network

Function declaration

Go
1func (c *Client) ListCsn(listCsnArgs *ListCsnArgs) (*ListCsnResponse, error)

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{
2    "csns":[
3        {
4            "csnId":"csn-2rvpjzcaupnv1xqg",
5            "name":"csn_test",
6            "description":"csn_test description",
7            "status":"active",
8            "instanceNum":2,
9            "csnBpNum":1,
10            "tags":[
11                {
12                    "tagKey":"tagKey1",
13                    "tagValue":"tagValue1"
14                }
15            ]
16        },
17        {
18            "csnId":"csn-8145pkf62ym8z0yp",
19            "name":"csn_test02",
20            "description":"csn_test02 description",
21            "status":"active",
22            "instanceNum":2,
23            "csnBpNum":1
24            "tags":[
25                {
26                    "tagKey":"tagKey2",
27                    "tagValue":"tagValue2"
28                }
29            ]
30        }
31    ],
32    "isTruncated":false,
33    "maxKeys":1000
34}

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

Query Cloud Smart Network details

Function declaration

Go
1func (c *Client) GetCsn(csnId string) (*GetCsnResponse, error)

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{
2    "name":"csn_test",
3    "description":"csn_test description",
4    "csnId":"csn-2rvpjzcaupnv1xqg",
5    "status":"active",
6    "instanceNum":2,
7    "csnBpNum":1,
8    "tags":[
9        {
10            "tagKey":"tagKey1",
11            "tagValue":"tagValue1"
12        }
13    ]
14}

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

Network instances loaded by the Cloud Smart Network

Function declaration

Go
1func (c *Client) AttachInstance(csnId string, body *AttachInstanceRequest, clientToken string) error

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{}

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_attach_instance.go

Network instances unloaded by the Cloud Smart Network

Function declaration

Go
1func (c *Client) DetachInstance(csnId string, body *DetachInstanceRequest, clientToken string) error

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{}

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_detach_instance.go

Query Cloud Smart Network instance list

Function declaration

Go
1func (c *Client) ListInstance(csnId string, listInstanceArgs *ListInstanceArgs) (*ListInstanceResponse, error)

Parameter meaning

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

Response value

Operation succeeded:

JSON
1{
2    "instances":[
3        {
4            "attachId":"tgwAttach-v6bnvdat8w64bmkr",
5            "instanceType":"vpc",
6            "instanceId":"vpc-q378nqku1k0w",
7            "instanceName":"vpc_bj_01",
8            "instanceRegion":"bj",
9            "instanceAccountId":"90a4f129eb0e47f0a110ea27b44b6032",
10            "status":"attached"
11        },
12        {
13            "attachId":"tgwAttach-fk1pn20ztz0xvfeh",
14            "instanceType":"vpc",
15            "instanceId":"vpc-bku6a0335rgk",
16            "instanceName":"vpc_bd_01",
17            "instanceRegion":"bd",
18            "instanceAccountId":"90a4f129eb0e47f0a110ea27b44b6032",
19            "status":"attached"
20        }
21    ],
22    "isTruncated":false,
23    "maxKeys":1000
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_list_instance.go

Previous
Bandwidth package
Next
Exception handling