network_attachments
Creates, updates, deletes, gets or lists a network_attachments
resource.
Overview
Name | network_attachments |
Type | Resource |
Id | google.compute.network_attachments |
Fields
The following fields are returned by SELECT
queries:
- get
- list
- aggregated_list
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource type. The server generates this identifier. |
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. (pattern: a-z?) |
connectionEndpoints | array | [Output Only] An array of connections for all the producers connected to this network attachment. |
connectionPreference | string | |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
fingerprint | string (byte) | 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. |
kind | string | [Output Only] Type of the resource. (default: compute#networkAttachment) |
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. |
producerAcceptLists | array | Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. |
producerRejectLists | array | Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. |
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. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
selfLinkWithId | string | [Output Only] Server-defined URL for this resource's resource id. |
subnetworks | array | 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. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | [Output Only] Unique identifier for the resource; defined by the server. |
items | array | A list of NetworkAttachment resources. |
kind | string | (default: compute#networkAttachmentList) |
nextPageToken | string | [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
selfLink | string | [Output Only] Server-defined URL for this resource. |
warning | object | [Output Only] Informational warning message. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource type. The server generates this identifier. |
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. (pattern: a-z?) |
connectionEndpoints | array | [Output Only] An array of connections for all the producers connected to this network attachment. |
connectionPreference | string | |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
fingerprint | string (byte) | 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. |
kind | string | [Output Only] Type of the resource. (default: compute#networkAttachment) |
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. |
producerAcceptLists | array | Projects that are allowed to connect to this network attachment. The project can be specified using its id or number. |
producerRejectLists | array | Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number. |
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. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
selfLinkWithId | string | [Output Only] Server-defined URL for this resource's resource id. |
subnetworks | array | 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. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | project , region , networkAttachment | Returns the specified NetworkAttachment resource in the given scope. | |
list | select | project , region | filter , maxResults , orderBy , pageToken , returnPartialSuccess | Lists the NetworkAttachments for a project in the given scope. |
aggregated_list | select | project | filter , includeAllScopes , maxResults , orderBy , pageToken , returnPartialSuccess , serviceProjectNumber | Retrieves the list of all NetworkAttachment resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true . |
insert | insert | project , region | requestId | Creates a NetworkAttachment in the specified project in the given scope using the parameters that are included in the request. |
patch | update | project , region , networkAttachment | requestId | Patches the specified NetworkAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. |
delete | delete | project , region , networkAttachment | requestId | Deletes the specified NetworkAttachment in the given scope |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
networkAttachment | string | |
project | string | |
region | string | |
filter | string | |
includeAllScopes | boolean | |
maxResults | integer (uint32) | |
orderBy | string | |
pageToken | string | |
requestId | string | |
returnPartialSuccess | boolean | |
serviceProjectNumber | string (int64) |
SELECT
examples
- get
- list
- aggregated_list
Returns the specified NetworkAttachment resource in the given scope.
SELECT
id,
name,
connectionEndpoints,
connectionPreference,
creationTimestamp,
description,
fingerprint,
kind,
network,
producerAcceptLists,
producerRejectLists,
region,
selfLink,
selfLinkWithId,
subnetworks
FROM google.compute.network_attachments
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND networkAttachment = '{{ networkAttachment }}' -- required;
Lists the NetworkAttachments for a project in the given scope.
SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.network_attachments
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
Retrieves the list of all NetworkAttachment resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
SELECT
id,
name,
connectionEndpoints,
connectionPreference,
creationTimestamp,
description,
fingerprint,
kind,
network,
producerAcceptLists,
producerRejectLists,
region,
selfLink,
selfLinkWithId,
subnetworks
FROM google.compute.network_attachments
WHERE project = '{{ project }}' -- required
AND filter = '{{ filter }}'
AND includeAllScopes = '{{ includeAllScopes }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}';
INSERT
examples
- insert
- Manifest
Creates a NetworkAttachment in the specified project in the given scope using the parameters that are included in the request.
INSERT INTO google.compute.network_attachments (
data__kind,
data__id,
data__creationTimestamp,
data__name,
data__description,
data__selfLink,
data__selfLinkWithId,
data__region,
data__connectionPreference,
data__connectionEndpoints,
data__subnetworks,
data__producerRejectLists,
data__producerAcceptLists,
data__fingerprint,
data__network,
project,
region,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ name }}',
'{{ description }}',
'{{ selfLink }}',
'{{ selfLinkWithId }}',
'{{ region }}',
'{{ connectionPreference }}',
'{{ connectionEndpoints }}',
'{{ subnetworks }}',
'{{ producerRejectLists }}',
'{{ producerAcceptLists }}',
'{{ fingerprint }}',
'{{ network }}',
'{{ project }}',
'{{ region }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;
# Description fields are for documentation purposes
- name: network_attachments
props:
- name: project
value: string
description: Required parameter for the network_attachments resource.
- name: region
value: string
description: Required parameter for the network_attachments resource.
- name: kind
value: string
description: >
[Output Only] Type of the resource.
default: compute#networkAttachment
- name: id
value: string
description: >
[Output Only] The unique identifier for the resource type. The server generates this identifier.
- name: creationTimestamp
value: string
description: >
[Output Only] Creation timestamp in RFC3339 text format.
- name: name
value: string
description: >
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.
- name: description
value: string
description: >
An optional description of this resource. Provide this property when you create the resource.
- name: selfLink
value: string
description: >
[Output Only] Server-defined URL for the resource.
- name: selfLinkWithId
value: string
description: >
[Output Only] Server-defined URL for this resource's resource id.
- name: region
value: string
description: >
[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.
- name: connectionPreference
value: string
valid_values: ['ACCEPT_AUTOMATIC', 'ACCEPT_MANUAL', 'INVALID']
- name: connectionEndpoints
value: array
description: >
[Output Only] An array of connections for all the producers connected to this network attachment.
- name: subnetworks
value: array
description: >
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.
- name: producerRejectLists
value: array
description: >
Projects that are not allowed to connect to this network attachment. The project can be specified using its id or number.
- name: producerAcceptLists
value: array
description: >
Projects that are allowed to connect to this network attachment. The project can be specified using its id or number.
- name: fingerprint
value: string
description: >
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.
- name: network
value: string
description: >
[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.
- name: requestId
value: string
UPDATE
examples
- patch
Patches the specified NetworkAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
UPDATE google.compute.network_attachments
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__selfLink = '{{ selfLink }}',
data__selfLinkWithId = '{{ selfLinkWithId }}',
data__region = '{{ region }}',
data__connectionPreference = '{{ connectionPreference }}',
data__connectionEndpoints = '{{ connectionEndpoints }}',
data__subnetworks = '{{ subnetworks }}',
data__producerRejectLists = '{{ producerRejectLists }}',
data__producerAcceptLists = '{{ producerAcceptLists }}',
data__fingerprint = '{{ fingerprint }}',
data__network = '{{ network }}'
WHERE
project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND networkAttachment = '{{ networkAttachment }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;
DELETE
examples
- delete
Deletes the specified NetworkAttachment in the given scope
DELETE FROM google.compute.network_attachments
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND networkAttachment = '{{ networkAttachment }}' --required
AND requestId = '{{ requestId }}';