Disassociates a DHCP options set from a virtual private cloud (VPC).
Operation description
- DetachDhcpOptionsSetFromVpc 接口属于异步接口,即系统返回一个请求 ID,但该 DHCP 选项集尚未解绑成功,系统后台的解绑任务仍在进行。您可以调用 DescribeVpcAttribute 查询 DHCP 选项集的解绑状态:
-
当 DHCP 选项集处于 Pending 状态时,表示 DHCP 选项集正在解绑中。
-
当 DHCP 选项集处于 UnUsed 状态时,表示 DHCP 选项集解绑成功。
-
-
DetachDhcpOptionsSetFromVpc 接口不支持在同一个 VPC 中并发解绑 DHCP 选项集。
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region of the DHCP options set. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| DhcpOptionsSetId |
string |
Yes |
The ID of the DHCP options set. |
dopt-o6w0df4epg9zo8isy**** |
| VpcId |
string |
Yes |
The ID of the VPC. |
vpc-dfdgrgthhy**** |
| ClientToken |
string |
No |
The client token used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request. |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
No |
Whether to perform only a dry run, without performing the actual request. Valid values: true: performs only a dry run. The system checks your AccessKey pair, the RAM user permissions, and the required parameters. If the request fails the dry run, an error message is returned. If the request passes the dry run, the false (default): performs a dry run and then the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Examples
Success response
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDhcpOptionsSetId.NotFound | The specified resource dhcpOptionsSetId is not found. | |
| 400 | OperationFailed.AttachmentNotExist | The current VPC is not attahced to a DHCP options set. | The VPC is not associated with a DHCP options set. |
| 400 | IncorrectStatus.VpcDhcpOptionsSet | The dhcpOptionsSet status of VPC does not support this operation. | The DHCP options set that is associated with the VPC is being configured. As a result, the DHCP options set does not support this operation. |
| 400 | AttrMismatching.VpcDhcpOptionsSetId | The dhcpOptionsSetId does not match the VPC. | The ID of the DHCP options set does not match the VPC. Check whether the specified DHCP options set is associated with the VPC. |
| 400 | TaskConflict | The operation is too frequent. Please wait a moment and try again. | The system is unavailable. Try again later. |
| 400 | InvalidVpcId.NotFound | Specified value of VpcId is not found in our record. | |
| 400 | IncorrectStatus.DhcpOptionsSet | The DhcpOptionsSet status does not support this operation. | The DHCP options set that is associated with the VPC is being configured. As a result, the DHCP options set does not support this operation. You can perform the operation after the status of the DHCP options set is stable. |
| 400 | OperationUnsupported.DhcpOptionsSet | The DHCP options set feature in this region is not supported. | The current region does not support the DHCP options sets feature. |
| 400 | MissingParam.VpcId | You must specify VpcId. | You must specify VpcId. |
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.