Associating a VPC with an Endpoint Rule
Function
This API is used to associate a VPC with an endpoint rule.
URI
POST /v2.1/resolverrules/{resolverrule_id}/associaterouter
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| resolverrule_id | Yes | String | ID of an endpoint rule |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | 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. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| router | Yes | RouterForRule object | VPC |
Response Parameters
Status code: 202
| Parameter | Type | Description |
|---|---|---|
| router_id | String | ID of the associated VPC |
| router_region | String | Region where the associated VPC is located |
| status | String | Resource status |
Example Requests
Associating a VPC with an endpoint rule
POST https://{endpoint}/v2.1/resolverrules/{resolverrule_id}/associaterouter
{
"router" : {
"router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b"
}
} 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 |
Error Codes
For details, see Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot