Method: networkAttachments.get

Returns the specified NetworkAttachment resource in the given scope.

HTTP request

GET https://compute.googleapis.com/compute/beta/projects/{project}/regions/{region}/networkAttachments/{networkAttachment}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region of this request.

networkAttachment

string

Name of the NetworkAttachment resource to return.

Request body

The request body must be empty.

Response body

NetworkAttachments A network attachment resource ...

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

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "selfLink": string,
  "selfLinkWithId": string,
  "region": string,
  "connectionPreference": enum,
  "connectionEndpoints": [
    {
      "status": enum,
      "projectIdOrNum": string,
      "subnetwork": string,
      "ipAddress": string,
      "ipv6Address": string,
      "secondaryIpCidrRanges": [
        string
      ],
      "subnetworkCidrRange": string
    }
  ],
  "subnetworks": [
    string
  ],
  "producerRejectLists": [
    string
  ],
  "producerAcceptLists": [
    string
  ],
  "fingerprint": string,
  "network": string
}
Fields
kind

string

[Output Only] Type of the resource.

id

string (uint64 format)

[Output Only] The unique identifier for the resource type. The server generates this identifier.

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 network attachment resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

connectionPreference

enum

connectionEndpoints[]

object

[Output Only] An array of connections for all the producers connected to this network attachment.

connectionEndpoints[].status

enum

The status of a connected endpoint to this network attachment.

connectionEndpoints[].projectIdOrNum

string

The project id or number of the interface to which the IP was assigned.

connectionEndpoints[].subnetwork

string

The subnetwork used to assign the IP to the producer instance network interface.

connectionEndpoints[].ipAddress

string

The IPv4 address assigned to the producer instance network interface. This value will be a range in case of Serverless.

connectionEndpoints[].ipv6Address

string

The IPv6 address assigned to the producer instance network interface. This is only assigned when the stack types of both the instance network interface and the consumer subnet are IPv4_IPv6.

connectionEndpoints[].secondaryIpCidrRanges[]

string

Alias IP ranges from the same subnetwork.

connectionEndpoints[].subnetworkCidrRange

string

[Output Only] The CIDR range of the subnet from which the IPv4 internal IP was allocated from.

subnetworks[]

string

An array of URLs where each entry is the URL of a subnet provided by the service consumer to use for endpoints in the producers that connect to this network attachment.

producerRejectLists[]

string

Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number.

producerAcceptLists[]

string

Projects that are allowed to connect to this network attachment. The project can be specified using its id or number.

fingerprint

string (bytes format)

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. An up-to-date fingerprint must be provided in order to patch.

A base64-encoded string.

network

string

[Output Only] The URL of the network which the Network Attachment belongs to. Practically it is inferred by fetching the network of the first subnetwork associated. Because it is required that all the subnetworks must be from the same network, it is assured that the Network Attachment belongs to the same network as all the subnetworks.

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.networkAttachments.get

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