Modifies the configuration of a DHCP options set by calling the UpdateDhcpOptionsSetAttribute operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:UpdateDhcpOptionsSetAttribute |
update |
*DhcpOptionsSet
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the DHCP options set to modify. 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 to modify. |
dopt-o6w0df4epg9zo8isy**** |
| DomainNameServers |
string |
No |
The IP addresses of DNS servers. You can specify up to four DNS server IP addresses, separated by commas (,). Note
If you do not specify any DNS server IP addresses, ECS instances use the DNS server IP addresses provided by Alibaba Cloud (100.100.2.136 and 100.100.2.138) by default. |
192.XX.XX.123 |
| DomainName |
string |
No |
The hostname suffix, such as example.com. After you attach the DHCP options set to an associate VPC, the hostname suffix is automatically synchronized to ECS instances in the VPC. |
example.com |
| DhcpOptionsSetName |
string |
No |
The name of the DHCP options set. The name must be 2 to 128 characters in length and must start with a letter or Chinese character. It can contain digits, underscores (_), and hyphens (-). |
name |
| DhcpOptionsSetDescription |
string |
No |
The description of the DHCP options set. The description can be empty or 2 to 256 characters in length. It must start with a letter or Chinese character and cannot start with |
description |
| ClientToken |
string |
No |
The client token that is 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 token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request. |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values: true: performs a dry run without modifying the DHCP options set configuration. The system checks the required parameters, request format, and limits. 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 sends the request. If the request passes the dry run, an HTTP 2xx status code is returned and the DHCP options set configuration is modified. |
false |
| LeaseTime |
string |
No |
The lease time of the IPv4 DHCP options set.
Note
You must include the unit when specifying the value. |
3650d |
| Ipv6LeaseTime |
string |
No |
The lease time of the IPv6 DHCP options set.
Note
You must include the unit when specifying the value. |
3650d |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The request ID. |
||
| 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 dhcpOptionsSetId does not exist. | The DHCP options set does not exist. Check whether the parameter is set to a valid value. |
| 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 | IllegalParam.DomainNameServers | The specified DomainNameServers is invalid. | DomainNameServers is set to an invalid value. |
| 400 | IllegalParam.DomainName | The specified DomainName is invalid. | The error message returned because DomainName is set to an invalid value. |
| 400 | IllegalParam.DhcpOptionsSetName | The specified DhcpOptionsSetName is invalid. | DhcpOptionsSetName is set to an invalid value. |
| 400 | IllegalParam.DhcpOptionsSetDescription | The specified DhcpOptionsSetDescription is invalid. | DhcpOptionsSetDescription is set to an invalid value. |
| 400 | OperationUnsupported.DhcpLeaseTime | The DhcpOptionsSet of this region does not support custom LeaseTime. | DHCP options sets in the region do not support a custom lease time. |
| 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 | OperationDenied.ModifyDefaultDhcpOptionsSet | The default DHCP options set is not allowed to be modified. | The default DHCP options set is not allowed to be modified. |
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region does not exist. |
| 400 | IllegalParam.LeaseTime | LeaseTime [%s] is illegal. | The specified LeaseTime parameter is illegal |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.