---
title: "POST /projects/{project}/regions/{region}/vpnGateways"
method: POST
path: "/projects/{project}/regions/{region}/vpnGateways"
tags: ["vpnGateways"]
---

# POST /projects/{project}/regions/{region}/vpnGateways

`POST /projects/{project}/regions/{region}/vpnGateways`

Creates a VPN gateway in the specified project and region using
the data included in the request.

## Path parameters

- `project` string, required
- `region` string, required

## Query parameters

- `requestId` string

## Request body

- VpnGateway — Represents a HA VPN gateway. HA VPN is a high-availability (HA) Cloud VPN solution that lets you securely connect your on-premises network to your Google Cloud Virtual Private Cloud network through an IPsec VPN connection in a single region. For more information about Cloud HA VPN solutions, see Cloud VPN topologies .
  - `labels` object — Labels for this resource. These can only be added or modified by thesetLabels method. Each label key/value pair must comply withRFC1035. Label values may be empty.
  - `labelFingerprint` string, byte — A fingerprint for the labels being applied to this VpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a VpnGateway.
  - `description` string — An optional description of this resource. Provide this property when you create the resource.
  - `region` string — Output only. [Output Only] URL of the region where the VPN gateway resides.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `kind` string — Output only. [Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.
  - `name` string — Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
  - `params` VpnGatewayParams
    - `resourceManagerTags` object — Tag keys/values directly bound to this resource. Tag keys and values have the same definition as resource manager tags. The field is allowed for INSERT only. The keys/values to set on the resource should be specified in either ID { : } or Namespaced format { : }. For example the following are valid inputs: * {"tagKeys/333" : "tagValues/444", "tagKeys/123" : "tagValues/456"} * {"123/environment" : "production", "345/abc" : "xyz"} Note: * Invalid combinations of ID & namespaced format is not supported. For instance: {"123/environment" : "tagValues/444"} is invalid. * Inconsistent format is not supported. For instance: {"tagKeys/333" : "tagValues/444", "123/env" : "prod"} is invalid.
  - `gatewayIpVersion` 'IPV4' | 'IPV6' — The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.
  - `network` string — URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.
  - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  - `vpnInterfaces` VpnGatewayVpnGatewayInterface[] — The list of VPN interfaces associated with this VPN gateway.
    - `ipv6Address` string — Output only. [Output Only] IPv6 address for this VPN interface associated with the VPN gateway. The IPv6 address must be a regional external IPv6 address. The format is RFC 5952 format (e.g. 2001:db8::2d9:51:0:0).
    - `ipAddress` string — Output only. [Output Only] IP address for this VPN interface associated with the VPN gateway. The IP address could be either a regional external IP address or a regional internal IP address. The two IP addresses for a VPN gateway must be all regional external or regional internal IP addresses. There cannot be a mix of regional external IP addresses and regional internal IP addresses. For HA VPN over Cloud Interconnect, the IP addresses for both interfaces could either be regional internal IP addresses or regional external IP addresses. For regular (non HA VPN over Cloud Interconnect) HA VPN tunnels, the IP address must be a regional external IP address.
    - `id` integer — Output only. [Output Only] Numeric identifier for this VPN interface associated with the VPN gateway.
    - `interconnectAttachment` string — URL of the VLAN attachment (interconnectAttachment) resource for this VPN gateway interface. When the value of this field is present, the VPN gateway is used for HA VPN over Cloud Interconnect; all egress or ingress traffic for this VPN gateway interface goes through the specified VLAN attachment resource.
  - `stackType` 'IPV4_IPV6' | 'IPV4_ONLY' | 'IPV6_ONLY' — The stack type for this VPN gateway to identify the IP protocols that are enabled. Possible values are: IPV4_ONLY,IPV4_IPV6, IPV6_ONLY. If not specified,IPV4_ONLY is used if the gateway IP version isIPV4, or IPV4_IPV6 if the gateway IP version isIPV6.
  - `selfLink` string — Output only. [Output Only] Server-defined URL for the resource.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
