def iter_list_rules(
self,
domain_identifier: "capo_datazone.types.domain_id.DomainId",
target_type: "capo_datazone.types.rule_target_type.RuleTargetType",
target_identifier: str,
*,
config_overrides: Optional[DataZoneClientConfig] = None,
rule_type: Optional["capo_datazone.types.rule_type.RuleType"] = None,
action: Optional["capo_datazone.types.rule_action.RuleAction"] = None,
project_ids: Optional["capo_datazone.types.project_ids.ProjectIds"] = None,
asset_types: Optional[
"capo_datazone.types.asset_type_identifiers.AssetTypeIdentifiers"
] = None,
data_product: Optional[bool] = None,
include_cascaded: Optional[bool] = None,
max_results: Optional[int] = None,
next_token: Optional[
"capo_datazone.types.pagination_token.PaginationToken"
] = None,
) -> "Iterator[capo_datazone.types.rule_summary.RuleSummary]":
_token = next_token
while True:
_response = self.list_rules(
domain_identifier,
target_type,
target_identifier,
config_overrides=config_overrides,
rule_type=rule_type,
action=action,
project_ids=project_ids,
asset_types=asset_types,
data_product=data_product,
include_cascaded=include_cascaded,
max_results=max_results,
next_token=_token,
)
_page = _resolve_path(_response, ("items",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break