Method: instanceGroupManagers.applyUpdatesToInstances

Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.

HTTP request

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

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 managed instance group is located. Should conform to RFC1035.

resourceId

string

The name of the managed instance group, should conform to RFC1035.

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

  • compute.instanceGroupManagers.update

Request body

The request body contains data with the following structure:

JSON representation
{
  "instances": [
    string
  ],
  "minimalAction": enum,
  "mostDisruptiveAllowedAction": enum,
  "allInstances": boolean
}
Fields
instances[]

string

The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].

minimalAction

enum

The minimal action that you want to perform on each instance during the update:

  • REPLACE: At minimum, delete the instance and create it again.
  • RESTART: instances.stop the instance and start it again.
  • REFRESH: Do not stop the instance.
  • NONE: Do not disrupt the instance at all.
By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.

mostDisruptiveAllowedAction

enum

The most disruptive action that you want to perform on each instance during the update:

  • REPLACE: globalOperations.delete the instance and create it again.
  • RESTART: instances.stop the instance and start it again.
  • REFRESH: Do not stop the instance.
  • NONE: Do not disrupt the instance at all.
By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.

allInstances

boolean

Flag to update all instances instead of specified list of “instances”. If the flag is set to true then the instances may not be specified in the request.

Response body

If successful, the response body contains data with the following