You can call this operation to disassociate a DHCP options set from a VPC network.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DetachDhcpOptionsSetFromVpc

The operation that you want to perform. Set the value to DetachDhcpOptionsSetFromVpc.

DhcpOptionsSetId String Yes dopt-o6w0df4epg9zo8isy****

The ID of the DHCP options set to be disassociated from the VPC network.

RegionId String Yes cn-hangzhou

The region where the DHCP options set is deployed. You can call the DescribeRegions operation to query region IDs.

VpcId String Yes vpc-dfdgrgthhy****

The ID of the VPC network to be disassociated from the DHCP options set.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that is used to ensure the idempotence of the request. You can use the client to generate a value that is unique among different requests. ClientToken supports only ASCII characters. It can contain up to 64 ASCII characters.

DryRun Boolean No false

Specifies whether to precheck this request only. Valid values:

true: Runs a precheck without disassociating the DHCP options set from the VPC network. The system checks whether your AccessKey pair is valid, whether RAM users are authorized, and whether required parameters are specified. An error message is returned if the request fails the precheck. If the request passes the precheck, the DryRunOperation error code is returned.

false (default value): Runs a precheck and returns a 2XX HTTP status code. After request passes the precheck, the DHCP options set is disassociated from the VPC network.

Response parameters

Parameter Type Example Description
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=DetachDhcpOptionsSetFromVpc
&<Common request parameters>

Sample success responses

XML format


JSON format

  "RequestId": "4DAD3F76-2DB8-4336-B847-D7C0446C7952"

Error codes

HTTP status code Error code Error message Description
400 InvalidVpcId.NotFound Specified value of VpcId is not found in our record. The error message returned because the specified VPC network does not exist. Check whether the specified VPC network ID is valid.

For a list of error codes, visit the API Error Center.