Associating a VPC with a Private Zone
Function
This API is used to associate a VPC with a private zone.
Calling Method
For details, see Calling APIs.
URI
POST /v2/zones/{zone_id}/associaterouter
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
zone_id |
Yes |
String |
ID of the zone associated with the VPC |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
router |
Yes |
Router object |
VPC associated with the endpoint rule |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
router_id |
String |
VPC ID |
router_region |
String |
Region of the VPC |
status |
String |
Resource status |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code Minimum: 8 Maximum: 36 |
message |
String |
Description Minimum: 2 Maximum: 512 |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code Minimum: 8 Maximum: 36 |
message |
String |
Description Minimum: 2 Maximum: 512 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code Minimum: 8 Maximum: 36 |
message |
String |
Description Minimum: 2 Maximum: 512 |
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
Response to the request for associating a VPC with a private zone
{ "status" : "PENDING_CREATE", "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b", "router_region" : "xx" }
Status Codes
Status Code |
Description |
---|---|
202 |
Response to the request for associating a VPC with a private zone |
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.