v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-131,0021,0174.3 MB
regionInstanceGroupManagers

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, seeUpdating instances in a MIG.

patch/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}

Path parameters

projectstring required

Project ID for this request.

regionstring required

Name of the region scoping this request.

instanceGroupManagerstring required

The name of the instance group manager.

Query parameters

requestIdstring

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

instanceGroupstring

Output only. The URL of the Instance Group resource.

selfLinkstring

Output only. The URL for this managed instance group. The server defines this URL.

targetSizeinteger

The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.

baseInstanceNamestring

The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. The maximum character length is 58 and the name must comply with RFC1035 format.

When a VM is created in the group, the MIG appends a hyphen and a random four-character string to the base instance name. If you want the MIG to assign sequential numbers instead of a random string, then end the base instance name with a hyphen followed by one or more hash symbols. The hash symbols indicate the number of digits. For example, a base instance name of "vm-###" results in "vm-001" as a VM name. @pattern a-z

kindstring

Output only. The resource type, which is alwayscompute#instanceGroupManager for managed instance groups.

targetPoolsstring[]

The URLs for all TargetPool resources to which instances in theinstanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.

instanceTemplatestring

The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.

satisfiesPzsboolean

Output only. Reserved for future use.

targetSuspendedSizeinteger

The target number of suspended instances for this managed instance group. This number changes when you:

  • Suspend instance using the suspendInstances method or resume instances using the resumeInstances method.
  • Manually change the targetSuspendedSize using the update method.
fingerprintstring byte

Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error412 conditionNotMet.

To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.

satisfiesPziboolean

Output only. Reserved for future use.

descriptionstring

An optional description of this resource.

listManagedInstancesResults'PAGELESS' | 'PAGINATED'

Pagination behavior of the listManagedInstances API method for this managed instance group.

zonestring

Output only. The URL of azone where the managed instance group is located (for zonal resources).

idstring uint64

Output only. A unique identifier for this resource type. The server generates this identifier.

namestring

The name of the managed instance group. The name must be 1-63 characters long, and comply withRFC1035.

targetStoppedSizeinteger

The target number of stopped instances for this managed instance group. This number changes when you:

  • Stop instance using the stopInstances method or start instances using the startInstances method.
  • Manually change the targetStoppedSize using the update method.
regionstring

Output only. [Output Only] The URL of theregion where the managed instance group resides (for regional resources).

creationTimestampstring

Output only. The creation timestamp for this managed instance group inRFC3339 text format.

Response

Successful response