def iter_describe_compliance_by_resource(
self,
*,
config_overrides: Optional[ConfigServiceClientConfig] = None,
resource_type: Optional[
"capo_config_service.types.string_with_char_limit256.StringWithCharLimit256"
] = None,
resource_id: Optional[
"capo_config_service.types.base_resource_id.BaseResourceId"
] = None,
compliance_types: Optional[
"capo_config_service.types.compliance_types.ComplianceTypes"
] = None,
limit: Optional["capo_config_service.types.limit.Limit"] = None,
next_token: Optional["capo_config_service.types.next_token.NextToken"] = None,
) -> "Iterator[capo_config_service.types.compliance_by_resource.ComplianceByResource]":
_token = next_token
while True:
_response = self.describe_compliance_by_resource(
config_overrides=config_overrides,
resource_type=resource_type,
resource_id=resource_id,
compliance_types=compliance_types,
limit=limit,
next_token=_token,
)
_page = _resolve_path(_response, ("compliance_by_resources",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break