[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/compute/docs/instance-groups/view-instance-flexibility-configuration [Back]  [Original]

View instance flexibility  |  Compute Engine  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

View instance flexibility Stay organized with collections Save and categorize content based on your preferences.

This document describes how to view the instance flexibility configuration in a managed instance group (MIG) and the machine types used by each VM in the group.

After you add or make changes to instance flexibility in a MIG, you can do the following:

Before you begin

View the instance flexibility configuration

Console

  1. In the Google Cloud console, go to the Instance groups page.

    Go to Instance groups

  2. In the Name column, click the name of the MIG of which you want to view the instance flexibility configuration.

    The overview page of the MIG opens.

  3. Click the Details tab.

    In the Instance flexibility section, the Instance selections table shows the instance selection name, rank, and the machine types in a selection. If the MIG doesn't have instance flexibility configured, the Instance flexibility section is not shown.

gcloud

To view the instance flexibility configuration, use the instance-groups managed describe command. Include the --format flag to filter the instanceFlexibilityPolicy.instanceSelections properties.

  gcloud compute instance-groups managed describe INSTANCE_GROUP_NAME \
      --region REGION \
      --format="json(instanceFlexibilityPolicy.instanceSelections)"

The following is a sample output:

{
  "instanceFlexibilityPolicy": {
    "instanceSelections": {
      "instance-selection-1": {
        "machineTypes": [
          "n1-standard-16",
          "n2-standard-16",
          "e2-standard-16"
        ],
        "rank": 1
      }
    }
  }
}

If a MIG doesn't have instance flexibility configured, the output returns null.

Replace the following:

REST

To view the instance flexibility configuration, use the regionInstanceGroupManagers.get method. Include the fields parameter in the request URL to filter the instanceFlexibilityPolicy.instanceSelections properties.

  GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/instanceGroupManagers/INSTANCE_GROUP_NAME?fields=instanceFlexibilityPolicy.instanceSelections

The following is a sample output:

{
  "instanceFlexibilityPolicy": {
    "instanceSelections": {
      "instance-selection-1": {
        "machineTypes": [
          "n1-standard-16",
          "n2-standard-16",
          "e2-standard-16"
        ],
        "rank": 1
      }
    }
  }
}

If a MIG doesn't have instance flexibility configured, the output returns null.

Replace the following:

View the machine types used by each VM

Console

  1. In the Google Cloud console, go to the Instance groups page.

    Go to Instance groups

  2. In the Name column, click the name of the MIG in which you want view the machine types used by each VM.

    The Overview page of the MIG opens, which lists all VMs in the group, their machine types, and other details.

gcloud

To view the machine types used by each VM in a MIG, list the VMs using the instance-groups managed list-instances command and include the --format flag to filter the propertiesFromFlexibilityPolicy.machineType field. You can also filter other fields as needed.

  gcloud compute instance-groups managed list-instances INSTANCE_GROUP_NAME \
      --region REGION \
      --format='(name,instanceStatus,currentAction,propertiesFromFlexibilityPolicy.machineType,lastAttempt.errors.errors)'

The following is a sample output:

NAME: example-mig-0md2
STATUS: RUNNING
ACTION: NONE
MACHINE_TYPE: n1-standard-16
LAST_ERROR:

NAME: example-mig-vbgg
STATUS: RUNNING
ACTION: NONE
MACHINE_TYPE: n1-standard-16
LAST_ERROR:

Replace the following:

REST

To view the machine types used by each VM in a MIG, list the VMs using the listManagedInstances method and check the propertiesFromFlexibilityPolicy.machineType field in the response.

  POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/instanceGroupManagers/INSTANCE_GROUP_NAME/listManagedInstances

The following is a sample output; look for the propertiesFromFlexibilityPolicy field in which the machineType field of a VM is set.

{
  "managedInstances": [
    {
      "instance": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-b/instances/example-mig-0md2",
      "instanceStatus": "RUNNING",
      "id": "2656095434923471959",
      "version": {
        "instanceTemplate": "https://www.googleapis.com/compute/v1/projects/example-project/global/instanceTemplates/example-instance-template"
      },
      "targetStatus": "RUNNING",
      "name": "example-mig-0md2",
      "propertiesFromFlexibilityPolicy": {
        "machineType": "n1-standard-16"
      }
    },
    {
      "instance": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-b/instances/example-mig-vbgg",
      "instanceStatus": "RUNNING",
      "currentAction": "NONE",
      "id": "9171259522409694366",
      "version": {
        "instanceTemplate": "https://www.googleapis.com/compute/v1/projects/example-project/global/instanceTemplates/example-instance-template"
      },
      "targetStatus": "RUNNING",
      "name": "example-mig-vbgg",
      "propertiesFromFlexibilityPolicy": {
        "machineType": "n1-standard-16"
      }
    }
  ]
}

Replace the following:

Monitor instance distribution

While checking your static instance flexibility policy and listing individual VM machine types provides a snapshot of your current configuration, observing how your MIG allocates capacity over time requires real-time monitoring.

You can use the GCE MIG Instance Distribution Monitoring dashboard in Cloud Monitoring to observe runtime instance distributions across zones and machine types in real-time. This visibility helps you verify that your VMs are distributed across your intended ranks and locations when demand or capacity shifts.

For instructions on how to access the monitoring dashboard, see Monitor instance distribution in MIGs.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page