# Service Networking API

Provides automatic management of network configurations necessary for certain services.

- [REST Resource: v1.operations](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.operations)
- [REST Resource: v1.services](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services)
- [REST Resource: v1.services.connections](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.connections)
- [REST Resource: v1.services.dnsRecordSets](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.dnsRecordSets)
- [REST Resource: v1.services.dnsZones](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.dnsZones)
- [REST Resource: v1.services.projects.global.networks](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.projects.global.networks)
- [REST Resource: v1.services.projects.global.networks.dnsZones](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.projects.global.networks.dnsZones)
- [REST Resource: v1.services.projects.global.networks.peeredDnsDomains](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.projects.global.networks.peeredDnsDomains)
- [REST Resource: v1.services.roles](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest#v1.services.roles)

## Service: servicenetworking.googleapis.com

To call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

### Discovery document

A [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:

- <https://servicenetworking.googleapis.com/$discovery/rest?version=v1>

### Service endpoint

A [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

- `https://servicenetworking.googleapis.com`

## REST Resource: [v1.operations](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations/cancel` | `POST /v1/{name=operations/**}:cancel` Starts asynchronous cancellation on a long-running operation. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations/delete` | `DELETE /v1/{name=operations/**}` Deletes a long-running operation. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations/get` | `GET /v1/{name=operations/*}` Gets the latest state of a long-running operation. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/operations/list` | `GET /v1/{name=operations}` Lists operations that match the specified filter in the request. |

## REST Resource: [v1.services](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services/addSubnetwork` | `POST /v1/{parent=services/*/*/*}:addSubnetwork` For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services/disableVpcServiceControls` | `PATCH /v1/{parent=services/*}:disableVpcServiceControls` Disables VPC service controls for a connection. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services/enableVpcServiceControls` | `PATCH /v1/{parent=services/*}:enableVpcServiceControls` Enables VPC service controls for a connection. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services/searchRange` | `POST /v1/{parent=services/*}:searchRange` Service producers can use this method to find a currently unused range within consumer allocated ranges. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services/validate` | `POST /v1/{parent=services/*}:validate` Service producers use this method to validate if the consumer provided network, project and requested range are valid. |

## REST Resource: [v1.services.connections](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections/create` | `POST /v1/{parent=services/*}/connections` Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections/deleteConnection` | `POST /v1/{name=services/*/connections/*}` Deletes a private service access connection. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections/list` | `GET /v1/{parent=services/*}/connections` List the private connections that are configured in a service consumer's VPC network. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections/patch` | `PATCH /v1/{name=services/*/connections/*}` Updates the allocated ranges that are assigned to a connection. |

## REST Resource: [v1.services.dnsRecordSets](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets/add` | `POST /v1/{parent=services/*}/dnsRecordSets:add` Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets/get` | `GET /v1/{parent=services/*}/dnsRecordSets:get` Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets/list` | `GET /v1/{parent=services/*}/dnsRecordSets:list` Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets/remove` | `POST /v1/{parent=services/*}/dnsRecordSets:remove` Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsRecordSets/update` | `POST /v1/{parent=services/*}/dnsRecordSets:update` Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project. |

## REST Resource: [v1.services.dnsZones](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/add` | `POST /v1/{parent=services/*}/dnsZones:add` Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.dnsZones/remove` | `POST /v1/{parent=services/*}/dnsZones:remove` Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project. |

## REST Resource: [v1.services.projects.global.networks](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks/get` | `GET /v1/{name=services/*/projects/*/global/networks/*}` Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks/getVpcServiceControls` | `GET /v1/{name=services/*/projects/*/global/networks/*}/vpcServiceControls` Consumers use this method to find out the state of VPC Service Controls. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks/updateConsumerConfig` | `PATCH /v1/{parent=services/*/projects/*/global/networks/*}:updateConsumerConfig` Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP. |

## REST Resource: [v1.services.projects.global.networks.dnsZones](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/get` | `GET /v1/{name=services/*/projects/*/global/networks/*/dnsZones/*}` Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.dnsZones/list` | `GET /v1/{parent=services/*/projects/*/global/networks/*}/dnsZones:list` \* 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. |

## REST Resource: [v1.services.projects.global.networks.peeredDnsDomains](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains/create` | `POST /v1/{parent=services/*/projects/*/global/networks/*}/peeredDnsDomains` Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains/delete` | `DELETE /v1/{name=services/*/projects/*/global/networks/*/peeredDnsDomains/*}` Deletes a peered DNS domain. |
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.projects.global.networks.peeredDnsDomains/list` | `GET /v1/{parent=services/*/projects/*/global/networks/*}/peeredDnsDomains` Lists peered DNS domains for a connection. |

## REST Resource: [v1.services.roles](https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.roles)

| Methods ||
|---|---|
| `https://docs.cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.roles/add` | `POST /v1/{parent=services/*}/roles:add` Service producers can use this method to add roles in the shared VPC host project. |