network_attachments
Creates, updates, deletes, gets or lists a network_attachments
resource.
Overview
Name | network_attachments |
Type | Resource |
Id | google.compute.network_attachments |
Fields
Name | Datatype | Description |
---|---|---|
id | string | [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. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
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. |
fingerprint | string | 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. |
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
aggregated_list | SELECT | project | 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 . |
get | SELECT | networkAttachment, project, region | Returns the specified NetworkAttachment resource in the given scope. |
list | SELECT | project, region | Lists the NetworkAttachments for a project in the given scope. |
insert | INSERT | project, region | Creates a NetworkAttachment in the specified project in the given scope using the parameters that are included in the request. |
delete | DELETE | networkAttachment, project, region | Deletes the specified NetworkAttachment in the given scope |
patch | UPDATE | networkAttachment, project, region | 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. |
SELECT
examples
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,
description,
connectionEndpoints,
connectionPreference,
creationTimestamp,
fingerprint,
kind,
network,
producerAcceptLists,
producerRejectLists,
region,
selfLink,
selfLinkWithId,
subnetworks
FROM google.compute.network_attachments
WHERE project = '{{ project }}';
INSERT
example
Use the following StackQL query and manifest file to create a new network_attachments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.compute.network_attachments (
project,
region,
name,
description,
region,
connectionPreference,
connectionEndpoints,
subnetworks,
producerRejectLists,
producerAcceptLists,
fingerprint,
network
)
SELECT
'{{ project }}',
'{{ region }}',
'{{ name }}',
'{{ description }}',
'{{ region }}',
'{{ connectionPreference }}',
'{{ connectionEndpoints }}',
'{{ subnetworks }}',
'{{ producerRejectLists }}',
'{{ producerAcceptLists }}',
'{{ fingerprint }}',
'{{ network }}'
;
- name: your_resource_model_name
props:
- name: kind
value: string
- name: id
value: string
- name: creationTimestamp
value: string
- name: name
value: string
- name: description
value: string
- name: selfLink
value: string
- name: selfLinkWithId
value: string
- name: region
value: string
- name: connectionPreference
value: string
- name: connectionEndpoints
value:
- - name: status
value: string
- name: projectIdOrNum
value: string
- name: subnetwork
value: string
- name: ipAddress
value: string
- name: ipv6Address
value: string
- name: secondaryIpCidrRanges
value:
- string
- name: subnetworkCidrRange
value: string
- name: subnetworks
value:
- string
- name: producerRejectLists
value:
- string
- name: producerAcceptLists
value:
- string
- name: fingerprint
value: string
- name: network
value: string
UPDATE
example
Updates a network_attachments
resource.
/*+ update */
UPDATE google.compute.network_attachments
SET
name = '{{ name }}',
description = '{{ description }}',
region = '{{ region }}',
connectionPreference = '{{ connectionPreference }}',
connectionEndpoints = '{{ connectionEndpoints }}',
subnetworks = '{{ subnetworks }}',
producerRejectLists = '{{ producerRejectLists }}',
producerAcceptLists = '{{ producerAcceptLists }}',
fingerprint = '{{ fingerprint }}',
network = '{{ network }}'
WHERE
networkAttachment = '{{ networkAttachment }}'
AND project = '{{ project }}'
AND region = '{{ region }}';
DELETE
example
Deletes the specified network_attachments
resource.
/*+ delete */
DELETE FROM google.compute.network_attachments
WHERE networkAttachment = '{{ networkAttachment }}'
AND project = '{{ project }}'
AND region = '{{ region }}';