Skip to content

iter_describe_auto_scaling_instances async

iter_describe_auto_scaling_instances(
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    instance_ids: Optional[InstanceIds] = None,
    max_records: Optional[MaxRecords] = None,
    next_token: Optional[XmlString] = None,
) -> AsyncIterator[AutoScalingInstanceDetails]
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
async def iter_describe_auto_scaling_instances(
    self,
    *,
    config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
    instance_ids: Optional[
        "capo_auto_scaling.types.instance_ids.InstanceIds"
    ] = None,
    max_records: Optional["capo_auto_scaling.types.max_records.MaxRecords"] = None,
    next_token: Optional["capo_auto_scaling.types.xml_string.XmlString"] = None,
) -> "AsyncIterator[capo_auto_scaling.types.auto_scaling_instance_details.AutoScalingInstanceDetails]":
    _token = next_token
    while True:
        _response = await self.describe_auto_scaling_instances(
            config_overrides=config_overrides,
            instance_ids=instance_ids,
            max_records=max_records,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("auto_scaling_instances",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break