You can call this operation to query 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 of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetDhcpOptionsSet

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

DhcpOptionsSetId String Yes dopt-o6w0df4epg9zo8isy****

The ID of the DHCP options set to be queried.

RegionId String Yes cn-hangzhou

The region where the DHCP options set to be queried is deployed. You can call the DescribeRegions operation to query region IDs.

Response parameters

Parameter Type Example Description
AssociateVpcs Array

The information of the VPC network that is associated with the DHCP options set.

AssociateStatus String InUse

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

  • InUse: The VPC network is in use.
  • Pending: The VPC network is being configured.
VpcId String vpc-eb3b54r6otues4tjj****

The ID of the VPC network that is associated with the DHCP options set.

DhcpOptions Struct

The configuration information of the DHCP options set.

DomainName String example.com

The root domain.

DomainNameServers String 192.xx.xx.123

The DNS server IP addresses.

DhcpOptionsSetDescription String test

The description of the DHCP options set.

DhcpOptionsSetId String dopt-o6w0df4epg9zo8isy****

The ID of the DHCP options set.

DhcpOptionsSetName String test

The name of the DHCP options set.

OwnerId Long 12345678

The ID of the account to which the DHCP options set belongs.

RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

Status String Available

The status of the DHCP options set. Valid values:

  • Available: The DHCP options set is available for use.
  • InUse: The DHCP options set is in use.
  • Deleted: The DHCP options set is deleted.
  • Pending: The DHCP options set is being configured.

Examples

Sample requests

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

Sample success responses

XML format

<GetDhcpOptionsSetResponse>   
      <Status>InUse</Status>
      <DhcpOptionsSetId>dopt-eb3h8s3g21rujtc7z****</DhcpOptionsSetId>
      <DhcpOptions>
            <DomainNameServers>100.100.2.136,100.100.2.138</DomainNameServers>
      </DhcpOptions>
      <RequestId>80B26920-51E9-429D-9FC1-D1CF14967B9A</RequestId>
      <OwnerId>12345678</OwnerId>
      <DhcpOptionsSetName>jj</DhcpOptionsSetName>
      <AssociateVpcs>
            <VpcId>vpc-eb3b54r6otues4tjj****</VpcId>
            <AssociateStatus>InUse</AssociateStatus>
      </AssociateVpcs>
</GetDhcpOptionsSetResponse>

JSON format

{
    "Status": "InUse",
    "DhcpOptionsSetId": "dopt-eb3h8s3g21rujtc7z****",
    "DhcpOptions": {
        "DomainNameServers": "100.100.2.136,100.100.2.138"
    },
    "RequestId": "80B26920-51E9-429D-9FC1-D1CF14967B9A",
    "OwnerId": "12345678",
    "DhcpOptionsSetName": "jj",
    "AssociateVpcs": [
        {
            "VpcId": "vpc-eb3b54r6otues4tjj****",
            "AssociateStatus": "InUse"
        }
    ]
}

Error codes

HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist. The error message returned because the specified region ID does not exist. Check whether the region ID is valid.

For a list of error codes, visit the API Error Center.