Help Center/ Domain Name Service/ API Reference/ APIs/ Private Zone Management/ Disassociating a VPC from a Private Zone
Updated on 2024-03-25 GMT+08:00

Disassociating a VPC from a Private Zone

Function

This API is used to disassociate a VPC with a private zone.

Calling Method

For details, see Calling APIs.

URI

POST /v2/zones/{zone_id}/disassociaterouter

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

zone_id

Yes

String

ID of the zone to be disassociated

Request Parameters

Table 2 Request header 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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

router

Yes

Router object

VPC to be disassociated

Table 4 Router

Parameter

Mandatory

Type

Description

router_id

Yes

String

ID of the VPC associated with the zone

router_region

No

String

Region of the VPC

status

No

String

Resource status

Response Parameters

Status code: 202

Table 5 Response body parameters

Parameter

Type

Description

router_id

String

VPC ID

router_region

String

Region of the VPC

status

String

Resource status

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Example Requests

Disassociating a VPC from a private zone

POST https://{endpoint}/v2/zones/{zone_id}/disassociaterouter

{
  "router" : {
    "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b",
    "router_region" : "xx"
  }
}

Example Responses

Status code: 202

Response

{
  "status" : "PENDING_DELETE",
  "router_id" : "f0791650-db8c-4a20-8a44-a06c6e24b15b",
  "router_region" : "xx"
}

Status Codes

Status Code

Description

202

Response

400

Error response

404

Error response

500

Error response

Error Codes

See Error Codes.