Skip to content

list_members async

list_members(
    network_id: ResourceIdString,
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
    name: Optional[String] = None,
    status: Optional[MemberStatus] = None,
    is_owned: Optional[IsOwned] = None,
    max_results: Optional[MemberListMaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListMembersOutput

Returns a list of the members in a network and properties of their configurations.

Applies only to Hyperledger Fabric.

Parameters:

  • network_id (ResourceIdString) –

    The unique identifier of the network for which to list members.

  • name (Optional[String], default: None ) –

    The optional name of the member to list.

  • status (Optional[MemberStatus], default: None ) –

    An optional status specifier. If provided, only members currently in this status are listed.

  • is_owned (Optional[IsOwned], default: None ) –

    An optional Boolean value. If provided, the request is limited either to members that the current Amazon Web Services account owns (true) or that other Amazon Web Services accountsn own (false). If omitted, all members are listed.

  • max_results (Optional[MemberListMaxResults], default: None ) –

    The maximum number of members to return in the request.

  • next_token (Optional[PaginationToken], default: None ) –

    The pagination token that indicates the next set of results to retrieve.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action.

  • InternalServiceErrorException –

    The request processing has failed because of an unknown error, exception or failure.

  • InvalidRequestException –

    The action or operation requested is invalid. Verify that the action is typed correctly.

  • ThrottlingException –

    The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is creating resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources if possible.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_managedblockchain/_services/async_managed_blockchain.py
async def list_members(
    self,
    network_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
    name: Optional["capo_managedblockchain.types.string.String"] = None,
    status: Optional[
        "capo_managedblockchain.types.member_status.MemberStatus"
    ] = None,
    is_owned: Optional["capo_managedblockchain.types.is_owned.IsOwned"] = None,
    max_results: Optional[
        "capo_managedblockchain.types.member_list_max_results.MemberListMaxResults"
    ] = None,
    next_token: Optional[
        "capo_managedblockchain.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_managedblockchain.types.list_members_output.ListMembersOutput":
    """<p>Returns a list of the members in a network and properties of their configurations.</p> <p>Applies only to Hyperledger Fabric.</p>

    Args:
        network_id: <p>The unique identifier of the network for which to list members.</p>
        name: <p>The optional name of the member to list.</p>
        status: <p>An optional status specifier. If provided, only members currently in this status are listed.</p>
        is_owned: <p>An optional Boolean value. If provided, the request is limited either to members that the current Amazon Web Services account owns (<code>true</code>) or that other Amazon Web Services accountsn own (<code>false</code>). If omitted, all members are listed.</p>
        max_results: <p>The maximum number of members to return in the request.</p>
        next_token: <p>The pagination token that indicates the next set of results to retrieve.</p>

    Raises:
        capo_managedblockchain.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_managedblockchain.errors.internal_service_error_exception.InternalServiceErrorException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_managedblockchain.errors.invalid_request_exception.InvalidRequestException: <p>The action or operation requested is invalid. Verify that the action is typed correctly.</p>
        capo_managedblockchain.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is creating resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources if possible.</p>
        capo_managedblockchain.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_managedblockchain.types.list_members_input.ListMembersInput]",
    ) -> AsyncOperationResponse[
        "capo_managedblockchain.types.list_members_output.ListMembersOutput"
    ]:
        import capo_managedblockchain._operations.taiga_web_service.list_members

        (
            output,
            http_response,
        ) = await capo_managedblockchain._operations.taiga_web_service.list_members.async_list_members(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMembers")
    )
    input_: capo_managedblockchain.types.list_members_input.ListMembersInput = {
        "network_id": network_id
    }
    if name is not None:
        input_["name"] = name
    if status is not None:
        input_["status"] = status
    if is_owned is not None:
        input_["is_owned"] = is_owned
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output