---
title: "List Private DNS"
method: GET
path: "/v2/cloud-gateways/networks/{networkId}/private-dns"
tags: ["Private DNS"]
---

# List Private DNS

`GET /v2/cloud-gateways/networks/{networkId}/private-dns`

Returns a paginated collection of private DNS attachments for a given network.

## Path parameters

- `networkId` string, uuid, required — The network ID to operate on. For serverless.v1 kind of cloud gateways, this field should be omitted.

## Query parameters

- `filter` PrivateDnsFilterParameters
  - `name` CloudGatewaysStringFieldFilterOverride — Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string — The field exactly matches the provided value.
    - `contains` string — The field contains the provided value.
    - `neq` string — The field does not match the provided value.
    - `oeq` string — The field matches any of the provided values.
    - `ocontains` string — The field contains any of the provided values.
  - `state` union
    - union — Filter Private DNS state by exact match.
      - 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated' — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
      - object
        - `eq` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
    - PrivateDnsStateFieldNotEqualsFilter — Filter private-dns state by inequality match.
      - `neq` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
    - PrivateDnsStateFieldOrEqualityFilter — Filter Private DNS state by determining if the value is equal to any in a set of values, where the set is a comma-delimited list.
      - `oeq` string, required
- `page[size]` integer
- `page[number]` integer

## Response `200`

A paginated list for a collection of Private DNS for a network.

- object
  - `meta` PaginatedMeta, required — returns the pagination information
    - `page` PageMeta, required — Contains pagination query parameters and the total number of objects returned.
      - `number` number, required
      - `size` number, required
      - `total` number, required
  - `data` PrivateDnsResponse[], required
    - union
      - AwsPrivateHostedZoneResponse
        - `id` string, uuid, required
        - `state` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
        - `state_metadata` object, required — Metadata describing the backing state of the Private Dns and why it may be in an erroneous state.
          - `reported_status` string — Reported status of the Private Dns from backing infrastructure.
          - `reason` string — Reason why the Private Dns may be in an erroneous state, reported from backing infrastructure.
        - `entity_version` integer, required — Monotonically-increasing version count of the Private DNS, to indicate the order of updates to the Private DNS.
        - `created_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS creation date.
        - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS update date.
        - `name` string, required — Human-readable name of the Private DNS.
        - `private_dns_attachment_config` AwsPrivateHostedZoneAttachmentConfig, required
          - `kind` 'aws-private-hosted-zone-attachment', required
          - `hosted_zone_id` string, required — AWS Hosted Zone to create attachment to.
      - AwsPrivateDnsResolverResponse
        - `id` string, uuid, required
        - `state` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
        - `state_metadata` object, required — Metadata describing the backing state of the Private Dns and why it may be in an erroneous state.
          - `reported_status` string — Reported status of the Private Dns from backing infrastructure.
          - `reason` string — Reason why the Private Dns may be in an erroneous state, reported from backing infrastructure.
        - `entity_version` integer, required — Monotonically-increasing version count of the Private DNS, to indicate the order of updates to the Private DNS.
        - `created_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS creation date.
        - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS update date.
        - `name` string, required — Human-readable name of the Private DNS.
        - `private_dns_attachment_config` AwsPrivateDnsResolverAttachmentConfig, required
          - `kind` 'aws-outbound-resolver', required
          - `dns_config` PrivateDnsResolverConfig, required — Object that contains mappings from proxied internal domains to remote DNS server IP address for a Private DNS Resolver.
      - GcpPrivateHostedZoneResponse
        - `id` string, uuid, required
        - `state` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
        - `state_metadata` object, required — Metadata describing the backing state of the Private Dns and why it may be in an erroneous state.
          - `reported_status` string — Reported status of the Private Dns from backing infrastructure.
          - `reason` string — Reason why the Private Dns may be in an erroneous state, reported from backing infrastructure.
        - `entity_version` integer, required — Monotonically-increasing version count of the Private DNS, to indicate the order of updates to the Private DNS.
        - `created_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS creation date.
        - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS update date.
        - `name` string, required — Human-readable name of the Private DNS.
        - `private_dns_attachment_config` GcpPrivateHostedZoneAttachmentConfig, required
          - `kind` 'gcp-private-hosted-zone-attachment', required
          - `domain_name` string, required — Domain name to create attachment to.
          - `peer_project_id` string, required — Customer's GCP Project ID.
          - `peer_vpc_name` string, required — Customer's GCP VPC ID.
      - AzurePrivateHostedZoneResponse
        - `id` string, uuid, required
        - `state` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
        - `state_metadata` object, required — Metadata describing the backing state of the Private Dns and why it may be in an erroneous state.
          - `reported_status` string — Reported status of the Private Dns from backing infrastructure.
          - `reason` string — Reason why the Private Dns may be in an erroneous state, reported from backing infrastructure.
        - `entity_version` integer, required — Monotonically-increasing version count of the Private DNS, to indicate the order of updates to the Private DNS.
        - `created_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS creation date.
        - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS update date.
        - `name` string, required — Human-readable name of the Private DNS.
        - `private_dns_attachment_config` AzurePrivateHostedZoneAttachmentConfig, required
          - `kind` 'azure-private-hosted-zone-attachment', required
          - `domain_name` string, required — Customer's Azure Private DNS Zone Name.
          - `peer_tenant_id` string, required — Customer's Azure Tenant ID.
          - `peer_subscription_id` string, required — Customer's Azure Subscription ID.
          - `peer_resource_group_id` string, required — Customer's Azure Resource Group ID.
          - `peer_vnet_link_name` string, required — Customer's Azure VNet Link Name.
      - AzurePrivateDnsResolverResponse
        - `id` string, uuid, required
        - `state` 'created' | 'initializing' | 'pending-association' | 'ready' | 'error' | 'terminating' | 'terminated', required — The current state of the Private DNS attachment. Possible values: - `created` - The attachment has been created but is not attached to Private DNS. - `initializing` - The attachment is in the process of being initialized and is setting up necessary resources. - `pending-association` The attachment request is awaiting association to the cloud provider infrastructure in order for provisioning to proceed. - `ready` - The attachment is fully operational and can route traffic as configured. - `error` - The attachment is in an error state, and is not operational. - `terminating` - The attachment is in the process of being deleted. - `terminated` - The attachment has been fully deleted and is no longer available.
        - `state_metadata` object, required — Metadata describing the backing state of the Private Dns and why it may be in an erroneous state.
          - `reported_status` string — Reported status of the Private Dns from backing infrastructure.
          - `reason` string — Reason why the Private Dns may be in an erroneous state, reported from backing infrastructure.
        - `entity_version` integer, required — Monotonically-increasing version count of the Private DNS, to indicate the order of updates to the Private DNS.
        - `created_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS creation date.
        - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of Private DNS update date.
        - `name` string, required — Human-readable name of the Private DNS.
        - `private_dns_attachment_config` AzurePrivateDnsResolverAttachmentConfig, required
          - `kind` 'azure-outbound-resolver', required
          - `dns_config` PrivateDnsResolverConfig, required — Object that contains mappings from proxied internal domains to remote DNS server IP address for a Private DNS Resolver.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/kong/apis/konnect-api-go-sdk.md) · [All operations](https://skmtc.net/kong/apis/konnect-api-go-sdk/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api-go-sdk/versions/0261aef4b1e2/schema)
