> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zec/vpc-network/dhcp-options-set/describedhcpoptionssets.md).

# DescribeDhcpOptionsSets

## 1. API Description

This API (DescribeDhcpOptionsSets) is used to query the list of DHCP option sets that have been created.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name     | Required | Type                                                    | Description                                                                                                                                              |
| ------------------ | -------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dhcpOptionsSetIds  | No       | Array of String                                         | <p>ID of the DHCP options set.</p><p>Up to 20 DHCP options set IDs can be specified.</p>                                                                 |
| dhcpOptionsSetName | No       | String                                                  | <p>Name of the DHCP options set.</p><p>This field supports fuzzy search.</p>                                                                             |
| subnetId           | No       | String                                                  | <p>ID of the associated subnet.</p><p>It can be obtained by calling <a href="/api-reference/zec/vpc-network/describesubnets.md">DescribeSubnets</a>.</p> |
| pageSize           | No       | Integer                                                 | <p>The returned page size.</p><p>Default value: 20; Maximum value: 1000.</p><p>Available range: \[1, 1000].</p><p>Value range: \[1, 1000]</p>            |
| pageNum            | No       | Integer                                                 | <p>Number of pages returned.</p><p>Default value: 1.</p><p>Available range: \[1, +).</p><p>Value range: \[1, +)</p><p>Default value: 1</p>               |
| resourceGroupId    | No       | String                                                  | Filter by resource group ID.                                                                                                                             |
| tagKeys            | No       | Array of String                                         | <p>Search by tag key.</p><p>You can query up to 20 tag keys in each request.</p>                                                                         |
| tags               | No       | Array of [Tag](/api-reference/zec/datastructure.md#tag) | <p>Search by tag.</p><p>You can query up to 20 tags in each request.</p>                                                                                 |

## 3. Output Parameters

| Parameter Name | Type                                                                          | Description                                                                                                           |
| -------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                        | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                       | Number of disks meeting the filtering conditions.                                                                     |
| dataSet        | Array of [DhcpOptionsSet](/api-reference/zec/datastructure.md#dhcpoptionsset) | Data of the DHCP options set list.                                                                                    |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the list of created DHCP options sets.**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeDhcpOptionsSets
<Common Request Params>

Request：
{
  "dhcpOptionsSetName": "dhcpOptionsSetName1",
  "pageSize": 10,
  "pageNum": 1
}

Response：
{
  "dataSet": [
    {
      "createTime": "2025-12-31T06:35:42Z",
      "description": "",
      "dhcpOptionsSetId": "dhcpOptionsSetId1",
      "dhcpOptionsSetName": "dhcpOptionsSetName1",
      "domainNameServers": "88.88.88.88",
      "ipv6DomainNameServers": "2001:2:0:e344:0:2::3",
      "ipv6LeaseTime": "48",
      "leaseTime": "48",
      "resourceGroupId": "resourceGroupId",
      "resourceGroupName": "resourceGroupName"
    }
  ],
  "requestId": "T82F6B775-F09D-4C13-803B-3033DA839659",
  "totalCount": 1
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
