Skip to content

create_member async

create_member(
    client_request_token: ClientRequestTokenString,
    invitation_id: ResourceIdString,
    network_id: ResourceIdString,
    member_configuration: MemberConfiguration,
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
) -> CreateMemberOutput

Creates a member within a Managed Blockchain network.

Applies only to Hyperledger Fabric.

Parameters:

  • client_request_token (ClientRequestTokenString) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.

  • invitation_id (ResourceIdString) –

    The unique identifier of the invitation that is sent to the member to join the network.

  • network_id (ResourceIdString) –

    The unique identifier of the network in which the member is created.

  • member_configuration (MemberConfiguration) –

    Member configuration parameters.

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.

  • ResourceAlreadyExistsException –

    A resource request is issued for a resource that already exists.

  • ResourceLimitExceededException –

    The maximum number of resources of that type already exist. Ensure the resources requested are within the boundaries of the service edition and your account limits.

  • ResourceNotFoundException –

    A requested resource doesn't exist. It may have been deleted or referenced incorrectly.

  • ResourceNotReadyException –

    The requested resource exists but isn't in a status that can complete the operation.

  • 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.

  • TooManyTagsException –

  • 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 create_member(
    self,
    client_request_token: "capo_managedblockchain.types.client_request_token_string.ClientRequestTokenString",
    invitation_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
    network_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
    member_configuration: "capo_managedblockchain.types.member_configuration.MemberConfiguration",
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
) -> "capo_managedblockchain.types.create_member_output.CreateMemberOutput":
    """<p>Creates a member within a Managed Blockchain network.</p> <p>Applies only to Hyperledger Fabric.</p>

    Args:
        client_request_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. This identifier is required only if you make a service request directly using an HTTP client. It is generated automatically if you use an Amazon Web Services SDK or the CLI.</p>
        invitation_id: <p>The unique identifier of the invitation that is sent to the member to join the network.</p>
        network_id: <p>The unique identifier of the network in which the member is created.</p>
        member_configuration: <p>Member configuration parameters.</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.resource_already_exists_exception.ResourceAlreadyExistsException: <p>A resource request is issued for a resource that already exists.</p>
        capo_managedblockchain.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>The maximum number of resources of that type already exist. Ensure the resources requested are within the boundaries of the service edition and your account limits.</p>
        capo_managedblockchain.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource doesn't exist. It may have been deleted or referenced incorrectly.</p>
        capo_managedblockchain.errors.resource_not_ready_exception.ResourceNotReadyException: <p>The requested resource exists but isn't in a status that can complete the operation.</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.too_many_tags_exception.TooManyTagsException: <p></p>
        capo_managedblockchain.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_managedblockchain.types.create_member_input.CreateMemberInput]",
    ) -> AsyncOperationResponse[
        "capo_managedblockchain.types.create_member_output.CreateMemberOutput"
    ]:
        import capo_managedblockchain._operations.taiga_web_service.create_member

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

    def _redact_input(
        input_: "capo_managedblockchain.types.create_member_input.CreateMemberInput",
    ) -> dict[str, Any]:
        import capo_managedblockchain.types.create_member_input

        return capo_managedblockchain.types.create_member_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateMember", redact_input=_redact_input),
    )
    input_: capo_managedblockchain.types.create_member_input.CreateMemberInput = {
        "client_request_token": client_request_token,
        "invitation_id": invitation_id,
        "network_id": network_id,
        "member_configuration": member_configuration,
    }

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