Network instances loaded by the Cloud Smart Network
Updated at:2025-11-11
Description
Add a network instance to the Cloud Smart Network.
Request structure
Plain Text
1PUT /v{version}/csn/{csnId}?{action}&clientToken={clientToken} HTTP/1.1
2Host: csn.baidubce.com
3Authorization: authorization string
4{
5 "instanceId":"instanceId",
6 "instanceType": "instanceType",
7 "instanceRegion":"instanceRegion",
8 "instanceAccountId":"instanceAccountId"
9}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| clientToken | String | No | Query | Idempotence token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken Idempotence Support](CSN/API Reference/General Description.md#Idempotence) |
| csnId | String | Yes | URL parameter | Cloud Smart Network ID |
| action | String | Yes | Query | Action to perform, which takes the value “attach” in this API |
| instanceType | String | Yes | RequestBody | Type of the loaded instance. Value range: [vpc | channel | bec_vpc], representing VPC, dedicated channel, and edge network respectively |
| instanceId | String | Yes | RequestBody | ID of the instance to be loaded |
| instanceRegion | String | Yes | RequestBody | Region to which the loaded instance belongs |
| instanceAccountId | String | No | RequestBody | In the scenario of cross-account loading of network instances, the ID of the account to which the network instance belongs |
Response headers
No additional headers beyond standard ones.
Response parameters
No special response parameters are available.
Request example
Plain Text
1PUT /v1/csn/csn-gwy8bfya05sbgffv?attach&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2HOST: csn.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2022-03-15T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4{
5 "instanceType":"vpc",
6 "instanceId":"vpc-cxvqgxipk36r",
7 "instanceRegion":"bj",
8 "instanceAccountId":"1beb4ad4762746db96941a5ad253ac8c"
9}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 15 Mar 15 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
