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 supports PATCH semantics and uses the JSON 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__kind,
data__type,
data__name,
data__natIP,
data__externalIpv6,
data__externalIpv6PrefixLength,
data__setPublicPtr,
data__publicPtrDomainName,
data__networkTier,
data__securityPolicy,
project,
zone,
instance,
networkInterface,
requestId
)
SELECT
'{{ kind }}',
'{{ type }}',
'{{ name }}',
'{{ natIP }}',
'{{ externalIpv6 }}',
{{ externalIpv6PrefixLength }},
{{ setPublicPtr }},
'{{ publicPtrDomainName }}',
'{{ networkTier }}',
'{{ securityPolicy }}',
'{{ project }}',
'{{ zone }}',
'{{ instance }}',
'{{ networkInterface }}',
'{{ 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: instances_access_config
props:
- name: project
value: string
description: Required parameter for the instances_access_config resource.
- name: zone
value: string
description: Required parameter for the instances_access_config resource.
- name: instance
value: string
description: Required parameter for the instances_access_config resource.
- name: networkInterface
value: string
description: Required parameter for the instances_access_config resource.
- name: kind
value: string
description: >
[Output Only] Type of the resource. Always compute#accessConfig for access configs.
default: compute#accessConfig
- name: type
value: string
description: >
The type of configuration. In accessConfigs (IPv4), the default and only option is ONE_TO_ONE_NAT. In ipv6AccessConfigs, the default and only option is DIRECT_IPV6.
valid_values: ['DIRECT_IPV6', 'ONE_TO_ONE_NAT']
- name: name
value: string
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 or Network Access. In ipv6AccessConfigs, the recommend name is External IPv6.
- name: natIP
value: string
description: >
Applies to accessConfigs (IPv4) only. An external 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: externalIpv6
value: string
description: >
Applies to ipv6AccessConfigs only. The first IPv6 address of the external IPv6 range associated with this instance, prefix length is stored in externalIpv6PrefixLength 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: externalIpv6PrefixLength
value: integer
description: >
Applies to ipv6AccessConfigs only. The prefix length of the external IPv6 range.
- name: setPublicPtr
value: boolean
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: publicPtrDomainName
value: string
description: >
The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be created for first IP in associated external IPv6 range.
- name: networkTier
value: string
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: securityPolicy
value: string
description: >
The resource URL for the security policy associated with this access config.
- name: requestId
value: string
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 supports PATCH semantics and uses the JSON merge patch format and processing rules.
UPDATE google.compute.instances_access_config
SET
data__kind = '{{ kind }}',
data__type = '{{ type }}',
data__name = '{{ name }}',
data__natIP = '{{ natIP }}',
data__externalIpv6 = '{{ externalIpv6 }}',
data__externalIpv6PrefixLength = {{ externalIpv6PrefixLength }},
data__setPublicPtr = {{ setPublicPtr }},
data__publicPtrDomainName = '{{ publicPtrDomainName }}',
data__networkTier = '{{ networkTier }}',
data__securityPolicy = '{{ securityPolicy }}'
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,
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 }}';