Queries Dynamic Host Configuration Protocol (DHCP) options sets.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
RegionId | String | Yes | cn-hangzhou | 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. |
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
|
MaxResults | Integer | No | 10 | The number of entries per page. Valid values: 1 to 100. Default value: 10. |
DomainName | String | No | example.com | The root domain, such as 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 Elastic Compute Service (ECS) instances in the VPC. |
DhcpOptionsSetName | String | No | test | 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. |
DhcpOptionsSetId.N | String | No | dopt-o6w0df4epg9zo8isy**** | The ID of the DHCP options set. You can specify at most 20 IDs. |
Action | String | Yes | ListDhcpOptionsSets | The operation that you want to perform. Set the value to ListDhcpOptionsSets. |
ResourceGroupId | String | No | rg-acfmxazb4ph**** | The ID of the Alibaba Cloud account to which the DHCP options set belongs. |
Tags.N.Key | String | No | FinanceDept | The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string. The tag key can be at most 128 characters in length. It cannot start with |
Tags.N.Value | String | No | FinanceJoshua | The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
Response parameters
Parameter | Type | Example | Description |
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd******** | A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:
|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 | The request ID. |
DhcpOptionsSets | Array of DhcpOptionsSet | The list of the DHCP options sets. |
|
DhcpOptionsSetDescription | String | test | The description of the DHCP options set. |
Status | String | Available | The status of the DHCP options set. Valid values:
|
DhcpOptionsSetId | String | dopt-o6w0df4epg9zo8isy**** | The ID of the DHCP options set. |
DhcpOptionsSetName | String | test | The name of the DHCP options set. |
AssociateVpcCount | Integer | 2 | The number of VPCs with which the DHCP options set is associated. |
OwnerId | Long | 253460731706911258 | The ID of the Alibaba Cloud account to which the DHCP options set belongs. |
DhcpOptions | Object | The configuration information about the DHCP options set. |
|
DomainNameServers | String | 192.168.XX.XX | The DNS server IP address. |
DomainName | String | example.com | The suffix of the hostname. |
LeaseTime | String | 3650d | The lease time of the IPv4 addresses for the DHCP options set.
|
Ipv6LeaseTime | String | 3650d | The lease time of the IPv6 addresses for the DHCP options set.
|
ResourceGroupId | String | rg-acfmxazb4ph**** | The ID of the Alibaba Cloud account to which the DHCP options set belongs. |
Tags | Array of Tag | The list of tags. |
|
Key | String | FinanceDept | The key of tag N. |
Value | String | FinanceJoshua | The value of tag N. |
TotalCount | String | 10 | The number of entries returned. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=cn-hangzhou
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=10
&DomainName=example.com
&DhcpOptionsSetName=test
&DhcpOptionsSetId=["dopt-o6w0df4epg9zo8isy****"]
&Action=ListDhcpOptionsSets
&ResourceGroupId=rg-acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListDhcpOptionsSetsResponse>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd********</NextToken>
<RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
<DhcpOptionsSets>
<DhcpOptionsSetDescription>test</DhcpOptionsSetDescription>
<Status>Available</Status>
<DhcpOptionsSetId>dopt-o6w0df4epg9zo8isy****</DhcpOptionsSetId>
<DhcpOptionsSetName>test</DhcpOptionsSetName>
<AssociateVpcCount>2</AssociateVpcCount>
<OwnerId>253460731706911260</OwnerId>
<DhcpOptions>
<DomainNameServers>192.168.XX.XX</DomainNameServers>
<DomainName>example.com</DomainName>
<LeaseTime>3650d</LeaseTime>
<Ipv6LeaseTime>3650d</Ipv6LeaseTime>
</DhcpOptions>
<ResourceGroupId>rg-acfmxazb4ph****</ResourceGroupId>
<Tags>
<Key>FinanceDept</Key>
<Value>FinanceJoshua</Value>
</Tags>
</DhcpOptionsSets>
<TotalCount>10</TotalCount>
</ListDhcpOptionsSetsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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"
} ]
} ],
"TotalCount" : "10"
}
Error codes
HttpCode | Error code | Error message | Description |
400 | IllegalParam.NextToken | The specified NextToken is invalid. | The error message returned because the value of NextToken is invalid. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The error message returned because the specified region does not exist. Check whether the region ID is valid. |
For a list of error codes, see Service error codes.