Skip to content

iter_list_access_policies

iter_list_access_policies(
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    identity_type: Optional[IdentityType] = None,
    identity_id: Optional[IdentityId] = None,
    resource_type: Optional[ResourceType] = None,
    resource_id: Optional[ID] = None,
    iam_arn: Optional[IamArn] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> Iterator[AccessPolicySummary]
Source code in docs_src/capo_iotsitewise/_services/io_t_site_wise.py
def iter_list_access_policies(
    self,
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    identity_type: Optional[
        "capo_iotsitewise.types.identity_type.IdentityType"
    ] = None,
    identity_id: Optional["capo_iotsitewise.types.identity_id.IdentityId"] = None,
    resource_type: Optional[
        "capo_iotsitewise.types.resource_type.ResourceType"
    ] = None,
    resource_id: Optional["capo_iotsitewise.types.id.ID"] = None,
    iam_arn: Optional["capo_iotsitewise.types.iam_arn.IamArn"] = None,
    next_token: Optional["capo_iotsitewise.types.next_token.NextToken"] = None,
    max_results: Optional["capo_iotsitewise.types.max_results.MaxResults"] = None,
) -> "Iterator[capo_iotsitewise.types.access_policy_summary.AccessPolicySummary]":
    _token = next_token
    while True:
        _response = self.list_access_policies(
            config_overrides=config_overrides,
            identity_type=identity_type,
            identity_id=identity_id,
            resource_type=resource_type,
            resource_id=resource_id,
            iam_arn=iam_arn,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("access_policy_summaries",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break