---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/securityGateways"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/securityGateways"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/securityGateways

`POST /v1/projects/{projectsId}/locations/{locationsId}/securityGateways`

## Request

- Base URL: `https://beyondcorp.googleapis.com`
- URL: `https://beyondcorp.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/securityGateways`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Creates a new Security Gateway in a given project and location.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `requestId` string
- `securityGatewayId` string

## Request body

- GoogleCloudBeyondcorpSecuritygatewaysV1SecurityGateway: The information about a security gateway resource.
  - `createTime` string, google-datetime: Output only. Timestamp when the resource was created.
  - `delegatingServiceAccount` string: Output only. Service account used for operations that involve resources in consumer projects.
  - `displayName` string: Optional. An arbitrary user-provided name for the SecurityGateway. Cannot exceed 64 characters.
  - `externalIps` string[]: Output only. IP addresses that will be used for establishing connection to the endpoints.
  - `hubs` object: Optional. Map of Hubs that represents regional data path deployment with GCP region as a key.
  - `logging` GoogleCloudBeyondcorpSecuritygatewaysV1LoggingConfig: Configuration for Cloud Logging.
  - `name` string: Identifier. Name of the resource.
  - `proxyProtocolConfig` GoogleCloudBeyondcorpSecuritygatewaysV1ProxyProtocolConfig: The configuration for the proxy.
    - `allowedClientHeaders` string[]: Optional. List of the allowed client header names.
    - `clientIp` boolean: Optional. Client IP configuration. The client IP address is included if true.
    - `contextualHeaders` GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeaders: Contextual headers configuration.
      - `deviceInfo` GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDeviceInfo: The delegated device information configuration.
        - `outputType` 'OUTPUT_TYPE_UNSPECIFIED' | 'PROTOBUF' | 'JSON' | 'NONE': Optional. The output type details for the delegated device.
      - `dispatchInfo` GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedDispatchInfo: The delegated dispatch information configuration.
        - `outputType` 'OUTPUT_TYPE_UNSPECIFIED' | 'PROTOBUF' | 'JSON' | 'NONE': Optional. The output type details for the delegated dispatch information.
      - `groupInfo` GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedGroupInfo: The delegated group configuration details.
        - `outputType` 'OUTPUT_TYPE_UNSPECIFIED' | 'PROTOBUF' | 'JSON' | 'NONE': Optional. The output type of the delegated group information.
      - `outputType` 'OUTPUT_TYPE_UNSPECIFIED' | 'PROTOBUF' | 'JSON' | 'NONE': Optional. Default output type for all enabled headers.
      - `userInfo` GoogleCloudBeyondcorpSecuritygatewaysV1ContextualHeadersDelegatedUserInfo: The configuration information for the delegated user.
        - `outputType` 'OUTPUT_TYPE_UNSPECIFIED' | 'PROTOBUF' | 'JSON' | 'NONE': Optional. The delegated user's information.
    - `gatewayIdentity` 'GATEWAY_IDENTITY_UNSPECIFIED' | 'RESOURCE_NAME': Optional. The security gateway identity configuration.
    - `metadataHeaders` object: Optional. Custom resource specific headers along with the values. The names should conform to RFC 9110: >Field names can contain alphanumeric characters, hyphens, and periods, can contain only ASCII-printable characters and tabs, and must start with a letter.
  - `serviceDiscovery` GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscovery: Settings related to the Service Discovery.
    - `apiGateway` GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGateway: If Service Discovery is done through API, defines its settings.
      - `resourceOverride` GoogleCloudBeyondcorpSecuritygatewaysV1ServiceDiscoveryApiGatewayOperationDescriptor: API operation descriptor.
        - `path` string: Optional. Contains the URI path fragment where HTTP request is sent.
  - `state` 'STATE_UNSPECIFIED' | 'CREATING' | 'UPDATING' | 'DELETING' | 'RUNNING' | 'DOWN' | 'ERROR': Output only. The operational state of the SecurityGateway.
  - `updateTime` string, google-datetime: Output only. Timestamp when the resource was last modified.

## Response `200`

Successful response

- GoogleLongrunningOperation: This resource represents a long-running operation that is the result of a network API call.
  - `done` boolean: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` GoogleRpcStatus: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `metadata` object: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
  - `name` string: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  - `response` object: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.

---

[API](https://skmtc.dev/google/apis/beyondcorp.md) - [All operations](https://skmtc.dev/google/apis/beyondcorp/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/beyondcorp/revisions/87fad84c62fc?raw)
