Associating a VPC with a Private Zone
Function
This API is used to associate a new VPC with a private zone after the private zone is created.
Calling Method
For details, see Calling APIs.
URI
POST /v2/zones/{zone_id}/associaterouter
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
zone_id |
Yes |
String |
Definition Zone ID Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
router |
Yes |
Router object |
Definition Router (VPC) associated Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
router_id |
String |
Definition ID of the associated VPC Range N/A |
router_region |
String |
Definition Region where the associated VPC is located Range N/A |
status |
String |
Definition The status of the associated VPC. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Example Requests
Associating a VPC with a private zone
POST https://{endpoint}/v2/zones/{zone_id}/associaterouter { "router" : { "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b", "router_region" : "xx" } }
Example Responses
Status code: 202
Request accepted
{ "status" : "PENDING_CREATE", "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b", "router_region" : "xx" }
Status Codes
Status Code |
Description |
---|---|
202 |
Request accepted |
400 |
Error response |
404 |
Error response |
500 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.