Modifies the configuration of a DHCP options set.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region where the DHCP options set is deployed. 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**** |
DomainNameServers | string | No | The IP address of the DNS server. You can enter at most four DNS server IP addresses. Separate IP addresses with commas (,). Note
If you do not specify a DNS server IP address, Elastic Compute Service (ECS) instances use the IP addresses of the Alibaba Cloud DNS servers, which are 100.100.2.136 and 100.100.2.138.
| 192.XX.XX.123 |
DomainName | string | No | The root domain. For example, you can set the value to example.com. After a DHCP options set is associated with a virtual private cloud (VPC), the root domain in the DHCP options set is automatically synchronized with the 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 can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. | name |
DhcpOptionsSetDescription | string | No | Enter a description for the DHCP options set. The description must be 2 to 256 characters in length. It must start with a letter 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 set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different.
| 0c593ea1-3bea-11e9-b96b-88e9fe637760 |
DryRun | boolean | No | Specifies whether to perform a dry run. Valid values: true: performs a dry run. 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, a 2xx HTTP status code is returned and the operation is performed. | false |
LeaseTime | string | No | The lease time of the IPv4 addresses for the DHCP options set.
Note
If you specify a value, you must also specify the unit.
| 3650d |
Ipv6LeaseTime | string | No | The lease time of the IPv6 addresses for the DHCP options set.
Note
If you specify a value, you must also specify the unit.
| 3650d |
Response parameters
Examples
Sample success responses
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. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-22 | The Error code has changed | View Change Details |
2023-07-05 | The Error code has changed | View Change Details |
2021-11-16 | The Error code has changed. The request parameters of the API has changed | View Change Details |