async def iter_describe_policies(
self,
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[
"capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
] = None,
policy_names: Optional[
"capo_auto_scaling.types.policy_names.PolicyNames"
] = None,
policy_types: Optional[
"capo_auto_scaling.types.policy_types.PolicyTypes"
] = None,
next_token: Optional["capo_auto_scaling.types.xml_string.XmlString"] = None,
max_records: Optional["capo_auto_scaling.types.max_records.MaxRecords"] = None,
) -> "AsyncIterator[capo_auto_scaling.types.scaling_policy.ScalingPolicy]":
_token = next_token
while True:
_response = await self.describe_policies(
config_overrides=config_overrides,
auto_scaling_group_name=auto_scaling_group_name,
policy_names=policy_names,
policy_types=policy_types,
next_token=_token,
max_records=max_records,
)
_page = _resolve_path(_response, ("scaling_policies",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break