Method: vpnGateways.get

Returns the specified VPN gateway.

HTTP request

GET https://compute.googleapis.com/compute/beta/projects/{project}/regions/{region}/vpnGateways/{vpnGateway}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region for this request.

vpnGateway

string

Name of the VPN gateway to return.

Request body

The request body must be empty.

Response body

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 .

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "region": string,
  "network": string,
  "selfLink": string,
  "labels": {
    string: string,
    ...
  },
  "labelFingerprint": string,
  "vpnInterfaces": [
    {
      "id": integer,
      "ipAddress": string,
      "ipv6Address": string,
      "interconnectAttachment": string
    }
  ],
  "stackType": enum,
  "gatewayIpVersion": enum
}
Fields
kind

string

[Output Only] Type of resource. Always compute#vpnGateway for VPN gateways.

id

string (uint64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

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 with RFC1035. 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.

description

string

An optional description of this resource. Provide this property when you create the resource.

region

string

[Output Only] URL of the region where the VPN gateway resides.

network

string

URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.

labels

map (key: string, value: string)

Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.

labelFingerprint

string (bytes format)

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 error 412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve a VpnGateway.

A base64-encoded string.

vpnInterfaces[]

object

The list of VPN interfaces associated with this VPN gateway.

vpnInterfaces[].id

integer (uint32 format)

[Output Only] Numeric identifier for this VPN interface associated with the VPN gateway.

vpnInterfaces[].ipAddress

string

[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.

vpnInterfaces[].ipv6Address

string

[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).

vpnInterfaces[].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

enum

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 is IPV4, or IPV4_IPV6 if the gateway IP version is IPV6.

gatewayIpVersion

enum

The IP family of the gateway IPs for the HA-VPN gateway interfaces. If not specified, IPV4 will be used.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/compute.readonly
  • https://www.googleapis.com/auth/compute
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the following IAM permissions:

  • compute.vpnGateways.get

To find predefined roles that contain those permissions, see Compute Engine IAM Roles.