Queries Dynamic Host Configuration Protocol (DHCP) options sets.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the DHCP options sets that you want to query. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results.
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| 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 VPC, the root domain is automatically synchronized with the ECS instances in the VPC. Valid values:
|
example.com |
| DhcpOptionsSetName |
string |
No |
The name of the DHCP options set. The name must be 1 to 128 characters in length and can contain digits, underscores (_), and hyphens (-). It must start with a letter. Valid values:
Valid values:
|
test |
| DhcpOptionsSetId |
array |
No |
The ID of the DHCP options set. You can specify at most 20 IDs. |
dopt-o6w0df4epg9zo8isy**** |
|
string |
No |
The ID of the DHCP options set. You can specify at most 20 IDs. |
dopt-o6w0df4epg9zo8isy**** |
|
| ResourceGroupId |
string |
No |
The ID of the resource group to which the DHCP options set belongs. |
rg-acfmxazb4ph**** |
| Tags |
array<object> |
No |
The tags. |
|
|
object |
No |
The tags. |
||
| Key |
string |
No |
The tag key. You can specify up to 20 tag keys. It cannot be an empty string. The tag key can be up to 64 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value. You can specify up to 20 tag values. It can be an empty string. The tag value can be up to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The pagination token for the next request. Valid values:
|
||
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results.
|
FFmyTO70tTpLG6I3FmYAXGKPd******** |
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
| DhcpOptionsSets |
array<object> |
The DHCP options sets. |
|
|
array<object> |
The DHCP options sets. |
||
| DhcpOptionsSetDescription |
string |
The description of the DHCP options set. |
test |
| Status |
string |
The status of the DHCP options set. Valid values:
|
Available |
| DhcpOptionsSetId |
string |
The ID of the DHCP options set. |
dopt-o6w0df4epg9zo8isy**** |
| DhcpOptionsSetName |
string |
The name of the DHCP options set. |
test |
| AssociateVpcCount |
integer |
The number of VPCs with which the DHCP options set is associated. |
2 |
| OwnerId |
integer |
The ID of the Alibaba Cloud account to which the DHCP options set belongs. |
253460731706911258 |
| DhcpOptions |
object |
The DHCP options. |
|
| DomainNameServers |
string |
The IP address of the DNS server. |
192.168.XX.XX |
| DomainName |
string |
The suffix of the hostname. |
example.com |
| LeaseTime |
string |
The lease time of the IPv4 addresses for the DHCP options set.
|
3650d |
| Ipv6LeaseTime |
string |
The lease time of the IPv6 DHCP options set.
|
3650d |
| ResourceGroupId |
string |
The ID of the resource group to which the DHCP options set belongs. |
rg-acfmxazb4ph**** |
| Tags |
array<object> |
The tags. |
|
|
object |
The tags. |
||
| Key |
string |
The key of tag N added to the resource. |
FinanceDept |
| Value |
string |
The value of tag N added to the resource. |
FinanceJoshua |
| CreationTime |
string |
The time when the DHCP options set was created. |
2025-08-21 *** |
| TotalCount |
string |
The total number of entries returned. |
10 |
Examples
Success response
JSON format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd********",
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"DhcpOptionsSets": [
{
"DhcpOptionsSetDescription": "test",
"Status": "Available",
"DhcpOptionsSetId": "dopt-o6w0df4epg9zo8isy****",
"DhcpOptionsSetName": "test",
"AssociateVpcCount": 2,
"OwnerId": 253460731706911260,
"DhcpOptions": {
"DomainNameServers": "192.168.XX.XX",
"DomainName": "example.com",
"LeaseTime": "3650d",
"Ipv6LeaseTime": "3650d"
},
"ResourceGroupId": "rg-acfmxazb4ph****",
"Tags": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
],
"CreationTime": "2025-08-21 ***"
}
],
"TotalCount": "10"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.NextToken | The specified NextToken is invalid. | The specified NextToken is invalid. |
| 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.