- [Resource: ServicePerimeter](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter.SCHEMA_REPRESENTATION)
- [PerimeterType](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PerimeterType)
- [ServicePerimeterConfig](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig.SCHEMA_REPRESENTATION)
- [VpcAccessibleServices](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#VpcAccessibleServices)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#VpcAccessibleServices.SCHEMA_REPRESENTATION)
- [ServicePattern](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePattern)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePattern.SCHEMA_REPRESENTATION)
- [Modifier](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#Modifier)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#Modifier.SCHEMA_REPRESENTATION)
- [AddRequestHeader](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#AddRequestHeader)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#AddRequestHeader.SCHEMA_REPRESENTATION)
- [ServicePatternsEnforcementScope](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePatternsEnforcementScope)
- [IngressPolicy](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy.SCHEMA_REPRESENTATION)
- [IngressFrom](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom.SCHEMA_REPRESENTATION)
- [IngressSource](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource.SCHEMA_REPRESENTATION)
- [PrivateServiceConnectEndpoint](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint.SCHEMA_REPRESENTATION)
- [IdentityType](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IdentityType)
- [IngressTo](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressTo)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressTo.SCHEMA_REPRESENTATION)
- [ApiOperation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation.SCHEMA_REPRESENTATION)
- [EgressPolicy](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy.SCHEMA_REPRESENTATION)
- [EgressFrom](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom.SCHEMA_REPRESENTATION)
- [EgressSource](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressSource)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressSource.SCHEMA_REPRESENTATION)
- [SourceRestriction](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#SourceRestriction)
- [EgressTo](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo)
  - [JSON representation](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#METHODS_SUMMARY)

## Resource: ServicePerimeter

`ServicePerimeter` describes a set of Google Cloud resources which can freely import and export data amongst themselves, but not export outside of the `ServicePerimeter`. If a request with a source within this `ServicePerimeter` has a target outside of the `ServicePerimeter`, the request will be blocked. Otherwise the request is allowed. There are two types of Service Perimeter - Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google Cloud project or VPC network can only belong to a single regular Service Perimeter. Service Perimeter Bridges can contain only Google Cloud projects as members, a single Google Cloud project may belong to multiple Service Perimeter Bridges.

| JSON representation |
|---|
| ``` { "name": string, "title": string, "description": string, "perimeterType": enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PerimeterType`), "status": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig`) }, "spec": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig`) }, "useExplicitDryRunSpec": boolean, "etag": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name for the `ServicePerimeter`. Format: `accessPolicies/{access_policy}/servicePerimeters/{servicePerimeter}`. The `servicePerimeter` component must begin with a letter, followed by alphanumeric characters or `_`. After you create a `ServicePerimeter`, you cannot change its `name`. |
| `title` | `string` Human readable title. Must be unique within the Policy. |
| `description` | `string` Description of the `ServicePerimeter` and its use. Does not affect behavior. |
| `perimeterType` | ``enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PerimeterType`)`` Perimeter type indicator. A single project or VPC network is allowed to be a member of a single regular perimeter, but multiple service perimeter bridges. A project cannot be included in a perimeter bridge without being included in a regular perimeter. For perimeter bridges, the restricted service list as well as access level lists must be empty. |
| `status` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig`)`` Current ServicePerimeter configuration. Specifies sets of resources, restricted services, and access levels that determine perimeter content and boundaries. |
| `spec` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeterConfig`)`` Proposed (or dry run) ServicePerimeter configuration. This configuration allows you to specify and test ServicePerimeter configuration without enforcing actual access restrictions. Only allowed to be set when the `useExplicitDryRunSpec` flag is set. |
| `useExplicitDryRunSpec` | `boolean` Use explicit dry run spec flag. Ordinarily, a dry-run spec implicitly exists for all Service Perimeters, and that spec is identical to the status for those Service Perimeters. When this flag is set, it inhibits the generation of the implicit spec, thereby allowing the user to explicitly provide a configuration ("spec") to use in a dry-run version of the Service Perimeter. This allows the user to test changes to the enforced config ("status") without actually enforcing them. This testing is done through analyzing the differences between currently enforced and suggested restrictions. `useExplicitDryRunSpec` must be set to `true` if any of the fields in the spec are set to non-default values. |
| `etag` | `string` Optional. An opaque identifier for the current version of the `ServicePerimeter`. This identifier does not follow any specific format. If an etag is not provided, the operation will be performed as if a valid etag is provided. |

## PerimeterType

Specifies the type of the Perimeter. There are two types: regular and bridge. Regular Service Perimeter contains resources, access levels, and restricted services. Every resource can be in at most ONE regular Service Perimeter.

In addition to being in a regular service perimeter, a resource can also be in zero or more perimeter bridges. A perimeter bridge only contains resources. Cross-project operations are permitted if all affected resources share some perimeter (whether bridge or regular). A Perimeter Bridge does not contain access levels or services: those are governed entirely by the regular perimeter that the resource is in.

Perimeter Bridges are typically useful when building more complex topologies with many independent perimeters that need to share some data with a common perimeter, but should not be able to share data among themselves.

| Enums ||
|---|---|
| `PERIMETER_TYPE_REGULAR` | Regular Perimeter. When no value is specified, the perimeter uses this type. |
| `PERIMETER_TYPE_BRIDGE` | Perimeter Bridge. |

## ServicePerimeterConfig

`ServicePerimeterConfig` specifies a set of Google Cloud resources that describe specific Service Perimeter configuration.

| JSON representation |
|---|
| ``` { "resources": [ string ], "accessLevels": [ string ], "restrictedServices": [ string ], "vpcAccessibleServices": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#VpcAccessibleServices`) }, "ingressPolicies": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy`) } ], "egressPolicies": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy`) } ] } ``` |

| Fields ||
|---|---|
| `resources[]` | `string` A list of Google Cloud resources that are inside of the service perimeter. Currently projects, folders, and VPCs are allowed. Project format: `projects/{projectNumber}` Folder format: `folders/{folderId}` VPC network format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NAME}`. |
| `accessLevels[]` | `string` A list of `AccessLevel` resource names that allow resources within the `ServicePerimeter` to be accessed from the internet. `AccessLevels` listed must be in the same policy as this `ServicePerimeter`. Referencing a nonexistent `AccessLevel` is a syntax error. If no `AccessLevel` names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example: `"accessPolicies/MY_POLICY/accessLevels/MY_LEVEL"`. For Service Perimeter Bridge, must be empty. |
| `restrictedServices[]` | `string` Google Cloud services that are subject to the Service Perimeter restrictions. For example, if `storage.googleapis.com` is specified, access to the storage buckets inside the perimeter must meet the perimeter's access restrictions. |
| `vpcAccessibleServices` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#VpcAccessibleServices`)`` Configuration for APIs allowed within Perimeter. |
| `ingressPolicies[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy`)`` List of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` to apply to the perimeter. A perimeter may have multiple `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy`, each of which is evaluated separately. Access is granted if any `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` grants it. Must be empty for a perimeter bridge. |
| `egressPolicies[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy`)`` List of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` to apply to the perimeter. A perimeter may have multiple `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy`, each of which is evaluated separately. Access is granted if any `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` grants it. Must be empty for a perimeter bridge. |

## VpcAccessibleServices

Specifies how APIs are allowed to communicate within the Service Perimeter.

| JSON representation |
|---|
| ``` { "enableRestriction": boolean, "allowedServices": [ string ], "allowedServicePatterns": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePattern`) } ], "servicePatternsEnforcementScopes": [ enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePatternsEnforcementScope`) ] } ``` |

| Fields ||
|---|---|
| `enableRestriction` | `boolean` Whether to restrict API calls within the Service Perimeter to the list of APIs specified in `allowedServices`. |
| `allowedServices[]` | `string` The list of APIs usable within the Service Perimeter. Must be empty unless `enableRestriction` is `true`. You can specify a list of individual services, as well as include the `'RESTRICTED-SERVICES'` value, which automatically includes all of the services protected by the perimeter. |
| `allowedServicePatterns[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePattern`)`` Specifies which Google services are allowed to be accessed from VPC networks in the service perimeter. |
| `servicePatternsEnforcementScopes[]` | ``enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePatternsEnforcementScope`)`` Defines the enforcement scopes of service patterns. |

## ServicePattern

Service patterns used to allow access.

| JSON representation |
|---|
| ``` { "modifiers": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#Modifier`) } ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "service": string, "pattern": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `modifiers[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#Modifier`)`` Modifiers to apply to the requests that match the URL pattern. |
| The service or pattern to allow. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `service` | `string` Supported service to allow. |
| `pattern` | `string` URL pattern to allow. Only patterns of `"<API>.googleapis.com/*"`, `"www.googleapis.com/<API>/*"`, and `"*.appspot.com/*"` forms are supported, where `<API>` should be an alphanumeric name. |
| End of mutually exclusive fields. ||

## Modifier

Modifier to apply to the API requests.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "addRequestHeader": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#AddRequestHeader`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Modifier to apply to the API requests. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `addRequestHeader` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#AddRequestHeader`)`` Adds an additional HTTP request header. |
| End of mutually exclusive fields. ||

## AddRequestHeader

Adds a request header to the API.

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` HTTP header key. |
| `value` | `string` HTTP header value. |

## ServicePatternsEnforcementScope

Defines the enforcement scope of service patterns.

| Enums ||
|---|---|
| `SERVICE_PATTERNS_ENFORCEMENT_SCOPE_UNSPECIFIED` | Default value. This cannot be used. |
| `GOOGLE_APIS_VIA_PRIVATE_PATH` | Enables VPC Accessible Services enforcement for all APIs (including unsupported APIs) for Private Google Access configured with Private VIP and Private Service Connect Endpoint for Global Google APIs that use the `'all-apis'` bundle. |

## IngressPolicy

Policy for ingress into `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`.

`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` match requests based on `ingressFrom` and `ingressTo` stanzas. For an ingress policy to match, both the `ingressFrom` and `ingressTo` stanzas must be matched. If an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` matches a request, the request is allowed through the perimeter boundary from outside the perimeter.

For example, access from the internet can be allowed either based on an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` or, for traffic hosted on Google Cloud, the project of the source network. For access from private networks, using the project of the hosting network is required.

Individual ingress policies can be limited by restricting which services and/or actions they match using the `ingressTo` field.

| JSON representation |
|---|
| ``` { "ingressFrom": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom`) }, "ingressTo": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressTo`) }, "title": string } ``` |

| Fields ||
|---|---|
| `ingressFrom` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom`)`` Defines the conditions on the source of a request causing this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` to apply. |
| `ingressTo` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressTo`)`` Defines the conditions on the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` and request destination that cause this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` to apply. |
| `title` | `string` Optional. Human-readable title for the ingress rule. The title must be unique within the perimeter and cannot exceed 100 characters. Within the access policy, the combined length of all rule titles must not exceed 240,000 characters. |

