- [HTTP request](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit#try-it)

Commits the dry-run specification for all the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` in an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies#AccessPolicy`. A commit operation on a service perimeter involves copying its `spec` field to the `status` field of the service perimeter. Only `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` with `useExplicitDryRunSpec` field set to true are affected by a commit operation. The long-running operation from this RPC has a successful status after the dry-run specifications for all the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` have been committed. If a commit fails, it causes the long-running operation to return an error response and the entire commit operation is cancelled. When successful, the `Operation.response` field contains `CommitServicePerimetersResponse`. The `dry_run` and the `spec` fields are cleared after a successful commit operation.

### HTTP request

`POST https://accesscontextmanager.googleapis.com/v1/{parent=accessPolicies/*}/servicePerimeters:commit`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Resource name for the parent `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies#AccessPolicy` which owns all `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` in scope for the commit operation. Format: `accessPolicies/{policyId}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "etag": string } ``` |

| Fields ||
|---|---|
| `etag` | `string` Optional. The etag for the version of the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies#AccessPolicy` that this commit operation is to be performed on. If, at the time of commit, the etag for the Access Policy stored in Access Context Manager is different from the specified etag, then the commit operation will not be performed and the call will fail. This field is not required. If etag is not provided, the operation will be performed as if a valid etag is provided. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `accesscontextmanager.servicePerimeters.commit`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).