Skip to content

reject_invitation async

reject_invitation(
    invitation_id: ResourceIdString,
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
) -> RejectInvitationOutput

Rejects an invitation to join a network. This action can be called by a principal in an Amazon Web Services account that has received an invitation to create a member and join a network.

Applies only to Hyperledger Fabric.

Parameters:

  • invitation_id (ResourceIdString) –

    The unique identifier of the invitation to reject.

Raises:

  • AccessDeniedException –

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

  • IllegalActionException –

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

  • ResourceNotFoundException –

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

  • 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 reject_invitation(
    self,
    invitation_id: "capo_managedblockchain.types.resource_id_string.ResourceIdString",
    *,
    config_overrides: Optional[AsyncManagedBlockchainClientConfig] = None,
) -> "capo_managedblockchain.types.reject_invitation_output.RejectInvitationOutput":
    """<p>Rejects an invitation to join a network. This action can be called by a principal in an Amazon Web Services account that has received an invitation to create a member and join a network.</p> <p>Applies only to Hyperledger Fabric.</p>

    Args:
        invitation_id: <p>The unique identifier of the invitation to reject.</p>

    Raises:
        capo_managedblockchain.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_managedblockchain.errors.illegal_action_exception.IllegalActionException: <p></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_not_found_exception.ResourceNotFoundException: <p>A requested resource doesn't exist. It may have been deleted or referenced incorrectly.</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.reject_invitation_input.RejectInvitationInput]",
    ) -> AsyncOperationResponse[
        "capo_managedblockchain.types.reject_invitation_output.RejectInvitationOutput"
    ]:
        import capo_managedblockchain._operations.taiga_web_service.reject_invitation

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RejectInvitation")
    )
    input_: capo_managedblockchain.types.reject_invitation_input.RejectInvitationInput = {
        "invitation_id": invitation_id
    }

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