## IngressFrom

Defines the conditions under which an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` matches a request. Conditions are based on information about the source of the request. The request must satisfy what is defined in `sources` AND identity related fields in order to match.

| JSON representation |
|---|
| ``` { "sources": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource`) } ], "identities": [ string ], "identityType": enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IdentityType`) } ``` |

| Fields ||
|---|---|
| `sources[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource`)`` Sources that this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` authorizes access from. |
| `identities[]` | `string` A list of identities that are allowed access through \[IngressPolicy\]. Identities can be an individual user, service account, Google group, third-party identity, or agent identity. For the list of supported identity types, see <https://docs.cloud.google.com/vpc-service-controls/docs/supported-identities>. |
| `identityType` | ``enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IdentityType`)`` Specifies the type of identities that are allowed access from outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. |

## IngressSource

The source that `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` authorizes access from.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "accessLevel": string, "resource": string, "pscEndpoint": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Allowed ingress source. It can be one of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` or Google Cloud resource or a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint`. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `accessLevel` | `string` An `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` resource name that allows resources within the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` to be accessed from the internet. `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` listed must be in the same policy as this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. Referencing a nonexistent `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` will cause an error. If no `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` names are listed, resources within the perimeter can only be accessed via Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `accessLevel`, then all `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressSource` will be allowed. |
| `resource` | `string` A Google Cloud resource that is allowed to ingress the perimeter. Requests from these resources will be allowed to access perimeter data. Currently projects, folders, organizations, and VPCs are allowed. Project format: `projects/{projectNumber}` Folder format: `folders/{folderId}` Organization format: `organizations/{organizationId}` VPC network format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/networks/{NAME}`. The project may be in any Google Cloud organization, not just the organization that the perimeter is defined in. `*` is not allowed, the case of allowing all Google Cloud resources only is not supported. |
| `pscEndpoint` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint`)`` A `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint` that is allowed to access the perimeter. The Private Service Connect endpoint may be in any organization, not just the organization that the perimeter is defined in. |
| End of mutually exclusive fields. ||

