# Method: services.projects.global.networks.dnsZones.list

- [HTTP request](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.request_body)
- [Response body](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.ListDnsZonesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#body.aspect)
- [DnsZonePair](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#DnsZonePair)
  - [JSON representation](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#DnsZonePair.SCHEMA_REPRESENTATION)
- [Try it!](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#try-it)

\* Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project.

### HTTP request

`GET https://servicenetworking.googleapis.com/v1/{parent=services/*/projects/*/global/networks/*}/dnsZones:list`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Parent resource identifying the connection that owns this collection of DNS zones in the format services/{service}/projects/{project}/global/networks/{network} Service: The service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. Projects: the consumer project containing the consumer network. Network: The consumer network accessible from the tenant project. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `servicenetworking.services.listDnsZones` |

### Request body

The request body must be empty.

### Response body

Represents all DNS zones in the shared producer host project and the matching peering zones in the consumer project.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "dnsZonePairs": [ { object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#DnsZonePair`) } ] } ``` |

| Fields ||
|---|---|
| `dnsZonePairs[]` | ``object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list#DnsZonePair`)`` All pairs of private DNS zones in the shared producer host project and the matching peering zones in the consumer project.. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/service.management`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## DnsZonePair

- Represents a pair of private and peering DNS zone resources. \*

| JSON representation |
|---|
| ``` { "producerPrivateZone": { object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones#DnsZone`) }, "consumerPeeringZone": { object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones#DnsZone`) } } ``` |

| Fields ||
|---|---|
| `producerPrivateZone` | ``object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones#DnsZone`)`` The private DNS zone in the shared producer host project. |
| `consumerPeeringZone` | ``object (`https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones#DnsZone`)`` The DNS peering zone in the consumer project. |