gcloud compute instances update-access-config Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud compute instances update-access-config - update a Compute Engine virtual machine access configuration
- SYNOPSIS
gcloud compute instances update-access-configINSTANCE_NAME[--network-interface=NETWORK_INTERFACE; default="nic0"][--zone=ZONE][--no-ipv6-public-ptr|--ipv6-public-ptr-domain=IPV6_PUBLIC_PTR_DOMAIN][--public-ptr|--no-public-ptr][--public-ptr-domain=PUBLIC_PTR_DOMAIN|--no-public-ptr-domain][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
gcloud compute instances update-access-configis used to updateaccess configurations for network interfaces of Compute Engine virtual machines.IPv4 and IPv6 access configurations cannot be updated together.- EXAMPLES
- To update public PTR record in IPv4 access config in network interface 'nic0' ofan instance, run:
gcloudcomputeinstancesupdate-access-configexample-instance--network-interface=nic0--zone=us-central1-b--public-ptr--public-ptr-domain=exampledomain.com.To update public PTR record in IPv6 access config in default network interface'nic0' of an instance, run:
gcloudcomputeinstancesupdate-access-configexample-instance--zone=us-central1-b--ipv6-public-ptr-domain=exampledomain.com. - POSITIONAL ARGUMENTS
INSTANCE_NAME- Name of the instance to operate on. For details on valid instance names, referto the criteria documented under the field 'name' at:https://cloud.google.com/compute/docs/reference/rest/v1/instances
- FLAGS
--network-interface=NETWORK_INTERFACE; default="nic0"- Specifies the name of the network interface which contains the accessconfiguration. If this is not provided, then "nic0" is used as the default.
--zone=ZONE- Zone of the instance to operate on. If not specified, you might be prompted toselect a zone (interactive mode only).
gcloudattempts to identify theappropriate zone by searching for resources in your currently active project. Ifthe zone cannot be determined,gcloudprompts you for a selection withall available Google Cloud Platform zones.To avoid prompting when this flag is omitted, the user can set the
property:compute/zonegcloudconfigsetcompute/zoneZONEA list of zones can be fetched by running:
gcloudcomputezoneslistTo unset the property, run:
gcloudconfigunsetcompute/zoneAlternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE - At most one of these can be specified:
--no-ipv6-public-ptr- If provided, the default DNS PTR record will replace the existing one forexternal IPv6 in the IPv6 access configuration. Mutually exclusive withipv6-public-ptr-domain.
--ipv6-public-ptr-domain=IPV6_PUBLIC_PTR_DOMAIN- Assigns a custom PTR domain for the external IPv6 in the access configuration.Mutually exclusive with no-ipv6-public-ptr. This option can only be specifiedfor the default network interface,
.nic0
- At most one of these can be specified:
--public-ptr- Creates a DNS PTR record for the external IP in the access configuration. Thisoption can only be specified for the default network-interface, "nic0".
--no-public-ptr- If provided, no DNS PTR record is created for the external IP in the accessconfiguration. Mutually exclusive with public-ptr-domain.
- At most one of these can be specified:
--public-ptr-domain=PUBLIC_PTR_DOMAIN- Assigns a custom PTR domain for the external IP in the access configuration.Mutually exclusive with no-public-ptr. This option can only be specified for thedefault network-interface, "nic0".
--no-public-ptr-domain- If both this flag and --public-ptr are specified, creates a DNS PTR record forthe external IP in the access configuration with the PTR domain name being theDNS name of the instance.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- These variants are also available:
gcloudalphacomputeinstancesupdate-access-configgcloudbetacomputeinstancesupdate-access-config
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.