Queries a created DHCP options set by calling the GetDhcpOptionsSet operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:GetDhcpOptionsSet |
get |
*DhcpOptionsSet
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the DHCP options set that you want to query. You can call the DescribeRegions operation to query the region ID. Valid values:
|
cn-hangzhou |
| DhcpOptionsSetId |
string |
Yes |
The ID of the DHCP options set that you want to query. |
dopt-o6w0df4epg9zo8isy**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The description of the DHCP options set. |
||
| AssociateVpcs |
array<object> |
The information about the VPCs associated with the DHCP options set. |
|
|
object |
The information about the VPCs associated with the DHCP options set. |
||
| AssociateStatus |
string |
The status of the VPC associated with the DHCP options set. Valid values:
|
InUse |
| VpcId |
string |
The ID of the VPC associated with the DHCP options set. |
vpc-eb3b54r6otues4tjj**** |
| CreationTime |
string |
The creation time. |
2025-08-21 *** |
| DhcpOptions |
object |
The DHCP options configuration information. |
|
| DomainName |
string |
The hostname suffix. |
example.com |
| DomainNameServers |
string |
The IP address of the DNS server. |
192.XX.XX.123 |
| Ipv6LeaseTime |
string |
The lease time of the IPv6 DHCP options set.
|
3650d |
| LeaseTime |
string |
The lease time of the IPv4 DHCP options set.
|
3650d |
| DhcpOptionsSetDescription |
string |
The description of the DHCP options set. |
test |
| DhcpOptionsSetId |
string |
The ID of the DHCP options set. |
dopt-o6w0df4epg9zo8isy**** |
| DhcpOptionsSetName |
string |
The name of the DHCP options set. |
test |
| OwnerId |
integer |
The Alibaba Cloud account ID to which the DHCP options set belongs. |
283117732402483989 |
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
| ResourceGroupId |
string |
The ID of the resource group to which the DHCP options set belongs. |
rg-acfmxazb4ph**** |
| Status |
string |
The status of the DHCP options set. Valid values:
|
Available |
| Tags |
array<object> |
The tag information. |
|
|
object |
The tag information. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
Examples
Success response
JSON format
{
"AssociateVpcs": [
{
"AssociateStatus": "InUse",
"VpcId": "vpc-eb3b54r6otues4tjj****"
}
],
"CreationTime": "2025-08-21 ***",
"DhcpOptions": {
"DomainName": "example.com",
"DomainNameServers": "192.XX.XX.123",
"Ipv6LeaseTime": "3650d",
"LeaseTime": "3650d"
},
"DhcpOptionsSetDescription": "test",
"DhcpOptionsSetId": "dopt-o6w0df4epg9zo8isy****",
"DhcpOptionsSetName": "test",
"OwnerId": 283117732402484000,
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"ResourceGroupId": "rg-acfmxazb4ph****",
"Status": "Available",
"Tags": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The specified region does not exist. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.