REST Resource: instanceGroupManagers

Resource: InstanceGroupManager

Represents a Managed Instance Group resource.

An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.

For zonal Managed Instance Group, use the

instanceGroupManagers

resource.

For regional Managed Instance Group, use the

regionInstanceGroupManagers

resource.

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "zone": string,
  "region": string,
  "distributionPolicy": {
    object (DistributionPolicy)
  },
  "instanceTemplate": string,
  "versions": [
    {
      object (Version)
    }
  ],
  "allInstancesConfig": {
    object (AllInstancesConfig)
  },
  "instanceGroup": string,
  "targetPools": [
    string
  ],
  "baseInstanceName": string,
  "fingerprint": string,
  "currentActions": {
    object (ActionsSummary)
  },
  "status": {
    object (Status)
  },
  "targetSize": integer,
  "targetSizePolicy": {
    object (TargetSizePolicy)
  },
  "instanceFlexibilityPolicy": {
    object (InstanceFlexibilityPolicy)
  },
  "targetStoppedSize": integer,
  "targetSuspendedSize": integer,
  "listManagedInstancesResults": enum (ListManagedInstancesResults),
  "standbyPolicy": {
    object (StandbyPolicy)
  },
  "selfLink": string,
  "autoHealingPolicies": [
    {
      object (AutoHealingPolicy)
    }
  ],
  "updatePolicy": {
    object (UpdatePolicy)
  },
  "namedPorts": [
    {
      object (NamedPort)
    }
  ],
  "serviceAccount": string,
  "failoverAction": enum (FailoverAction),
  "statefulPolicy": {
    object (StatefulPolicy)
  },
  "instanceLifecyclePolicy": {
    object (InstanceLifecyclePolicy)
  },
  "params": {
    object (InstanceGroupManagerParams)
  },
  "satisfiesPzi": boolean,
  "satisfiesPzs": boolean,
  "resourcePolicies": {
    object (ResourcePolicies)
  },
  "multiMig": string
}
Fields
kind

string

[Output Only] The resource type, which is always

compute#instanceGroupManager

for managed instance groups.

id

string (uint64 format)

[Output Only] A unique identifier for this resource type. The server generates this identifier.

creationTimestamp

string

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

name

string

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

description

string

An optional description of this resource.

zone

string

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

region

string

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

distributionPolicy

object (DistributionPolicy)

Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.

instanceTemplate

string

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

, run

applyUpdatesToInstances

, or set the group's

updatePolicy.type

to

PROACTIVE

.

versions[]

object (Version)

Specifies the instance templates used by this managed instance group to create instances.

Each version is defined by an

instanceTemplate

and a

name

. Every version can appear at most once per instance group. This field overrides the top-level

instanceTemplate

field. Read more about the relationships between these fields. Exactly one

version

must leave the

targetSize

field unset. That version will be applied to all remaining instances. For more information, read about canary updates.

allInstancesConfig

object (AllInstancesConfig)

Specifies configuration that overrides the instance template configuration for the group.

instanceGroup

string

[Output Only] The URL of the Instance Group resource.

targetPools[]

string

The URLs for all TargetPool resources to which instances in the

instanceGroup

field are added. The target pools automatically apply to all of the instances in the managed instance group.

baseInstanceName

string

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](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\[[0-9]{1,10}\])?))

fingerprint

string (bytes format)

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 error

412 conditionNotMet

.

To see the latest fingerprint, make a

get()

request to retrieve an InstanceGroupManager.

A base64-encoded string.

currentActions

object (ActionsSummary)

[Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.

status

object (Status)

[Output Only] The status of this managed instance group.

targetSize

integer

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.

targetSizePolicy

object (TargetSizePolicy)

The policy that specifies how the MIG creates its VMs to achieve the target size.

instanceFlexibilityPolicy

object (InstanceFlexibilityPolicy)

Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration.

targetStoppedSize

integer

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

targetSuspendedSize

integer

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

listManagedInstancesResults

enum (ListManagedInstancesResults)

Pagination behavior of the

listManagedInstances

API method for this managed instance group.

standbyPolicy

object (StandbyPolicy)

Standby policy for stopped and suspended instances.

autoHealingPolicies[]

object (AutoHealingPolicy)

The autohealing policy for this managed instance group. You can specify only one value.

updatePolicy

object (UpdatePolicy)

The update policy for this managed instance group.

namedPorts[]

object (NamedPort)

[Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager.

serviceAccount

string

The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.

failoverAction

enum (FailoverAction)

The action to perform in case of zone failure. Only one value is supported,

NO_FAILOVER

. The default is

NO_FAILOVER

.

statefulPolicy

object (StatefulPolicy)

Stateful configuration for this Instanced Group Manager

instanceLifecyclePolicy

object (InstanceLifecyclePolicy)

The repair policy for this managed instance group.

params

object (InstanceGroupManagerParams)

Input only. Additional params passed with the request, but not persisted as part of resource payload.

satisfiesPzi

boolean

[Output Only] Reserved for future use.

satisfiesPzs

boolean

[Output Only] Reserved for future use.

resourcePolicies

object (ResourcePolicies)

Resource policies for this managed instance group.

multiMig

string

URL to the multi-MIG that this Managed Instance Group belongs to.

DistributionPolicy

JSON representation
{
  "zones": [
    {
      object (ZoneConfiguration)
    }
  ],
  "targetShape": enum (TargetShape)
}
Fields
zones[]

object (ZoneConfiguration)

Zones where the regional managed instance group will create and manage its instances.

targetShape

enum (TargetShape)

The distribution shape to which the group converges either proactively or on resize events (depending on the value set in

updatePolicy.instanceRedistributionType

).

ZoneConfiguration

JSON representation
{
  "zone": string
}
Fields
zone

string

The URL of the zone. The zone must exist in the region where the managed instance group is located.

TargetShape

Enums
EVEN The group schedules VM instance creation and deletion to achieve and maintain an even number of managed instances across the selected zones. The distribution is even when the number of managed instances does not differ by more than 1 between any two zones. Recommended for highly available serving workloads.
ANY The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability.
BALANCED The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads.
ANY_SINGLE_ZONE The group creates all VM instances within a single zone. The zone is selected based on the present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads with heavy interprocess communication.

Version

JSON representation
{
  "name": string,
  "instanceTemplate": string,
  "targetSize": {
    object (FixedOrPercent)
  }
}
Fields
name

string

Name of the version. Unique among all versions in the scope of this managed instance group.

instanceTemplate

string

The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the targetSize for this version is reached. The templates for existing instances in the group do not change unless you run

recreateInstances

, run

applyUpdatesToInstances

, or set the group's

updatePolicy.type

to

PROACTIVE

; in those cases, existing instances are updated until the targetSize for this version is reached.

targetSize

object (FixedOrPercent)

Specifies the intended number of instances to be created from the

instanceTemplate

. The final number of instances created from the template will be equal to:

  • If expressed as a fixed number, the minimum of either

    targetSize.fixed

    or

    instanceGroupManager.targetSize

    is used.

  • if expressed as a

    percent

    , the

    targetSize

    would be

    (targetSize.percent/100 * InstanceGroupManager.targetSize)

    If there is a remainder, the number is rounded.

If unset, this version will update any remaining instances not updated by another

version

. Read Starting a canary update for more information.

FixedOrPercent

Encapsulates numeric value that can be either absolute or relative.

JSON representation
{
  "fixed": integer,
  "percent": integer,
  "calculated": integer
}
Fields
fixed

integer

Specifies a fixed number of VM instances. This must be a positive integer.

percent

integer

Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify

80

for 80%.

calculated

integer

[Output Only] Absolute value of VM instances calculated based on the specific mode.

  • If the value is

    fixed

    , then the

    calculated

    value is equal to the

    fixed

    value.

  • If the value is a

    percent

    , then the

    calculated

    value is

    percent

    /100 *

    targetSize

    . For example, the

    calculated

    value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded.

AllInstancesConfig

JSON representation
{
  "properties": {
    object (InstancePropertiesPatch)
  }
}
Fields
properties

object (InstancePropertiesPatch)

Properties to set on all instances in the group.

You can add or modify properties using the

instanceGroupManagers.patch

or

regionInstanceGroupManagers.patch

. After setting

allInstancesConfig

on the group, you must update the group's instances to apply the configuration. To apply the configuration, set the group's

updatePolicy.type

field to use proactive updates or use the

applyUpdatesToInstances

method.

InstancePropertiesPatch

Represents the change that you want to make to the instance properties.

JSON representation
{
  "metadata": {
    string: string,
    ...
  },
  "labels": {
    string: string,
    ...
  }
}
Fields
metadata

map (key: string, value: string)

The metadata key-value pairs that you want to patch onto the instance. For more information, see Project and instance metadata.

labels

map (key: string, value: string)

The label key-value pairs that you want to patch onto the instance.

ActionsSummary

JSON representation
{
  "none": integer,
  "creating": integer,
  "creatingWithoutRetries": integer,
  "verifying": integer,
  "recreating": integer,
  "deleting": integer,
  "abandoning": integer,
  "restarting": integer,
  "refreshing": integer,
  "suspending": integer,
  "resuming": integer,
  "stopping": integer,
  "starting": integer
}
Fields
none

integer

[Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.

creating

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.

If you have disabled creation retries, this field will not be populated; instead, the

creatingWithoutRetries

field will be populated.

creatingWithoutRetries

integer

[Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's

targetSize

value accordingly.

verifying

integer

[Output Only] The number of instances in the managed instance group that are being verified. See the

managedInstances[].currentAction

property in the

listManagedInstances

method documentation.

recreating

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.

deleting

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.

abandoning

integer

[Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.

restarting

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.

refreshing

integer

[Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.

suspending

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.

resuming

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.

stopping

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.

starting

integer

[Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.

Status

JSON representation
{
  "isStable": boolean,
  "allInstancesConfig": {
    object (AllInstancesConfig)
  },
  "versionTarget": {
    object (VersionTarget)
  },
  "stateful": {
    object (Stateful)
  },
  "autoscaler": string,
  "bulkInstanceOperation": {
    object (BulkInstanceOperation)
  }
}
Fields
isStable

boolean

[Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.

allInstancesConfig

object (AllInstancesConfig)

[Output only] Status of all-instances configuration on the group.

versionTarget

object (VersionTarget)

[Output Only] A status of consistency of Instances' versions with their target version specified by

version

field on Instance Group Manager.

stateful

object (Stateful)

[Output Only] Stateful status of the given Instance Group Manager.

autoscaler

string

[Output Only] The URL of the Autoscaler that targets this instance group manager.

bulkInstanceOperation

object (BulkInstanceOperation)

[Output Only] The status of bulk instance operation.

AllInstancesConfig

JSON representation
{
  "effective": boolean,
  "currentRevision": string
}
Fields
effective

boolean

[Output Only] A bit indicating whether this configuration has been applied to all managed instances in the group.

currentRevision

string

[Output Only] Current all-instances configuration revision. This value is in RFC3339 text format.

VersionTarget

JSON representation
{
  "isReached": boolean
}
Fields
isReached

boolean

[Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by

version

field on Instance Group Manager.

Stateful

JSON representation
{
  "isStateful": boolean,
  "hasStatefulConfig": boolean,
  "perInstanceConfigs": {
    object (PerInstanceConfigs)
  }
}
Fields
isStateful
(deprecated)

boolean

[Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. This field is deprecated in favor of hasStatefulConfig.

hasStatefulConfig

boolean

[Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.

perInstanceConfigs

object (PerInstanceConfigs)

[Output Only] Status of per-instance configurations on the instances.

PerInstanceConfigs

JSON representation
{
  "allEffective": boolean
}
Fields
allEffective

boolean

A bit indicating if all of the group's per-instance configurations (listed in the output of a listPerInstanceConfigs API call) have status

EFFECTIVE

or there are no per-instance-configs.

BulkInstanceOperation

Bulk instance operation is the creation of VMs in a MIG when the targetSizePolicy.mode is set to BULK.

JSON representation
{
  "inProgress": boolean,
  "lastProgressCheck": {
    object (LastProgressCheck)
  }
}
Fields
inProgress

boolean

[Output Only] Informs whether bulk instance operation is in progress.

lastProgressCheck

object (LastProgressCheck)

[Output Only] Information from the last progress check of bulk instance operation.

LastProgressCheck

JSON representation
{
  "timestamp": string,
  "error": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string,
        "errorDetails": [
          {
            "errorInfo": {
              object (ErrorInfo)
            },
            "quotaInfo": {
              object (QuotaExceededInfo)
            },
            "help": {
              object (Help)
            },
            "localizedMessage": {
              object (LocalizedMessage)
            }
          }
        ]
      }
    ]
  }
}
Fields
timestamp

string (Timestamp format)

[Output Only] Timestamp of the last progress check of bulk instance operation. Timestamp is in RFC3339 text format.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

error

object

[Output Only] Errors encountered during bulk instance operation.

error.errors[]

object

[Output Only] The array of errors encountered while processing this operation.

error.errors[].code

string

[Output Only] The error type identifier for this error.

error.errors[].location

string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

error.errors[].message

string

[Output Only] An optional, human-readable error message.

error.errors[].errorDetails[]

object

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

error.errors[].errorDetails[].errorInfo

object (ErrorInfo)

error.errors[].errorDetails[].quotaInfo

object (QuotaExceededInfo)

error.errors[].errorDetails[].help

object (Help)

error.errors[].errorDetails[].localizedMessage

object (LocalizedMessage)

TargetSizePolicy

JSON representation
{
  "mode": enum (Mode)
}
Fields
mode

enum (Mode)

The mode of target size policy based on which the MIG creates its VMs individually or all at once.

Mode

Enums
UNSPECIFIED_MODE If mode is unspecified, MIG will behave as in the default INDIVIDUAL mode.
INDIVIDUAL The mode in which the MIG creates VMs individually. In this mode, if the MIG is unable to create a VM, the MIG will continue to create the other VMs in the group. This is the default mode.
BULK The mode in which the MIG creates VMs all at once. In this mode, if the MIG is unable to create even one VM, the MIG waits until all VMs can be created at the same time.

InstanceFlexibilityPolicy

JSON representation
{
  "instanceSelections": {
    string: {
      object (InstanceSelection)
    },
    ...
  },
  "provisioningModelMix": {
    object (ProvisioningModelMix)
  }
}
Fields
instanceSelections

map (key: string, value: object (InstanceSelection))

Named instance selections configuring properties that the group will use when creating new VMs.

provisioningModelMix

object (ProvisioningModelMix)

Provisioning model configuration used by this managed instance group to create instances.

InstanceSelection

JSON representation
{
  "machineTypes": [
    string
  ],
  "rank": integer
}
Fields
machineTypes[]

string

Full machine-type names, e.g. "n1-standard-16".

rank

integer

Preference of this instance selection. Lower number means higher preference. MIG will first try to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.

ProvisioningModelMix

JSON representation
{
  "standardCapacityBase": integer,
  "standardCapacityPercentAboveBase": integer
}
Fields
standardCapacityBase

integer

The base capacity that will always use Standard VMs to avoid risk of more preemption than the minimum capacity user needs. MIG will create only Standard VMs until it reaches standardCapacityBase and only then will start using standardCapacityPercentAboveBase to mix Spot with Standard VMs.

standardCapacityPercentAboveBase

integer

The percentage of target capacity that should use Standard VM. The remaining percentage will use Spot VMs. The percentage applies only to the capacity above standardCapacityBase.

ListManagedInstancesResults

Enums
PAGELESS

(Default) Pagination is disabled for the group's

listManagedInstances

API method.

maxResults

and

pageToken

query parameters are ignored and all instances are returned in a single response.

PAGINATED

Pagination is enabled for the group's

listManagedInstances

API method.

maxResults

and

pageToken

query parameters are respected.

StandbyPolicy

JSON representation
{
  "initialDelaySec": integer,
  "mode": enum (Mode)
}
Fields
initialDelaySec

integer

Specifies the number of seconds that the MIG should wait to suspend or stop a VM after that VM was created. The initial delay gives the initialization script the time to prepare your VM for a quick scale out. The value of initial delay must be between 0 and 3600 seconds. The default value is 0.

mode

enum (Mode)

Defines how a MIG resumes or starts VMs from a standby pool when the group scales out. The default mode is MANUAL.

Mode

Enums
MANUAL MIG does not automatically resume or start VMs in the standby pool when the group scales out.
SCALE_OUT_POOL MIG automatically resumes or starts VMs in the standby pool when the group scales out, and replenishes the standby pool afterwards.

AutoHealingPolicy

JSON representation
{
  "healthCheck": string,
  "initialDelaySec": integer
}
Fields
healthCheck

string

The URL for the health check that signals autohealing.

initialDelaySec

integer

The initial delay is the number of seconds that a new VM takes to initialize and run its startup script. During a VM's initial delay period, the MIG ignores unsuccessful health checks because the VM might be in the startup process. This prevents the MIG from prematurely recreating a VM. If the health check receives a healthy response during the initial delay, it indicates that the startup process is complete and the VM is ready. The value of initial delay must be between 0 and 3600 seconds. The default value is 0.

UpdatePolicy

JSON representation
{
  "type": enum (Type),
  "instanceRedistributionType": enum (Type),
  "minimalAction": enum (InstanceAction),
  "mostDisruptiveAllowedAction": enum (InstanceAction),
  "maxSurge": {
    object (FixedOrPercent)
  },
  "maxUnavailable": {
    object (FixedOrPercent)
  },
  "minReadySec": integer,
  "replacementMethod": enum (ReplacementMethod)
}
Fields
type

enum (Type)

The type of update process. You can specify either

PROACTIVE

so that the MIG automatically updates VMs to the latest configurations or

OPPORTUNISTIC

so that you can select the VMs that you want to update.

instanceRedistributionType

enum (Type)

The instance redistribution policy for regional managed instance groups. Valid values are:

  • PROACTIVE

    (default): The group attempts to maintain an even distribution of VM instances across zones in the region.

  • NONE

    : For non-autoscaled groups, proactive redistribution is disabled.

minimalAction

enum (InstanceAction)

Minimal action to be taken on an instance. Use this option to minimize disruption as much as possible or to apply a more disruptive action than is necessary.

  • To limit disruption as much as possible, set the minimal action to

    REFRESH

    . If your update requires a more disruptive action, Compute Engine performs the necessary action to execute the update.

  • To apply a more disruptive action than is strictly necessary, set the minimal action to

    RESTART

    or

    REPLACE

    . For example, Compute Engine does not need to restart a VM to change its metadata. But if your application reads instance metadata only when a VM is restarted, you can set the minimal action to

    RESTART

    in order to pick up metadata changes.

mostDisruptiveAllowedAction

enum (InstanceAction)

Most disruptive action that is allowed to be taken on an instance. You can specify either

NONE

to forbid any actions,

REFRESH

to avoid restarting the VM and to limit disruption as much as possible.

RESTART

to allow actions that can be applied without instance replacing or

REPLACE

to allow all possible actions. If the Updater determines that the minimal update action needed is more disruptive than most disruptive allowed action you specify it will not perform the update at all.

maxSurge

object (FixedOrPercent)

The maximum number of instances that can be created above the specified

targetSize

during the update process. This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded if necessary. The default value for

maxSurge

is a fixed value equal to the number of zones in which the managed instance group operates.

At least one of either

maxSurge

or

maxUnavailable

must be greater than 0. Learn more about

maxSurge

.

maxUnavailable

object (FixedOrPercent)

The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:

  • The instance's status is

    RUNNING

    .

  • If there is a health check on the instance group, the instance's health check status must be

    HEALTHY

    at least once. If there is no health check on the group, then the instance only needs to have a status of

    RUNNING

    to be considered available.

This value can be either a fixed number or, if the group has 10 or more instances, a percentage. If you set a percentage, the number of instances is rounded if necessary. The default value for

maxUnavailable

is a fixed value equal to the number of zones in which the managed instance group operates.

At least one of either

maxSurge

or

maxUnavailable

must be greater than 0. Learn more about

maxUnavailable

.

minReadySec

integer

Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].

replacementMethod

enum (ReplacementMethod)

What action should be used to replace instances. See minimalAction.REPLACE

Type

Enums
OPPORTUNISTIC

MIG will apply new configurations to existing VMs only when you selectively target specific or all VMs to be updated.

PROACTIVE

MIG will automatically apply new configurations to all or a subset of existing VMs and also to new VMs that are added to the group.

Type

Enums
NONE No action is being proactively performed in order to bring this IGM to its target instance distribution.
PROACTIVE This IGM will actively converge to its target instance distribution.

InstanceAction

Enums
REPLACE (Default.) Replace the instance according to the replacement method option.
RESTART Stop the instance and start it again.
REFRESH Do not stop the instance.
NONE Do not perform any action.

ReplacementMethod

Enums
SUBSTITUTE Default option: instances will be deleted and created (with a new name)
RECREATE Instances will be recreated (with the same name)

FailoverAction

Enums
UNKNOWN
NO_FAILOVER

StatefulPolicy

JSON representation
{
  "preservedState": {
    object (PreservedState)
  }
}
Fields
preservedState

object (PreservedState)

PreservedState

Configuration of preserved resources.

JSON representation
{
  "disks": {
    string: {
      object (DiskDevice)
    },
    ...
  },
  "internalIPs": {
    string: {
      object (NetworkIp)
    },
    ...
  },
  "externalIPs": {
    string: {
      object (NetworkIp)
    },
    ...
  }
}
Fields
disks

map (key: string, value: object (DiskDevice))

Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.

internalIPs

map (key: string, value: object (NetworkIp))

Internal network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.

externalIPs

map (key: string, value: object (NetworkIp))

External network IPs assigned to the instances that will be preserved on instance delete, update, etc. This map is keyed with the network interface name.

DiskDevice

JSON representation
{
  "autoDelete": enum (AutoDelete)
}
Fields
autoDelete

enum (AutoDelete)

These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in

READ_ONLY

mode cannot be auto-deleted.

AutoDelete

Enums
NEVER
ON_PERMANENT_INSTANCE_DELETION

NetworkIp

JSON representation
{
  "autoDelete": enum (AutoDelete)
}
Fields
autoDelete

enum (AutoDelete)

These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted.

InstanceLifecyclePolicy

JSON representation
{
  "forceUpdateOnRepair": enum (ForceUpdateOnRepair),
  "defaultActionOnFailure": enum (Action),
  "onFailedHealthCheck": enum (Action),
  "onRepair": {
    object (OnRepair)
  }
}
Fields
forceUpdateOnRepair

enum (ForceUpdateOnRepair)

A bit indicating whether to forcefully apply the group's latest configuration when repairing a VM. Valid options are:

  • NO (default): If configuration updates are available, they are not forcefully applied during repair. Instead, configuration updates are applied according to the group's update policy.
  • YES: If configuration updates are available, they are applied during repair.
defaultActionOnFailure

enum (Action)

The action that a MIG performs on a failed VM. If the value of the onFailedHealthCheck field is DEFAULT_ACTION, then the same action also applies to the VMs on which your application fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed VM by recreating it. For more information, see About repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM.

onFailedHealthCheck

enum (Action)

The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are:

  • DEFAULT_ACTION (default)

    : MIG uses the same action configured for instanceLifecyclePolicy.defaultActionOnFailure field.

  • REPAIR

    : MIG automatically repairs an unhealthy VM by recreating it.

  • DO_NOTHING

    : MIG doesn't repair an unhealthy VM.

  • For more information, see About repairing VMs in a MIG.

onRepair

object (OnRepair)

Configuration for VM repairs in the MIG.

ForceUpdateOnRepair

Enums
NO
YES

Action

Enums
REPAIR (default): MIG automatically repairs a failed VM by recreating it. For more information, see About repairing VMs in a MIG.
DO_NOTHING MIG does not repair a failed or an unhealthy VM.
DELETE MIG deletes a failed or an unhealthy VM. Deleting the VM decreases the target size of the MIG.

Action

Enums
DEFAULT_ACTION (Default) MIG uses the same action configured for instanceLifecyclePolicy.defaultActionOnFailure field.
REPAIR MIG automatically repairs an unhealthy VM by recreating it.
DO_NOTHING MIG doesn't repair an unhealthy VM.

OnRepair

Configuration for VM repairs in the MIG.

JSON representation
{
  "allowChangingZone": enum (AllowChangingZone)
}
Fields
allowChangingZone

enum (AllowChangingZone)

Specifies whether the MIG can change a VM's zone during a repair.

AllowChangingZone

Specifies whether the MIG can change a VM's zone during a repair.

Enums
NO [Default] MIG cannot change a VM's zone during a repair.
YES MIG can select a different zone for the VM during a repair.

InstanceGroupManagerParams

Input only additional params for instance group manager creation.

JSON representation
{
  "resourceManagerTags": {
    string: string,
    ...
  }
}
Fields
resourceManagerTags

map (key: string, value: string)

Resource manager tags to bind to the managed instance group. The tags are key-value pairs. Keys must be in the format tagKeys/123 and values in the format tagValues/456. For more information, see Manage tags for resources.

ResourcePolicies

JSON representation
{
  "workloadPolicy": string
}
Fields
workloadPolicy

string

The URL of the workload policy that is specified for this managed instance group. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy:

Methods

abandonInstances

The method compute.beta.InstanceGroupManagersService.AbandonInstances is not available in Trusted Cloud by S3NS.

aggregatedList

The method compute.beta.InstanceGroupManagersService.AggregatedList is not available in Trusted Cloud by S3NS.

applyUpdatesToInstances

The method compute.beta.InstanceGroupManagersService.ApplyUpdatesToInstances is not available in Trusted Cloud by S3NS.

createInstances

The method compute.beta.InstanceGroupManagersService.CreateInstances is not available in Trusted Cloud by S3NS.

delete

The method compute.beta.InstanceGroupManagersService.Delete is not available in Trusted Cloud by S3NS.

deleteInstances

The method compute.beta.InstanceGroupManagersService.DeleteInstances is not available in Trusted Cloud by S3NS.

deletePerInstanceConfigs

The method compute.beta.InstanceGroupManagersService.DeletePerInstanceConfigs is not available in Trusted Cloud by S3NS.

get

The method compute.beta.InstanceGroupManagersService.Get is not available in Trusted Cloud by S3NS.

insert

The method compute.beta.InstanceGroupManagersService.Insert is not available in Trusted Cloud by S3NS.

list

The method compute.beta.InstanceGroupManagersService.List is not available in Trusted Cloud by S3NS.

listErrors

The method compute.beta.InstanceGroupManagersService.ListErrors is not available in Trusted Cloud by S3NS.

listManagedInstances

The method compute.beta.InstanceGroupManagersService.ListManagedInstances is not available in Trusted Cloud by S3NS.

listPerInstanceConfigs

The method compute.beta.InstanceGroupManagersService.ListPerInstanceConfigs is not available in Trusted Cloud by S3NS.

patch

The method compute.beta.InstanceGroupManagersService.Patch is not available in Trusted Cloud by S3NS.

patchPerInstanceConfigs

The method compute.beta.InstanceGroupManagersService.PatchPerInstanceConfigs is not available in Trusted Cloud by S3NS.

recreateInstances

The method compute.beta.InstanceGroupManagersService.RecreateInstances is not available in Trusted Cloud by S3NS.

resize

The method compute.beta.InstanceGroupManagersService.Resize is not available in Trusted Cloud by S3NS.

resizeAdvanced

The method compute.beta.InstanceGroupManagersService.ResizeAdvanced is not available in Trusted Cloud by S3NS.

resumeInstances

The method compute.beta.InstanceGroupManagersService.ResumeInstances is not available in Trusted Cloud by S3NS.

setAutoHealingPolicies
(deprecated)

The method compute.beta.InstanceGroupManagersService.SetAutoHealingPolicies is not available in Trusted Cloud by S3NS.

setInstanceTemplate

The method compute.beta.InstanceGroupManagersService.SetInstanceTemplate is not available in Trusted Cloud by S3NS.

setTargetPools

The method compute.beta.InstanceGroupManagersService.SetTargetPools is not available in Trusted Cloud by S3NS.

startInstances

The method compute.beta.InstanceGroupManagersService.StartInstances is not available in Trusted Cloud by S3NS.

stopInstances

The method compute.beta.InstanceGroupManagersService.StopInstances is not available in Trusted Cloud by S3NS.

suspendInstances

The method compute.beta.InstanceGroupManagersService.SuspendInstances is not available in Trusted Cloud by S3NS.

testIamPermissions

The method compute.beta.InstanceGroupManagersService.TestPermissions is not available in Trusted Cloud by S3NS.

update

The method compute.beta.InstanceGroupManagersService.Update is not available in Trusted Cloud by S3NS.

updatePerInstanceConfigs

The method compute.beta.InstanceGroupManagersService.UpdatePerInstanceConfigs is not available in Trusted Cloud by S3NS.