- Resource: InstanceGroupManager
- JSON representation
- DistributionPolicy
- ZoneConfiguration
- TargetShape
- Version
- AllInstancesConfig
- InstancePropertiesPatch
- ActionsSummary
- Status
- AllInstancesConfig
- VersionTarget
- Stateful
- PerInstanceConfigs
- InstanceFlexibilityPolicy
- InstanceSelection
- ListManagedInstancesResults
- StandbyPolicy
- Mode
- AutoHealingPolicy
- UpdatePolicy
- Type
- Type
- InstanceAction
- ReplacementMethod
- StatefulPolicy
- PreservedState
- DiskDevice
- AutoDelete
- NetworkIp
- InstanceLifecyclePolicy
- ForceUpdateOnRepair
- Action
- Methods
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 ( |
Fields | |
---|---|
kind |
[Output Only] The resource type, which is always
for managed instance groups. |
id |
[Output Only] A unique identifier for this resource type. The server generates this identifier. |
creation |
[Output Only] The creation timestamp for this managed instance group in RFC3339 text format. |
name |
The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. |
description |
An optional description of this resource. |
zone |
[Output Only] The URL of a zone where the managed instance group is located (for zonal resources). |
region |
[Output Only] The URL of the region where the managed instance group resides (for regional resources). |
distribution |
Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. |
instance |
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
, run
, or set the group's
to
. |
versions[] |
Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an
and a
. Every version can appear at most once per instance group. This field overrides the top-level
field. Read more about the relationships between these fields. Exactly one
must leave the
field unset. That version will be applied to all remaining instances. For more information, read about canary updates. |
all |
Specifies configuration that overrides the instance template configuration for the group. |
instance |
[Output Only] The URL of the Instance Group resource. |
target |
The URLs for all TargetPool resources to which instances in the
field are added. The target pools automatically apply to all of the instances in the managed instance group. |
base |
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 |
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
. To see the latest fingerprint, make a
request to retrieve an InstanceGroupManager. A base64-encoded string. |
current |
[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 |
[Output Only] The status of this managed instance group. |
target |
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. |
instance |
Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration. |
target |
The target number of stopped instances for this managed instance group. This number changes when you:
|
target |
The target number of suspended instances for this managed instance group. This number changes when you:
|
list |
Pagination behavior of the
API method for this managed instance group. |
standby |
Standby policy for stopped and suspended instances. |
self |
[Output Only] The URL for this managed instance group. The server defines this URL. |
auto |
The autohealing policy for this managed instance group. You can specify only one value. |
update |
The update policy for this managed instance group. |
named |
[Output Only] Named ports configured on the Instance Groups complementary to this Instance Group Manager. |
stateful |
Stateful configuration for this Instanced Group Manager |
instance |
The repair policy for this managed instance group. |
satisfies |
[Output Only] Reserved for future use. |
satisfies |
[Output Only] Reserved for future use. |
DistributionPolicy
JSON representation |
---|
{ "zones": [ { object ( |
Fields | |
---|---|
zones[] |
Zones where the regional managed instance group will create and manage its instances. |
target |
The distribution shape to which the group converges either proactively or on resize events (depending on the value set in
). |
ZoneConfiguration
JSON representation |
---|
{ "zone": string } |
Fields | |
---|---|
zone |
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 ( |
Fields | |
---|---|
name |
Name of the version. Unique among all versions in the scope of this managed instance group. |
instance |
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
, run
, or set the group's
to
; in those cases, existing instances are updated until the |
target |
Specifies the intended number of instances to be created from the
. The final number of instances created from the template will be equal to:
. Read Starting a canary update for more information. |
AllInstancesConfig
JSON representation |
---|
{
"properties": {
object ( |
Fields | |
---|---|
properties |
Properties to set on all instances in the group. You can add or modify properties using the
or
. After setting
on the group, you must update the group's instances to apply the configuration. To apply the configuration, set the group's
field to use proactive updates or use the
method. |
InstancePropertiesPatch
Represents the change that you want to make to the instance properties.
JSON representation |
---|
{ "metadata": { string: string, ... }, "labels": { string: string, ... } } |
Fields | |
---|---|
metadata |
The metadata key-value pairs that you want to patch onto the instance. For more information, see Project and instance metadata. |
labels |
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 |
[Output Only] The number of instances in the managed instance group that are running and have no scheduled actions. |
creating |
[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
field will be populated. |
creating |
[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
value accordingly. |
verifying |
[Output Only] The number of instances in the managed instance group that are being verified. See the
property in the
method documentation. |
recreating |
[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 |
[Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. |
abandoning |
[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 |
[Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. |
refreshing |
[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 |
[Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended. |
resuming |
[Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed. |
stopping |
[Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped. |
starting |
[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 ( |
Fields | |
---|---|
is |
[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. |
all |
[Output only] Status of all-instances configuration on the group. |
version |
[Output Only] A status of consistency of Instances' versions with their target version specified by
field on Instance Group Manager. |
stateful |
[Output Only] Stateful status of the given Instance Group Manager. |
autoscaler |
[Output Only] The URL of the Autoscaler that targets this instance group manager. |
AllInstancesConfig
JSON representation |
---|
{ "effective": boolean, "currentRevision": string } |
Fields | |
---|---|
effective |
[Output Only] A bit indicating whether this configuration has been applied to all managed instances in the group. |
current |
[Output Only] Current all-instances configuration revision. This value is in RFC3339 text format. |
VersionTarget
JSON representation |
---|
{ "isReached": boolean } |
Fields | |
---|---|
is |
[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
field on Instance Group Manager. |
Stateful
JSON representation |
---|
{
"hasStatefulConfig": boolean,
"perInstanceConfigs": {
object ( |
Fields | |
---|---|
has |
[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. |
per |
[Output Only] Status of per-instance configurations on the instances. |
PerInstanceConfigs
JSON representation |
---|
{ "allEffective": boolean } |
Fields | |
---|---|
all |
A bit indicating if all of the group's per-instance configurations (listed in the output of a listPerInstanceConfigs API call) have status
or there are no per-instance-configs. |
InstanceFlexibilityPolicy
JSON representation |
---|
{
"instanceSelections": {
string: {
object ( |
Fields | |
---|---|
instance |
Named instance selections configuring properties that the group will use when creating new VMs. |
InstanceSelection
JSON representation |
---|
{ "machineTypes": [ string ], "rank": integer } |
Fields | |
---|---|
machine |
Full machine-type names, e.g. "n1-standard-16". |
rank |
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. |
ListManagedInstancesResults
Enums | |
---|---|
PAGELESS |
(Default) Pagination is disabled for the group's
API method.
and
query parameters are ignored and all instances are returned in a single response. |
PAGINATED |
Pagination is enabled for the group's
API method.
and
query parameters are respected. |
StandbyPolicy
JSON representation |
---|
{
"initialDelaySec": integer,
"mode": enum ( |
Fields | |
---|---|
initial |
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 |
Defines how a MIG resumes or starts VMs from a standby pool when the group scales out. The default mode is |
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 | |
---|---|
health |
The URL for the health check that signals autohealing. |
initial |
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 ( |
Fields | |
---|---|
type |
The type of update process. You can specify either
so that the MIG automatically updates VMs to the latest configurations or
so that you can select the VMs that you want to update. |
instance |
The instance redistribution policy for regional managed instance groups. Valid values are:
|
minimal |
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.
|
most |
Most disruptive action that is allowed to be taken on an instance. You can specify either
to forbid any actions,
to avoid restarting the VM and to limit disruption as much as possible.
to allow actions that can be applied without instance replacing or
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. |
max |
The maximum number of instances that can be created above the specified
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
is a fixed value equal to the number of zones in which the managed instance group operates. At least one of either
or
must be greater than 0. Learn more about
. |
max |
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:
is a fixed value equal to the number of zones in which the managed instance group operates. At least one of either
or
must be greater than 0. Learn more about
. |
replacement |
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) |
StatefulPolicy
JSON representation |
---|
{
"preservedState": {
object ( |
Fields | |
---|---|
preserved |
|
PreservedState
Configuration of preserved resources.
JSON representation |
---|
{ "disks": { string: { object ( |
Fields | |
---|---|
disks |
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. |
internal |
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. |
external |
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 ( |
Fields | |
---|---|
auto |
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
mode cannot be auto-deleted. |
AutoDelete
Enums | |
---|---|
NEVER |
|
ON_PERMANENT_INSTANCE_DELETION |
NetworkIp
JSON representation |
---|
{
"autoDelete": enum ( |
Fields | |
---|---|
auto |
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 ( |
Fields | |
---|---|
force |
A bit indicating whether to forcefully apply the group's latest configuration when repairing a VM. Valid options are:
|
default |
The action that a MIG performs on a failed or an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are
|
ForceUpdateOnRepair
Enums | |
---|---|
NO |
|
YES |
Action
Enums | |
---|---|
REPAIR |
(Default) MIG automatically repairs a failed or an unhealthy 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. |
Methods |
|
---|---|
|
The method compute.v1.InstanceGroupManagersService.AbandonInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.AggregatedList is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.ApplyUpdatesToInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.CreateInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.Delete is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.DeleteInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.DeletePerInstanceConfigs is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.Get is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.Insert is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.List is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.ListErrors is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.ListManagedInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.ListPerInstanceConfigs is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.Patch is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.PatchPerInstanceConfigs is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.RecreateInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.Resize is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.ResumeInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.SetInstanceTemplate is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.SetTargetPools is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.StartInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.StopInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.SuspendInstances is not available in this (s3nsapis.fr) universe. |
|
The method compute.v1.InstanceGroupManagersService.UpdatePerInstanceConfigs is not available in this (s3nsapis.fr) universe. |