instance_refreshes
Creates, updates, deletes, gets or lists an instance_refreshes resource.
Overview
| Name | instance_refreshes |
| Type | Resource |
| Id | aws.autoscaling.instance_refreshes |
Fields
The following fields are returned by SELECT queries:
- describe_instance_refreshes
| Name | Datatype | Description |
|---|---|---|
auto_scaling_group_name | string | The name of the Auto Scaling group. |
desired_configuration | string | Describes the desired configuration for the instance refresh. |
end_time | string | The date and time at which the instance refresh ended. |
instance_refresh_id | string | The instance refresh ID. |
instances_to_update | integer | The number of instances remaining to update before the instance refresh is complete. If you roll back the instance refresh, InstancesToUpdate shows you the number of instances that were not yet updated by the instance refresh. Therefore, these instances don't need to be replaced as part of the rollback. |
percentage_complete | integer | The percentage of the instance refresh that is complete. For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's health status and warm-up time. When the instance's health status changes to healthy and the specified warm-up time passes, the instance is considered updated and is added to the percentage complete. PercentageComplete does not include instances that are replaced during a rollback. This value gradually goes back down to zero during a rollback. |
preferences | string | The preferences for an instance refresh. |
progress_details | string | Additional progress details for an Auto Scaling group that has a warm pool. |
rollback_details | string | The rollback details. |
start_time | string | The date and time at which the instance refresh began. |
status | string | The current status for the instance refresh operation: Pending - The request was created, but the instance refresh has not started. InProgress - An instance refresh is in progress. Successful - An instance refresh completed successfully. Failed - An instance refresh failed to complete. You can troubleshoot using the status reason and the scaling activities. Cancelling - An ongoing instance refresh is being cancelled. Cancelled - The instance refresh is cancelled. RollbackInProgress - An instance refresh is being rolled back. RollbackFailed - The rollback failed to complete. You can troubleshoot using the status reason and the scaling activities. RollbackSuccessful - The rollback completed successfully. Baking - Waiting the specified bake time after an instance refresh has finished updating instances. |
status_reason | string | The explanation for the specific status assigned to this operation. |
strategy | string | The strategy to use for the instance refresh. This determines how instances in the Auto Scaling group are updated. Default is Rolling. Rolling – Terminates instances and launches replacements in batches ReplaceRootVolume – Updates instances by replacing only the root volume without terminating the instance |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_instance_refreshes | select | AutoScalingGroupName, region | InstanceRefreshIds, NextToken, MaxRecords | Gets information about the instance refreshes for the specified Auto Scaling group from the previous six weeks. This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes. To help you determine the status of an instance refresh, Amazon EC2 Auto Scaling returns information about the instance refreshes you previously initiated, including their status, start time, end time, the percentage of the instance refresh that is complete, and the number of instances remaining to update before the instance refresh is complete. If a rollback is initiated while an instance refresh is in progress, Amazon EC2 Auto Scaling also returns information about the rollback of the instance refresh. |
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 |
|---|---|---|
AutoScalingGroupName | string | The name of the Auto Scaling group. |
region | string | AWS region (default: us-east-1) |
InstanceRefreshIds | array | One or more instance refresh IDs. |
MaxRecords | integer | The maximum number of items to return with this call. The default value is 50 and the maximum value is 100. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
SELECT examples
- describe_instance_refreshes
Gets information about the instance refreshes for the specified Auto Scaling group from the previous six weeks. This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes. To help you determine the status of an instance refresh, Amazon EC2 Auto Scaling returns information about the instance refreshes you previously initiated, including their status, start time, end time, the percentage of the instance refresh that is complete, and the number of instances remaining to update before the instance refresh is complete. If a rollback is initiated while an instance refresh is in progress, Amazon EC2 Auto Scaling also returns information about the rollback of the instance refresh.
SELECT
auto_scaling_group_name,
desired_configuration,
end_time,
instance_refresh_id,
instances_to_update,
percentage_complete,
preferences,
progress_details,
rollback_details,
start_time,
status,
status_reason,
strategy
FROM aws.autoscaling.instance_refreshes
WHERE AutoScalingGroupName = '{{ AutoScalingGroupName }}' -- required
AND region = '{{ region }}' -- required
AND InstanceRefreshIds = '{{ InstanceRefreshIds }}'
AND NextToken = '{{ NextToken }}'
AND MaxRecords = '{{ MaxRecords }}'
;