Method: instanceGroups.setNamedPorts

Sets the named ports for the specified instance group.

HTTP request

POST https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{resourceId}/setNamedPorts

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

zone

string

The name of the zone where the instance group is located.

resourceId

string

The name of the instance group where the named ports are updated.

Authorization requires the following IAM permission on the specified resource instanceGroup:

  • compute.instanceGroups.update

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).

Request body

The request body contains data with the following structure:

JSON representation
{
  "namedPorts": [
    {
      "name": string,
      "port": integer
    }
  ],
  "fingerprint": string
}
Fields
namedPorts[]

object

The list of named ports to set for this instance group.

namedPorts[].name

string

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

namedPorts[].port

integer

The port number, which can be a value between 1 and 65535.

fingerprint

string (bytes format)

The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with the