## PrivateServiceConnectEndpoint

Specifies the Private Service Connect endpoint that an API call refers to.

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

| Fields ||
|---|---|
| `forwardingRule` | `string` The full resource name of the global forwarding rule that identifies a Private Service Connect endpoint. Forwarding rule format: `//compute.googleapis.com/projects/{PROJECT_ID}/global/forwardingRules/{FORWARDING_RULE_ID}`. |

## IdentityType

Specifies the types of identities that are allowed access in either `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom` or `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom` rules.

| Enums ||
|---|---|
| `IDENTITY_TYPE_UNSPECIFIED` | No blanket identity group specified. |
| `ANY_IDENTITY` | Authorize access from all identities outside the perimeter. |
| `ANY_USER_ACCOUNT` | Authorize access from all human users outside the perimeter. |
| `ANY_SERVICE_ACCOUNT` | Authorize access from all service accounts outside the perimeter. |

## IngressTo

Defines the conditions under which an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` matches a request. Conditions are based on information about the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` intended to be performed on the target resource of the request. The request must satisfy what is defined in `operations` AND `resources` in order to match.

| JSON representation |
|---|
| ``` { "operations": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation`) } ], "resources": [ string ], "roles": [ string ] } ``` |

| Fields ||
|---|---|
| `operations[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation`)`` A list of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` allowed to be performed by the sources specified in corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom` in this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. |
| `resources[]` | `string` A list of resources, currently projects, folders, and organizations in the form `projects/{projectNumber}`, `folders/{folderId}`, and `organizations/{organizationId}`, protected by this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` that are allowed to be accessed by sources defined in the corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom`. If a single `*` is specified, then access to all resources inside the perimeter is allowed. |
| `roles[]` | `string` IAM roles that represent the set of operations that the sources specified in the corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressFrom` are allowed to perform in this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. |

## ApiOperation

Identification for an API Operation.

| JSON representation |
|---|
| ``` { "serviceName": string, "methodSelectors": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/MethodSelector`) } ] } ``` |

| Fields ||
|---|---|
| `serviceName` | `string` The name of the API whose methods or permissions the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` or `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` want to allow. A single `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` with `serviceName` field set to `*` will allow all methods AND permissions for all services. |
| `methodSelectors[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/MethodSelector`)`` API methods or permissions to allow. Method or permission must belong to the service specified by `serviceName` field. A single `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/MethodSelector` entry with `*` specified for the `method` field will allow all methods AND permissions for the service specified in `serviceName`. |

