Skip to content

iter_describe_compliance_by_resource async

iter_describe_compliance_by_resource(
    *,
    config_overrides: Optional[AsyncConfigServiceClientConfig] = None,
    resource_type: Optional[StringWithCharLimit256] = None,
    resource_id: Optional[BaseResourceId] = None,
    compliance_types: Optional[ComplianceTypes] = None,
    limit: Optional[Limit] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[ComplianceByResource]
Source code in docs_src/capo_config_service/_services/async_config_service.py
async def iter_describe_compliance_by_resource(
    self,
    *,
    config_overrides: Optional[AsyncConfigServiceClientConfig] = 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,
) -> "AsyncIterator[capo_config_service.types.compliance_by_resource.ComplianceByResource]":
    _token = next_token
    while True:
        _response = await 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