# REST Resource: projects.locations.appGateways

- [Resource: AppGateway](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AppGateway)
  - [JSON representation](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AppGateway.SCHEMA_REPRESENTATION)
- [Type](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#Type)
- [State](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#State)
- [AllocatedConnection](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AllocatedConnection)
  - [JSON representation](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AllocatedConnection.SCHEMA_REPRESENTATION)
- [HostType](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#HostType)
- [Methods](https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#METHODS_SUMMARY)

## Resource: AppGateway

A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "displayName": string, "uid": string, "type": enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#Type`), "state": enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#State`), "uri": string, "allocatedConnections": [ { object (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AllocatedConnection`) } ], "hostType": enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#HostType`), "satisfiesPzs": boolean, "satisfiesPzi": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. Unique resource name of the AppGateway. The name is ignored when creating an AppGateway. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp when the resource was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp when the resource was last modified. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `labels` | `map (key: string, value: string)` Optional. Resource labels to represent user provided metadata. |
| `displayName` | `string` Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters. |
| `uid` | `string` Output only. A unique identifier for the instance generated by the system. |
| `type` | ``enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#Type`)`` Required. The type of network connectivity used by the AppGateway. |
| `state` | ``enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#State`)`` Output only. The current state of the AppGateway. |
| `uri` | `string` Output only. Server-defined URI for this resource. |
| `allocatedConnections[]` | ``object (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#AllocatedConnection`)`` Output only. A list of connections allocated for the Gateway |
| `hostType` | ``enum (`https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways#HostType`)`` Required. The type of hosting used by the AppGateway. |
| `satisfiesPzs` | `boolean` Output only. Reserved for future use. |
| `satisfiesPzi` | `boolean` Output only. Reserved for future use. |

## Type

Enum containing list of all possible network connectivity options supported by BeyondCorp AppGateway.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `TCP_PROXY` | TCP Proxy based BeyondCorp Connection. API will default to this if unset. |

## State

Represents the different states of an AppGateway.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Default value. This value is unused. |
| `CREATING` | AppGateway is being created. |
| `CREATED` | AppGateway has been created. |
| `UPDATING` | AppGateway's configuration is being updated. |
| `DELETING` | AppGateway is being deleted. |
| `DOWN` | AppGateway is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF. |

## AllocatedConnection

Allocated connection of the AppGateway.

| JSON representation |
|---|
| ``` { "pscUri": string, "ingressPort": integer } ``` |

| Fields ||
|---|---|
| `pscUri` | `string` Required. The PSC uri of an allocated connection |
| `ingressPort` | `integer` Required. The ingress port of an allocated connection |

## HostType

Enum containing list of all possible host types supported by BeyondCorp Connection.

| Enums ||
|---|---|
| `HOST_TYPE_UNSPECIFIED` | Default value. This value is unused. |
| `GCP_REGIONAL_MIG` | AppGateway hosted in a GCP regional managed instance group. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/create` | Creates a new AppGateway in a given project and location. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/delete` | Deletes a single AppGateway. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/get` | Gets details of a single AppGateway. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/list` | Lists AppGateways in a given project and location. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `https://docs.cloud.google.com/beyondcorp/docs/reference/rest/v1/projects.locations.appGateways/testIamPermissions` | Returns permissions that a caller has on the specified resource. |