auto_scaling_instances
Creates, updates, deletes, gets or lists an auto_scaling_instances resource.
Overview
| Name | auto_scaling_instances |
| Type | Resource |
| Id | aws.autoscaling.auto_scaling_instances |
Fields
The following fields are returned by SELECT queries:
- describe_auto_scaling_instances
| Name | Datatype | Description |
|---|---|---|
auto_scaling_group_name | string | The name of the Auto Scaling group for the instance. |
availability_zone | string | The Availability Zone for the instance. |
availability_zone_id | string | The Availability Zone ID where the instance is located. |
health_status | string | The last reported health status of this instance. Healthy means that the instance is healthy and should remain in service. Unhealthy means that the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace it. |
image_id | string | The ID of the Amazon Machine Image (AMI) associated with the instance. This field shows the current AMI ID of the instance's root volume. It may differ from the original AMI used when the instance was first launched. This field appears for: Instances with root volume replacements through Instance Refresh Instances launched with AMI overrides This field won't appear for: Existing instances launched from Launch Templates without overrides Existing instances that didn’t have their root volume replaced through Instance Refresh |
instance_id | string | The ID of the instance. |
instance_type | string | The instance type of the EC2 instance. |
launch_configuration_name | string | The launch configuration used to launch the instance. This value is not available if you attached the instance to the Auto Scaling group. |
launch_template | string | The launch template for the instance. |
lifecycle_state | string | The lifecycle state for the instance. The Quarantined state is not used. For more information, see Amazon EC2 Auto Scaling instance lifecycle in the Amazon EC2 Auto Scaling User Guide. Valid values: Pending | Pending:Wait | Pending:Proceed | Quarantined | InService | Terminating | Terminating:Wait | Terminating:Proceed | Terminating:Retained | Terminated | Detaching | Detached | EnteringStandby | Standby | ReplacingRootVolume | ReplacingRootVolume:Wait | ReplacingRootVolume:Proceed | RootVolumeReplaced | Warmed:Pending | Warmed:Pending:Wait | Warmed:Pending:Proceed | Warmed:Pending:Retained | Warmed:Terminating | Warmed:Terminating:Wait | Warmed:Terminating:Proceed | Warmed:Terminating:Retained | Warmed:Terminated | Warmed:Stopped | Warmed:Running | Warmed:Hibernated |
protected_from_scale_in | boolean | Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in. |
weighted_capacity | string | The number of capacity units contributed by the instance based on its instance type. Valid Range: Minimum value of 1. Maximum value of 999. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_auto_scaling_instances | select | region | InstanceIds, MaxRecords, NextToken | Gets information about the Auto Scaling instances in the account and Region. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
InstanceIds | array | The IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error. Array Members: Maximum number of 50 items. |
MaxRecords | integer | The maximum number of items to return with this call. The default value is 50 and the maximum value is 50. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
SELECT examples
- describe_auto_scaling_instances
Gets information about the Auto Scaling instances in the account and Region.
SELECT
auto_scaling_group_name,
availability_zone,
availability_zone_id,
health_status,
image_id,
instance_id,
instance_type,
launch_configuration_name,
launch_template,
lifecycle_state,
protected_from_scale_in,
weighted_capacity
FROM aws.autoscaling.auto_scaling_instances
WHERE region = '{{ region }}' -- required
AND InstanceIds = '{{ InstanceIds }}'
AND MaxRecords = '{{ MaxRecords }}'
AND NextToken = '{{ NextToken }}'
;