def iter_describe_dhcp_options(
self,
*,
config_overrides: Optional[EC2ClientConfig] = None,
dhcp_options_ids: Optional[
"capo_ec2.types.dhcp_options_id_string_list.DhcpOptionsIdStringList"
] = None,
next_token: Optional["capo_ec2.types.string.String"] = None,
max_results: Optional[
"capo_ec2.types.describe_dhcp_options_max_results.DescribeDhcpOptionsMaxResults"
] = None,
dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
) -> "Iterator[capo_ec2.types.dhcp_options.DhcpOptions]":
_token = next_token
while True:
_response = self.describe_dhcp_options(
config_overrides=config_overrides,
dhcp_options_ids=dhcp_options_ids,
next_token=_token,
max_results=max_results,
dry_run=dry_run,
filters=filters,
)
_page = _resolve_path(_response, ("dhcp_options",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break