- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Returns the specified NetworkAttachment resource in the given scope.
HTTP request
GET https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/networkAttachments/{networkAttachment}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
region |
Name of the region of this request. |
networkAttachment |
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 |
[Output Only] Type of the resource. |
id |
[Output Only] The unique identifier for the resource type. The server generates this identifier. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
name |
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 |
description |
An optional description of this resource. Provide this property when you create the resource. |
selfLink |
[Output Only] Server-defined URL for the resource. |
selfLinkWithId |
[Output Only] Server-defined URL for this resource's resource id. |
region |
[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 |
|
connectionEndpoints[] |
[Output Only] An array of connections for all the producers connected to this network attachment. |
connectionEndpoints[].status |
The status of a connected endpoint to this network attachment. |
connectionEndpoints[].projectIdOrNum |
The project id or number of the interface to which the IP was assigned. |
connectionEndpoints[].subnetwork |
The subnetwork used to assign the IP to the producer instance network interface. |
connectionEndpoints[].ipAddress |
The IPv4 address assigned to the producer instance network interface. This value will be a range in case of Serverless. |
connectionEndpoints[].ipv6Address |
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[] |
Alias IP ranges from the same subnetwork. |
connectionEndpoints[].subnetworkCidrRange |
[Output Only] The CIDR range of the subnet from which the IPv4 internal IP was allocated from. |
subnetworks[] |
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[] |
Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. |
producerAcceptLists[] |
Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. |
fingerprint |
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 |
[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.