调用UpdateDhcpOptionsSetAttribute接口修改DHCP选项集配置信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:UpdateDhcpOptionsSetAttribute |
update |
*DhcpOptionsSet
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要修改的 DHCP 选项集所在的地域。您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| DhcpOptionsSetId |
string |
是 |
要修改的 DHCP 选项集的 ID。 |
dopt-o6w0df4epg9zo8isy**** |
| DomainNameServers |
string |
否 |
DNS 服务器 IP。最多传入 4 个 DNS 服务器 IP,DNS 服务器 IP 之间用半角逗号(,)隔开。 说明
未传入任何 DNS 服务器 IP 时,ECS 实例默认使用阿里云提供的 DNS 服务器 IP(100.100.2.136 和 100.100.2.138)。 |
192.XX.XX.123 |
| DomainName |
string |
否 |
主机名后缀,例如 example.com。 DHCP 选项集关联 VPC 后,会自动将主机名后缀同步给 VPC 中 ECS 实例。 |
example.com |
| DhcpOptionsSetName |
string |
否 |
DHCP 选项集的名称。 长度为 2~128 个字符,必须以字母或中文开头,可包含数字、下划线(_)和短划线(-)。 |
name |
| DhcpOptionsSetDescription |
string |
否 |
输入 DHCP 选项集的描述。 描述可以为空或填写长度为 2~256 个字符,必须以字母或中文开头,但不能以 |
description |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| DryRun |
boolean |
否 |
是否只预检此次请求,取值: true:发送检查请求,不会修改 DHCP 选项集的配置信息。检查项包括是否填写了必需参数、请求格式和限制。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码 false(默认值):发送正常请求,通过检查后返回 HTTP 2xx 状态码并直接修改 DHCP 选项集配置信息。 |
false |
| LeaseTime |
string |
否 |
IPv4 DHCP 选项集的租赁时间。
说明
输入参数取值时,必须输入参数的单位。 |
3650d |
| Ipv6LeaseTime |
string |
否 |
IPv6 DHCP 选项集的租赁时间。
说明
输入参数取值时,必须输入参数的单位。 |
3650d |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
请求 ID。 |
||
| RequestId |
string |
请求 ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
示例
正常返回示例
JSON格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidDhcpOptionsSetId.NotFound | The specified dhcpOptionsSetId does not exist. | DHCP选项集实例不存在,请检查该参数是否正确。 |
| 400 | IncorrectStatus.DhcpOptionsSet | The DhcpOptionsSet status does not support this operation. | DHCP选项集实例处于中间状态不允许操作,请等待实例状态达到稳态后在操作。 |
| 400 | IllegalParam.DomainNameServers | The specified DomainNameServers is invalid. | 指定的DomainNameServers参数不合法,请检查该参数是否正确。 |
| 400 | IllegalParam.DomainName | The specified DomainName is invalid. | 指定的DomainName不合法 |
| 400 | IllegalParam.DhcpOptionsSetName | The specified DhcpOptionsSetName is invalid. | 指定的DhcpOptionsSetName参数不合法,请检查该参数是否正确。 |
| 400 | IllegalParam.DhcpOptionsSetDescription | The specified DhcpOptionsSetDescription is invalid. | 指定的DhcpOptionsSetDescription参数不合法,请检查该参数是否正确。 |
| 400 | OperationUnsupported.DhcpLeaseTime | The DhcpOptionsSet of this region does not support custom LeaseTime. | 该地域的DhcpOptionsSet未支持自定义LeaseTime |
| 400 | OperationUnsupported.DhcpOptionsSet | The DHCP options set feature in this region is not supported. | 当前区域暂时不支持DHCP选项集功能。 |
| 400 | OperationDenied.ModifyDefaultDhcpOptionsSet | The default DHCP options set is not allowed to be modified. | 默认DHCP选项集不允许修改。 |
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | 指定的地域不存在。请检查该参数是否正确。 |
| 400 | IllegalParam.LeaseTime | LeaseTime [%s] is illegal. | 指定的LeaseTime参数不合法 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。