describeInstanceRefreshes method
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.
May throw InvalidNextToken.
May throw ResourceContentionFault.
Parameter autoScalingGroupName :
The name of the Auto Scaling group.
Parameter instanceRefreshIds :
One or more instance refresh IDs.
Parameter maxRecords :
The maximum number of items to return with this call. The default value is
50 and the maximum value is 100.
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Implementation
Future<DescribeInstanceRefreshesAnswer> describeInstanceRefreshes({
required String autoScalingGroupName,
List<String>? instanceRefreshIds,
int? maxRecords,
String? nextToken,
}) async {
final $request = <String, String>{
'AutoScalingGroupName': autoScalingGroupName,
if (instanceRefreshIds != null)
if (instanceRefreshIds.isEmpty)
'InstanceRefreshIds': ''
else
for (var i1 = 0; i1 < instanceRefreshIds.length; i1++)
'InstanceRefreshIds.member.${i1 + 1}': instanceRefreshIds[i1],
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (nextToken != null) 'NextToken': nextToken,
};
final $result = await _protocol.send(
$request,
action: 'DescribeInstanceRefreshes',
version: '2011-01-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeInstanceRefreshesResult',
);
return DescribeInstanceRefreshesAnswer.fromXml($result);
}