All Products
Search
Document Center

Virtual Private Cloud:GetDhcpOptionsSet

Last Updated:Mar 04, 2024

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:GetDhcpOptionsSetRead
  • DhcpOptionsSet
    acs:vpc:{#regionId}:{#accountId}:dhcpoptionsset/{#DhcpOptionsSetId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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.

Enumeration Value:
  • ap-southeast-1: ap-southeast-1.
cn-hangzhou
DhcpOptionsSetIdstringYes

The ID of the DHCP options set.

dopt-o6w0df4epg9zo8isy****

Response parameters

ParameterTypeDescriptionExample
object
DhcpOptionsSetDescriptionstring

The description of the DHCP options set.

test
Statusstring

The status of the DHCP options set. Valid values:

  • Available: available
  • InUse: in use
  • Deleted: deleted
  • Pending: being configured
Available
RequestIdstring

The ID of the request.

0ED8D006-F706-4D23-88ED-E11ED28DCAC0
DhcpOptionsSetIdstring

The ID of the DHCP options set.

dopt-o6w0df4epg9zo8isy****
DhcpOptionsSetNamestring

The name of the DHCP options set.

test
OwnerIdlong

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

283117732402483989
DhcpOptionsobject

The configuration information about the DHCP options set.

DomainNameServersstring

The IP address of the DNS server.

192.XX.XX.123
DomainNamestring

The suffix of the hostname.

example.com
LeaseTimestring

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.
3650d
Ipv6LeaseTimestring

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.
3650d
AssociateVpcsobject []

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

AssociateStatusstring

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

  • InUse: in use
  • Pending: being configured
InUse
VpcIdstring

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

vpc-eb3b54r6otues4tjj****
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxazb4ph****
Tagsobject []

The tag list.

Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "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

HTTP status codeError codeError messageDescription
404InvalidRegionId.NotFoundThe specified RegionId does not exist.The specified region does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-23The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2021-11-17The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.