## EgressPolicy

Policy for egress from perimeter.

`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` match requests based on `egressFrom` and `egressTo` stanzas. For an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` to match, both `egressFrom` and `egressTo` stanzas must be matched. If an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` matches a request, the request is allowed to span the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` boundary. For example, an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` can be used to allow VMs on networks within the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` to access a defined set of projects outside the perimeter in certain contexts (e.g. to read data from a Cloud Storage bucket or query against a BigQuery dataset).

`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` are concerned with the *resources* that a request relates to, as well as the API services and API actions being used. They do not relate to the direction of data movement. More detailed documentation for this concept can be found in the descriptions of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom` and `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo`.

| JSON representation |
|---|
| ``` { "egressFrom": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`) }, "egressTo": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo`) }, "title": string } ``` |

| Fields ||
|---|---|
| `egressFrom` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`)`` Defines conditions on the source of a request causing this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` to apply. |
| `egressTo` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo`)`` Defines the conditions on the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` and destination resources that cause this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` to apply. |
| `title` | `string` Optional. Human-readable title for the egress rule. The title must be unique within the perimeter and cannot exceed 100 characters. Within the access policy, the combined length of all rule titles must not exceed 240,000 characters. |

## EgressFrom

Defines the conditions under which an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` matches a request. Conditions are based on information about the source of the request. Note that if the destination of the request is also protected by a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`, then that `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` must have an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` which allows access in order for this request to succeed.

| JSON representation |
|---|
| ``` { "identities": [ string ], "identityType": enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IdentityType`), "sources": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressSource`) } ], "sourceRestriction": enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#SourceRestriction`) } ``` |

| Fields ||
|---|---|
| `identities[]` | `string` A list of identities that are allowed access through \[EgressPolicy\]. Identities can be an individual user, service account, Google group, third-party identity, or agent identity. For the list of supported identity types, see <https://docs.cloud.google.com/vpc-service-controls/docs/supported-identities>. |
| `identityType` | ``enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IdentityType`)`` Specifies the type of identities that are allowed access to outside the perimeter. If left unspecified, then members of `identities` field will be allowed access. |
| `sources[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressSource`)`` Sources that this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` authorizes access from. If this field is not empty, then `sourceRestriction` must be set to `SOURCE_RESTRICTION_ENABLED`. |
| `sourceRestriction` | ``enum (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#SourceRestriction`)`` Whether to enforce traffic restrictions based on `sources` field. If the `sources` field is not empty, then this field must be set to `SOURCE_RESTRICTION_ENABLED`. |

