instances_access_config
Creates, updates, deletes, gets or lists an instances_access_config resource.
Overview
| Name | instances_access_config |
| Type | Resource |
| Id | google.compute.instances_access_config |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
add_access_config | insert | project, zone, instance, networkInterface | requestId | Adds an access config to an instance's network interface. |
update_access_config | update | project, zone, instance, networkInterface | requestId | Updates the specified access config from an instance's network interface with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules. |
delete_access_config | delete | project, zone, instance, accessConfig, networkInterface | requestId | Deletes an access config from an instance's network interface. |
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 |
|---|---|---|
accessConfig | string | |
instance | string | |
networkInterface | string | |
project | string | |
zone | string | |
requestId | string |
INSERT examples
- add_access_config
- Manifest
Adds an access config to an instance's network interface.
INSERT INTO google.compute.instances_access_config (
data__publicPtrDomainName,
data__natIP,
data__setPublicPtr,
data__networkTier,
data__externalIpv6PrefixLength,
data__securityPolicy,
data__name,
data__externalIpv6,
data__type,
project,
zone,
instance,
networkInterface,
requestId
)
SELECT
'{{ publicPtrDomainName }}',
'{{ natIP }}',
{{ setPublicPtr }},
'{{ networkTier }}',
{{ externalIpv6PrefixLength }},
'{{ securityPolicy }}',
'{{ name }}',
'{{ externalIpv6 }}',
'{{ type }}',
'{{ project }}',
'{{ zone }}',
'{{ instance }}',
'{{ networkInterface }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
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: instances_access_config
props:
- name: project
value: "{{ project }}"
description: Required parameter for the instances_access_config resource.
- name: zone
value: "{{ zone }}"
description: Required parameter for the instances_access_config resource.
- name: instance
value: "{{ instance }}"
description: Required parameter for the instances_access_config resource.
- name: networkInterface
value: "{{ networkInterface }}"
description: Required parameter for the instances_access_config resource.
- name: publicPtrDomainName
value: "{{ publicPtrDomainName }}"
description: |
The DNS domain name for the public PTR record.
You can set this field only if the `setPublicPtr` field is enabled inaccessConfig. If this field is unspecified inipv6AccessConfig, a default PTR record will be created for
first IP in associated external IPv6 range.
- name: natIP
value: "{{ natIP }}"
description: |
Applies to accessConfigs (IPv4) only. Anexternal IP
address associated with this instance. Specify an unused static
external IP address available to the project or leave this field undefined
to use an IP from a shared ephemeral IP address pool. If you specify a
static external IP address, it must live in the same region as the zone of
the instance.
- name: setPublicPtr
value: {{ setPublicPtr }}
description: |
Specifies whether a public DNS 'PTR' record should be created to map the
external IP address of the instance to a DNS domain name.
This field is not used in ipv6AccessConfig. A default PTR
record will be created if the VM has external IPv6 range associated.
- name: networkTier
value: "{{ networkTier }}"
description: |
This signifies the networking tier used for configuring this access
configuration and can only take the following values: PREMIUM,STANDARD.
If an AccessConfig is specified without a valid external IP address, an
ephemeral IP will be created with this networkTier.
If an AccessConfig with a valid external IP address is specified, it must
match that of the networkTier associated with the Address resource owning
that IP.
valid_values: ['FIXED_STANDARD', 'PREMIUM', 'STANDARD', 'STANDARD_OVERRIDES_FIXED_STANDARD']
- name: externalIpv6PrefixLength
value: {{ externalIpv6PrefixLength }}
description: |
Applies to ipv6AccessConfigs only. The prefix length of the
external IPv6 range.
- name: securityPolicy
value: "{{ securityPolicy }}"
description: |
The resource URL for the security policy associated with this access
config.
- name: name
value: "{{ name }}"
description: |
The name of this access configuration. In accessConfigs
(IPv4), the default and recommended name is External NAT, but
you can use any arbitrary string, such as My external IP orNetwork Access. In ipv6AccessConfigs, the
recommend name is External IPv6.
- name: externalIpv6
value: "{{ externalIpv6 }}"
description: |
Applies to ipv6AccessConfigs only.
The first IPv6 address of the external IPv6 range associated
with this instance, prefix length is stored inexternalIpv6PrefixLength in ipv6AccessConfig. To
use a static external IP address, it must be unused and in the same region
as the instance's zone. If not specified, Google Cloud will automatically
assign an external IPv6 address from the instance's subnetwork.
- name: type
value: "{{ type }}"
description: |
The type of configuration. In accessConfigs (IPv4), the
default and only option is ONE_TO_ONE_NAT. Inipv6AccessConfigs, the default and only option isDIRECT_IPV6.
valid_values: ['DIRECT_IPV6', 'ONE_TO_ONE_NAT']
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- update_access_config
Updates the specified access config from an instance's network interface
with the data included in the request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules.
UPDATE google.compute.instances_access_config
SET
data__publicPtrDomainName = '{{ publicPtrDomainName }}',
data__natIP = '{{ natIP }}',
data__setPublicPtr = {{ setPublicPtr }},
data__networkTier = '{{ networkTier }}',
data__externalIpv6PrefixLength = {{ externalIpv6PrefixLength }},
data__securityPolicy = '{{ securityPolicy }}',
data__name = '{{ name }}',
data__externalIpv6 = '{{ externalIpv6 }}',
data__type = '{{ type }}'
WHERE
project = '{{ project }}' --required
AND zone = '{{ zone }}' --required
AND instance = '{{ instance }}' --required
AND networkInterface = '{{ networkInterface }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;
DELETE examples
- delete_access_config
Deletes an access config from an instance's network interface.
DELETE FROM google.compute.instances_access_config
WHERE project = '{{ project }}' --required
AND zone = '{{ zone }}' --required
AND instance = '{{ instance }}' --required
AND accessConfig = '{{ accessConfig }}' --required
AND networkInterface = '{{ networkInterface }}' --required
AND requestId = '{{ requestId }}'
;