Skip to main content

instance_refreshes

Creates, updates, deletes, gets or lists an instance_refreshes resource.

Overview

Nameinstance_refreshes
TypeResource
Idaws.autoscaling.instance_refreshes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auto_scaling_group_namestringThe name of the Auto Scaling group.
desired_configurationstringDescribes the desired configuration for the instance refresh.
end_timestringThe date and time at which the instance refresh ended.
instance_refresh_idstringThe instance refresh ID.
instances_to_updateintegerThe 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_completeintegerThe 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.
preferencesstringThe preferences for an instance refresh.
progress_detailsstringAdditional progress details for an Auto Scaling group that has a warm pool.
rollback_detailsstringThe rollback details.
start_timestringThe date and time at which the instance refresh began.
statusstringThe 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_reasonstringThe explanation for the specific status assigned to this operation.
strategystringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instance_refreshesselectAutoScalingGroupName, regionInstanceRefreshIds, NextToken, MaxRecordsGets 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.

NameDatatypeDescription
AutoScalingGroupNamestringThe name of the Auto Scaling group.
regionstringAWS region (default: us-east-1)
InstanceRefreshIdsarrayOne or more instance refresh IDs.
MaxRecordsintegerThe maximum number of items to return with this call. The default value is 50 and the maximum value is 100.
NextTokenstringThe token for the next set of items to return. (You received this token from a previous call.)

SELECT examples

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 }}'
;