Skip to content

iter_list_workload_shares

iter_list_workload_shares(
    workload_id: WorkloadId,
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    shared_with_prefix: Optional[SharedWithPrefix] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    status: Optional[ShareStatus] = None,
) -> Iterator[ListWorkloadSharesOutput]
Source code in docs_src/capo_wellarchitected/_services/well_architected.py
def iter_list_workload_shares(
    self,
    workload_id: "capo_wellarchitected.types.workload_id.WorkloadId",
    *,
    config_overrides: Optional[WellArchitectedClientConfig] = None,
    shared_with_prefix: Optional[
        "capo_wellarchitected.types.shared_with_prefix.SharedWithPrefix"
    ] = None,
    next_token: Optional["capo_wellarchitected.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_wellarchitected.types.max_results.MaxResults"
    ] = None,
    status: Optional["capo_wellarchitected.types.share_status.ShareStatus"] = None,
) -> "Iterator[capo_wellarchitected.types.list_workload_shares_output.ListWorkloadSharesOutput]":
    _token = next_token
    while True:
        _response = self.list_workload_shares(
            workload_id,
            config_overrides=config_overrides,
            shared_with_prefix=shared_with_prefix,
            next_token=_token,
            max_results=max_results,
            status=status,
        )
        yield _response
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break