Deletes a Dynamic Host Configuration Protocol (DHCP) options set.
Usage notes
- The DeleteDhcpOptionsSet operation is asynchronous. After you send the request, the system returns a request
ID. However, the operation is still being performed in the system background. You
can call the GetDhcpOptionsSet operation to query the status of a DHCP options set:
- If the DHCP options set is in the Deleting state, the DHCP options set is being deleted.
- If you cannot query the DHCP options set, the DHCP options set is deleted.
- You cannot repeatedly call the DeleteDhcpOptionsSet operation to delete a DHCP options set within the specified period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteDhcpOptionsSet |
The operation that you want to perform. Set the value to DeleteDhcpOptionsSet. |
RegionId | String | Yes | cn-hangzhou |
The region of the DHCP options set to be deleted. You can call the DescribeRegions operation to query the most recent region list. |
DhcpOptionsSetId | String | Yes | dopt-o6w0df4epg9zo8isy**** |
The ID of the DHCP options set to be deleted. |
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 the value, but you must make sure that it is unique among different requests. The client token can contain only ASCII characters. Note If you do not set this parameter, the system uses RequestId as ClientToken. RequestId may be different for each API request.
|
DryRun | Boolean | No | false |
Specifies whether to check the request without performing the operation. Valid values: true: checks the request without performing the operation. The system checks the required
parameters, request format, and limits. If the request fails the check, an error message
is returned. If the request passes the check, the false (default): sends the request. After the request passes the check, the operation is performed. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeleteDhcpOptionsSet
&DhcpOptionsSetId=dopt-o6w0df4epg9zo8isy****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteDhcpOptionsSetResponse>
<RequestId>8B2F5262-6B57-43F2-97C4-971425462DFE</RequestId>
<DeleteDhcpOptionsSetResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "8B2F5262-6B57-43F2-97C4-971425462DFE"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectStatus.DhcpOptionsSet | The DhcpOptionsSet status does not support this operation. | The error message returned because the DHCP options set is in an unstable state. Perform the operation after the DHCP options set enters a stable state. |
400 | OperationUnsupported.DhcpOptionsSet | The DHCP options set feature in this region is not supported. | The error message returned because the current region does not support the DHCP options sets feature. |
400 | DependencyViolation.VpcAttachment | DhcpOptionsSet cannot be deleted when it is attached to VPC. | The error message returned because the DHCP options set is associated with a virtual private cloud (VPC) and the DHCP options set cannot be deleted. |
400 | InvalidDhcpOptionsSetId.NotFound | The specified dhcpOptionsSetId does not exist. | The error message returned because the DHCP options set does not exist. Check whether the parameter is set to a valid value. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The error message returned because the specified region does not exist. Check whether the region ID is valid. |
For a list of error codes, visit the API Error Center.