Method: instanceGroups.insert

Creates an instance group in the specified project using the parameters that are included in the request.

HTTP request

POST https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/instanceGroups

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

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

  • compute.instanceGroups.create
zone

string

The name of the zone where you want to create the instance group.

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
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "namedPorts": [
    {
      "name": string,
      "port": integer
    }
  ],
  "network": string,
  "fingerprint": string,
  "zone": string,
  "selfLink": string,
  "size": integer,
  "region": string,
  "subnetwork": string,
  "kind": string
}
Fields
id

string (uint64 format)

[Output Only] A unique identifier for this instance group, generated by the server.

creationTimestamp

string

[Output Only] The creation timestamp for this instance group in RFC3339 text format.

name

string

[REQUIRED] The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.

description

string

An optional description of this resource. Provide this property when you create the resource.

namedPorts[]

object

Assigns a name to a port number. For example: {name: "http", port: 80}

This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}]

Named ports apply to all instances in 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.

network

string

[Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).

fingerprint

string (bytes format)

[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.

A base64-encoded string.

zone

string

[Output Only] The URL of the zone where the instance group is located (for zonal resources).