## EgressSource

The source that `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` authorizes access from inside the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` to somewhere outside the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` boundaries.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "accessLevel": string, "resource": string, "pscEndpoint": { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Allowed egress source. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `accessLevel` | `string` An `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` resource name that allows protected resources inside the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` to access outside the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` boundaries. `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` listed must be in the same policy as this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. Referencing a nonexistent `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` will cause an error. If an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels#AccessLevel` name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `accessLevel`, then all `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressSource` will be allowed. |
| `resource` | `string` A Google Cloud resource from the service perimeter that you want to allow to access data outside the perimeter. This field supports projects, folders, and organizations in the form `projects/{projectNumber}`, `folders/{folderId}`, and `organizations/{organizationId}`. You can't use `*` in this field to allow all Google Cloud resources. |
| `pscEndpoint` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint`)`` A `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#PrivateServiceConnectEndpoint` that is allowed to access data outside the perimeter. The Private Service Connect endpoint may be in any organization, not just the organization that the perimeter is defined in. |
| End of mutually exclusive fields. ||

## SourceRestriction

Whether to enable the enforcement of traffic based on the `sources` field. Only applies to `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`.

| Enums ||
|---|---|
| `SOURCE_RESTRICTION_UNSPECIFIED` | Enforcement preference unspecified, will not enforce traffic restrictions based on `sources` in `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`. |
| `SOURCE_RESTRICTION_ENABLED` | Enforcement preference enabled, traffic restrictions will be enforced based on `sources` in `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`. |
| `SOURCE_RESTRICTION_DISABLED` | Enforcement preference disabled, will not enforce traffic restrictions based on `sources` in `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`. |

## EgressTo

Defines the conditions under which an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressPolicy` matches a request. Conditions are based on information about the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` intended to be performed on the `resources` specified. Note that if the destination of the request is also protected by a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`, then that `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` must have an `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#IngressPolicy` which allows access in order for this request to succeed. The request must match `operations` AND `resources` fields in order to be allowed egress out of the perimeter.

| JSON representation |
|---|
| ``` { "resources": [ string ], "operations": [ { object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation`) } ], "externalResources": [ string ], "roles": [ string ] } ``` |

| Fields ||
|---|---|
| `resources[]` | `string` A list of resources, currently projects, folders, and organizations in the form `projects/{projectNumber}`, `folders/{folderId}`, and `organizations/{organizationId}`, that are allowed to be accessed by sources defined in the corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`. A request matches if it contains a resource in this list. If `*` is specified for `resources`, then this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressTo` rule will authorize access to all resources outside the perimeter. |
| `operations[]` | ``object (`https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation`)`` A list of `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ApiOperation` allowed to be performed by the sources specified in the corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom`. A request matches if it uses an operation/service in this list. |
| `externalResources[]` | `string` A list of external resources that are allowed to be accessed. Only AWS and Azure resources are supported. For Amazon S3, the supported formats are `s3://BUCKET_NAME`, `s3a://BUCKET_NAME`, and `s3n://BUCKET_NAME`. For Azure Storage, the supported format is `azure://myaccount.blob.core.windows.net/CONTAINER_NAME`. A request matches if it contains an external resource in this list (Example: `s3://bucket/path`). Currently `'*'` is not allowed. |
| `roles[]` | `string` IAM roles that represent the set of operations that the sources specified in the corresponding `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#EgressFrom` are allowed to perform in this `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/commit` | 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`. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/create` | Creates a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/delete` | Deletes a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` based on the resource name. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/get` | Gets a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` based on the resource name. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/list` | Lists all `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` for an access policy. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/patch` | Updates a `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter`. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/replaceAll` | Replaces all existing `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` with the `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters#ServicePerimeter` provided. |
| ### `https://docs.cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.servicePerimeters/testIamPermissions` | Returns the IAM permissions that the caller has on the specified Access Context Manager resource. |