Queries a DHCP options set.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code for different SDKs.

Request parameter

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The region ID of the DHCP options set that you want to query.

You can call the DescribeRegions operation to query the most recent region list.

DhcpOptionsSetId String Yes dopt-o6w0df4epg9zo8isy****

The ID of the DHCP options set.

Action String Yes GetDhcpOptionsSet

The operation that you want to perform. Set the value to GetDhcpOptionsSet.

Response parameters

Parameter Type Example Description
DhcpOptionsSetDescription String test

The description of the DHCP options set.

Status String Available

The status of the DHCP options set. Valid values:

  • Available
  • InUse
  • Deleted
  • Pending
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

DhcpOptionsSetId String dopt-o6w0df4epg9zo8isy****

The ID of the DHCP options set.

DhcpOptionsSetName String test

The name of the DHCP options set.

OwnerId Long 283117732402483989

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.XX.XX.123

The IP address of the DNS server.

DomainName String example.com

The suffix of the hostname.

LeaseTime String 3650d

The lease time of the IPv4 addresses for the DHCP options set.

  • If you use hours as the unit, valid values are 24h to 1176h and 87600h to 175200h. Default value: 87600h.
  • If you use days as the unit, valid values are 1d to 49d and 3650d to 7300d. Default value: 3650d.
Ipv6LeaseTime String 3650d

The lease time of the IPv6 addresses for the DHCP options set.

  • If you use hours as the unit, valid values are 24h to 1176h and 87600h to 175200h. Default value: 87600h.
  • If you use days as the unit, valid values are 1d to 49d and 3650d to 7300d. Default value: 3650d.
AssociateVpcs Array of AssociateVpc

The information about the virtual private cloud (VPC) that is associated with the DHCP options set.

AssociateStatus String InUse

The status of the VPC that is associated with the DHCP options set. Valid values:

  • InUse
  • Pending
VpcId String vpc-eb3b54r6otues4tjj****

The ID of the VPC that is associated with 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 information about the tags.

Key String FinanceDept

The tag key.

Value String FinanceJoshua

The tag value.

Examples

Sample requests

http(s)://[Endpoint]/?RegionId=cn-hangzhou
&DhcpOptionsSetId=dopt-o6w0df4epg9zo8isy****
&Action=GetDhcpOptionsSet
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetDhcpOptionsSetResponse>
    <DhcpOptionsSetDescription>test</DhcpOptionsSetDescription>
    <Status>Available</Status>
    <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
    <DhcpOptionsSetId>dopt-o6w0df4epg9zo8isy****</DhcpOptionsSetId>
    <DhcpOptionsSetName>test</DhcpOptionsSetName>
    <OwnerId>283117732402484000</OwnerId>
    <DhcpOptions>
        <DomainNameServers>192.XX.XX.123</DomainNameServers>
        <DomainName>example.com</DomainName>
        <LeaseTime>3650d</LeaseTime>
        <Ipv6LeaseTime>3650d</Ipv6LeaseTime>
    </DhcpOptions>
    <AssociateVpcs>
        <AssociateStatus>InUse</AssociateStatus>
        <VpcId>vpc-eb3b54r6otues4tjj****</VpcId>
    </AssociateVpcs>
    <ResourceGroupId>rg-acfmxazb4ph****</ResourceGroupId>
    <Tags>
        <Key>FinanceDept</Key>
        <Value>FinanceJoshua</Value>
    </Tags>
</GetDhcpOptionsSetResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DhcpOptionsSetDescription" : "test",
  "Status" : "Available",
  "RequestId" : "0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
  "DhcpOptionsSetId" : "dopt-o6w0df4epg9zo8isy****",
  "DhcpOptionsSetName" : "test",
  "OwnerId" : 283117732402484000,
  "DhcpOptions" : {
    "DomainNameServers" : "192.XX.XX.123",
    "DomainName" : "example.com",
    "LeaseTime" : "3650d",
    "Ipv6LeaseTime" : "3650d"
  },
  "AssociateVpcs" : [ {
    "AssociateStatus" : "InUse",
    "VpcId" : "vpc-eb3b54r6otues4tjj****"
  } ],
  "ResourceGroupId" : "rg-acfmxazb4ph****",
  "Tags" : [ {
    "Key" : "FinanceDept",
    "Value" : "FinanceJoshua"
  } ]
}

Error codes

HttpCode Error code Error message Description
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, visit the Error Center.