{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-emr/json-schema/amazon-emr-list-instance-groups-output-schema.json",
  "title": "ListInstanceGroupsOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-emr-instance-group-api-openapi.yml#/components/schemas/ListInstanceGroupsOutput",
  "type": "object",
  "properties": {
    "InstanceGroups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InstanceGroup"
      },
      "description": "The list of instance groups for the cluster and given filters."
    },
    "Marker": {
      "type": "string",
      "description": "The pagination token that indicates the next set of results to retrieve."
    }
  },
  "$defs": {
    "AutoScalingPolicyDescription": {
      "type": "object",
      "properties": {
        "Status": {
          "$ref": "#/$defs/AutoScalingPolicyStatus"
        },
        "Constraints": {
          "$ref": "#/$defs/ScalingConstraints"
        },
        "Rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScalingRule"
          },
          "description": "The scale-in and scale-out rules that comprise the automatic scaling policy."
        }
      }
    },
    "AutoScalingPolicyStateChangeReason": {
      "type": "object",
      "properties": {
        "Code": {
          "type": "string",
          "enum": [
            "USER_REQUEST",
            "PROVISION_FAILURE",
            "CLEANUP_FAILURE"
          ],
          "description": "The code indicating the reason for the change in status.USER_REQUEST indicates that the scaling policy status was changed by a user. PROVISION_FAILURE indicates that the status change was because the policy failed to provision. CLEANUP_FAILURE indicates an error."
        },
        "Message": {
          "type": "string",
          "description": "A friendly, more verbose message that accompanies an automatic scaling policy state change."
        }
      }
    },
    "AutoScalingPolicyStatus": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "PENDING",
            "ATTACHING",
            "ATTACHED",
            "DETACHING",
            "DETACHED",
            "FAILED"
          ],
          "description": "Indicates the status of the automatic scaling policy."
        },
        "StateChangeReason": {
          "$ref": "#/$defs/AutoScalingPolicyStateChangeReason"
        }
      }
    },
    "CloudWatchAlarmDefinition": {
      "type": "object",
      "properties": {
        "ComparisonOperator": {
          "type": "string",
          "enum": [
            "GREATER_THAN_OR_EQUAL",
            "GREATER_THAN",
            "LESS_THAN",
            "LESS_THAN_OR_EQUAL"
          ],
          "description": "Determines how the metric specified by MetricName is compared to the value specified by Threshold."
        },
        "EvaluationPeriods": {
          "type": "integer",
          "description": "The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1."
        },
        "MetricName": {
          "type": "string",
          "description": "The name of the CloudWatch metric that is watched to determine an alarm condition."
        },
        "Namespace": {
          "type": "string",
          "description": "The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce."
        },
        "Period": {
          "type": "integer",
          "description": "The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300."
        },
        "Statistic": {
          "type": "string",
          "enum": [
            "SAMPLE_COUNT",
            "AVERAGE",
            "SUM",
            "MINIMUM",
            "MAXIMUM"
          ],
          "description": "The statistic to apply to the metric associated with the alarm. The default is AVERAGE."
        },
        "Threshold": {
          "type": "number",
          "description": "The value against which the specified statistic is compared."
        },
        "Unit": {
          "type": "string",
          "enum": [
            "NONE",
            "SECONDS",
            "MICRO_SECONDS",
            "MILLI_SECONDS",
            "BYTES",
            "KILO_BYTES",
            "MEGA_BYTES",
            "GIGA_BYTES",
            "TERA_BYTES",
            "BITS",
            "KILO_BITS",
            "MEGA_BITS",
            "GIGA_BITS",
            "TERA_BITS",
            "PERCENT",
            "COUNT",
            "BYTES_PER_SECOND",
            "KILO_BYTES_PER_SECOND",
            "MEGA_BYTES_PER_SECOND",
            "GIGA_BYTES_PER_SECOND",
            "TERA_BYTES_PER_SECOND",
            "BITS_PER_SECOND",
            "KILO_BITS_PER_SECOND",
            "MEGA_BITS_PER_SECOND",
            "GIGA_BITS_PER_SECOND",
            "TERA_BITS_PER_SECOND",
            "COUNT_PER_SECOND"
          ],
          "description": "The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric."
        },
        "Dimensions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetricDimension"
          },
          "description": "A CloudWatch metric dimension."
        }
      },
      "required": [
        "ComparisonOperator",
        "MetricName",
        "Period",
        "Threshold"
      ]
    },
    "Configuration": {
      "type": "object",
      "properties": {
        "Classification": {
          "type": "string",
          "description": "The classification within a configuration."
        },
        "Configurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Configuration"
          },
          "description": "A list of additional configurations to apply within a configuration object."
        },
        "Properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A set of properties specified within a configuration classification."
        }
      }
    },
    "EbsBlockDevice": {
      "type": "object",
      "properties": {
        "VolumeSpecification": {
          "$ref": "#/$defs/VolumeSpecification"
        },
        "Device": {
          "type": "string",
          "description": "The device name that is exposed to the instance, such as /dev/sdh."
        }
      }
    },
    "InstanceGroup": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "The identifier of the instance group."
        },
        "Name": {
          "type": "string",
          "description": "The name of the instance group."
        },
        "Market": {
          "type": "string",
          "enum": [
            "ON_DEMAND",
            "SPOT"
          ],
          "description": "The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT."
        },
        "InstanceGroupType": {
          "type": "string",
          "enum": [
            "MASTER",
            "CORE",
            "TASK"
          ],
          "description": "The type of the instance group. Valid values are MASTER, CORE or TASK."
        },
        "BidPrice": {
          "type": "string",
          "description": "The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%."
        },
        "InstanceType": {
          "type": "string",
          "description": "The Amazon EC2 instance type for all instances in the instance group."
        },
        "RequestedInstanceCount": {
          "type": "integer",
          "description": "The target number of instances for the instance group."
        },
        "RunningInstanceCount": {
          "type": "integer",
          "description": "The number of instances currently running in this instance group."
        },
        "Status": {
          "$ref": "#/$defs/InstanceGroupStatus"
        },
        "Configurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Configuration"
          },
          "description": "Amazon EMR releases 4.x or later. The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task)."
        },
        "ConfigurationsVersion": {
          "type": "integer",
          "description": "The version number of the requested configuration specification for this instance group."
        },
        "LastSuccessfullyAppliedConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Configuration"
          },
          "description": "A list of configurations that were successfully applied for an instance group last time."
        },
        "LastSuccessfullyAppliedConfigurationsVersion": {
          "type": "integer",
          "description": "The version number of a configuration specification that was successfully applied for an instance group last time."
        },
        "EbsBlockDevices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EbsBlockDevice"
          },
          "description": "The EBS block devices that are mapped to this instance group."
        },
        "EbsOptimized": {
          "type": "boolean",
          "description": "If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O."
        },
        "ShrinkPolicy": {
          "$ref": "#/$defs/ShrinkPolicy"
        },
        "AutoScalingPolicy": {
          "$ref": "#/$defs/AutoScalingPolicyDescription"
        },
        "CustomAmiId": {
          "type": "string",
          "description": "The custom AMI ID to use for the provisioned instance group."
        }
      }
    },
    "InstanceGroupStateChangeReason": {
      "type": "object",
      "properties": {
        "Code": {
          "type": "string",
          "enum": [
            "INTERNAL_ERROR",
            "VALIDATION_ERROR",
            "INSTANCE_FAILURE",
            "CLUSTER_TERMINATED"
          ],
          "description": "The programmable code for the state change reason."
        },
        "Message": {
          "type": "string",
          "description": "The status change reason description."
        }
      }
    },
    "InstanceGroupStatus": {
      "type": "object",
      "properties": {
        "State": {
          "type": "string",
          "enum": [
            "PROVISIONING",
            "BOOTSTRAPPING",
            "RUNNING",
            "RECONFIGURING",
            "RESIZING",
            "SUSPENDED",
            "TERMINATING",
            "TERMINATED",
            "ARRESTED",
            "SHUTTING_DOWN",
            "ENDED"
          ],
          "description": "The current state of the instance group."
        },
        "StateChangeReason": {
          "$ref": "#/$defs/InstanceGroupStateChangeReason"
        },
        "Timeline": {
          "$ref": "#/$defs/InstanceGroupTimeline"
        }
      }
    },
    "InstanceGroupTimeline": {
      "type": "object",
      "properties": {
        "CreationDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The creation date and time of the instance group."
        },
        "ReadyDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the instance group became ready to perform tasks."
        },
        "EndDateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the instance group terminated."
        }
      }
    },
    "InstanceResizePolicy": {
      "type": "object",
      "properties": {
        "InstancesToTerminate": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specific list of instances to be terminated when shrinking an instance group."
        },
        "InstancesToProtect": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specific list of instances to be protected when shrinking an instance group."
        },
        "InstanceTerminationTimeout": {
          "type": "integer",
          "description": "Decommissioning timeout override for the specific list of instances to be terminated."
        }
      }
    },
    "MetricDimension": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The dimension name."
        },
        "Value": {
          "type": "string",
          "description": "The dimension value."
        }
      }
    },
    "ScalingAction": {
      "type": "object",
      "properties": {
        "Market": {
          "type": "string",
          "enum": [
            "ON_DEMAND",
            "SPOT"
          ],
          "description": "Not available for instance groups. Instance groups use the market type specified for the group."
        },
        "SimpleScalingPolicyConfiguration": {
          "$ref": "#/$defs/SimpleScalingPolicyConfiguration"
        }
      },
      "required": [
        "SimpleScalingPolicyConfiguration"
      ]
    },
    "ScalingConstraints": {
      "type": "object",
      "properties": {
        "MinCapacity": {
          "type": "integer",
          "description": "The lower boundary of Amazon EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary."
        },
        "MaxCapacity": {
          "type": "integer",
          "description": "The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary."
        }
      },
      "required": [
        "MinCapacity",
        "MaxCapacity"
      ]
    },
    "ScalingRule": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy."
        },
        "Description": {
          "type": "string",
          "description": "A friendly, more verbose description of the automatic scaling rule."
        },
        "Action": {
          "$ref": "#/$defs/ScalingAction"
        },
        "Trigger": {
          "$ref": "#/$defs/ScalingTrigger"
        }
      },
      "required": [
        "Name",
        "Action",
        "Trigger"
      ]
    },
    "ScalingTrigger": {
      "type": "object",
      "properties": {
        "CloudWatchAlarmDefinition": {
          "$ref": "#/$defs/CloudWatchAlarmDefinition"
        }
      },
      "required": [
        "CloudWatchAlarmDefinition"
      ]
    },
    "ShrinkPolicy": {
      "type": "object",
      "properties": {
        "DecommissionTimeout": {
          "type": "integer",
          "description": "The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout."
        },
        "InstanceResizePolicy": {
          "$ref": "#/$defs/InstanceResizePolicy"
        }
      }
    },
    "SimpleScalingPolicyConfiguration": {
      "type": "object",
      "properties": {
        "AdjustmentType": {
          "type": "string",
          "enum": [
            "CHANGE_IN_CAPACITY",
            "PERCENT_CHANGE_IN_CAPACITY",
            "EXACT_CAPACITY"
          ],
          "description": "The way in which Amazon EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% i"
        },
        "ScalingAdjustment": {
          "type": "integer",
          "description": "The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's Amazon EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity."
        },
        "CoolDown": {
          "type": "integer",
          "description": "The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0."
        }
      },
      "required": [
        "ScalingAdjustment"
      ]
    },
    "VolumeSpecification": {
      "type": "object",
      "properties": {
        "VolumeType": {
          "type": "string",
          "description": "The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard."
        },
        "Iops": {
          "type": "integer",
          "description": "The number of I/O operations per second (IOPS) that the volume supports."
        },
        "SizeInGB": {
          "type": "integer",
          "description": "The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10."
        },
        "Throughput": {
          "type": "integer",
          "description": "The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes."
        }
      },
      "required": [
        "VolumeType",
        "SizeInGB"
      ]
    }
  }
}