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:
-
auto_scaling_group_name
(Optional[XmlStringMaxLen255], default:
None
)
–
The name of the Auto Scaling group.
-
instance_refresh_ids
(Optional[InstanceRefreshIds], default:
None
)
–
One or more instance refresh IDs.
-
next_token
(Optional[XmlString], default:
None
)
–
The token for the next set of items to return. (You received this token from a previous call.)
-
max_records
(Optional[MaxRecords], default:
None
)
–
The maximum number of items to return with this call. The default value is 50 and the maximum value is 100.
Raises:
-
InvalidNextToken
–
The NextToken value is not valid.
-
ResourceContentionFault
–
You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
| async def describe_instance_refreshes(
self,
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[
"capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
] = None,
instance_refresh_ids: Optional[
"capo_auto_scaling.types.instance_refresh_ids.InstanceRefreshIds"
] = None,
next_token: Optional["capo_auto_scaling.types.xml_string.XmlString"] = None,
max_records: Optional["capo_auto_scaling.types.max_records.MaxRecords"] = None,
) -> "capo_auto_scaling.types.describe_instance_refreshes_answer.DescribeInstanceRefreshesAnswer":
"""<p>Gets information about the instance refreshes for the specified Auto Scaling group from the previous six weeks.</p> <p>This operation is part of the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html">instance refresh feature</a> in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes.</p> <p>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.</p>
Args:
auto_scaling_group_name: <p>The name of the Auto Scaling group.</p>
instance_refresh_ids: <p>One or more instance refresh IDs.</p>
next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
max_records: <p>The maximum number of items to return with this call. The default value is <code>50</code> and the maximum value is <code>100</code>.</p>
Raises:
capo_auto_scaling.errors.invalid_next_token.InvalidNextToken: <p>The <code>NextToken</code> value is not valid.</p>
capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_auto_scaling.types.describe_instance_refreshes_type.DescribeInstanceRefreshesType]",
) -> AsyncOperationResponse[
"capo_auto_scaling.types.describe_instance_refreshes_answer.DescribeInstanceRefreshesAnswer"
]:
import capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_instance_refreshes
(
output,
http_response,
) = await capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_instance_refreshes.async_describe_instance_refreshes(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeInstanceRefreshes")
)
input_: capo_auto_scaling.types.describe_instance_refreshes_type.DescribeInstanceRefreshesType = {}
if auto_scaling_group_name is not None:
input_["auto_scaling_group_name"] = auto_scaling_group_name
if instance_refresh_ids is not None:
input_["instance_refresh_ids"] = instance_refresh_ids
if next_token is not None:
input_["next_token"] = next_token
if max_records is not None:
input_["max_records"] = max_records
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|