Method: instances.updateAccessConfig

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.

HTTP request

POST https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/instances/{resourceId}/updateAccessConfig

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
project

string

Project ID for this request.

zone

string

The name of the zone for this request.

resourceId

string

The instance name for this request.

Query parameters

Parameters
requestId

string

An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

networkInterface

string

The name of the network interface where the access config is attached.

Request body

The request body contains data with the following structure:

JSON representation
{
  "accessConfig": {
    "type": enum,
    "name": string,
    "natIP": string,
    "setPublicPtr": boolean,
    "publicPtrDomainName": string,
    "networkTier": enum,
    "kind": string
  },
}
Fields
accessConfig

object

The access config to update.

accessConfig.type

enum

The type of configuration. The default and only option is ONE_TO_ONE_NAT.

accessConfig.name

string

The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access.

accessConfig.natIP

string

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.

accessConfig.setPublicPtr

boolean

Specifies whether a public DNS ‘PTR’ record should be created to map the external IP address of the instance to a DNS domain name.

accessConfig.publicPtrDomainName

string

The DNS domain name for the public PTR record. This field can only be set when the setPublicPtr field is enabled.

accessConfig.networkTier

enum

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.

accessConfig.kind

string

[Output Only] Type of the resource. Always compute#accessConfig for access configs.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "operation": {
    "id": string,
    "creationTimestamp": string,
    "name": string,
    "zone": string,
    "clientOperationId": string,
    "operationType": string,
    "targetLink": string,
    "targetId": string,
    "status": enum,
    "statusMessage": string,
    "user": string,
    "progress": number,
    "insertTime": string,
    "startTime": string,
    "endTime": string,
    "error": {
      "errors": [
        {
          "code": string,
          "location": string,
          "message": string
        }
      ]
    },
    "warnings": {
      "code": enum,
      "message": string,
      "data": [
        {
          "key": string,
          "value": string
        }
      ]
    },
    "httpErrorStatusCode": number,
    "httpErrorMessage": string,
    "selfLink": string,
    "region": string,
    "description": string,
    "kind": string
  },
}
Fields
operation

object

operation.id

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

operation.creationTimestamp

string

[Deprecated] This field is deprecated.

operation.name

string

[Output Only] Name of the resource.

operation.zone

string

[Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

operation.clientOperationId

string

[Output Only] Reserved for future use.