async def iter_describe_mac_hosts(
self,
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
host_ids: Optional[
"capo_ec2.types.request_host_id_list.RequestHostIdList"
] = None,
max_results: Optional[
"capo_ec2.types.describe_mac_hosts_request_max_results.DescribeMacHostsRequestMaxResults"
] = None,
next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "AsyncIterator[capo_ec2.types.mac_host.MacHost]":
_token = next_token
while True:
_response = await self.describe_mac_hosts(
config_overrides=config_overrides,
filters=filters,
host_ids=host_ids,
max_results=max_results,
next_token=_token,
)
_page = _resolve_path(_response, ("mac_hosts",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break