Skip to content

create_connection_invitation async

create_connection_invitation(
    catalog: Catalog,
    client_token: ClientToken,
    connection_type: ConnectionType,
    email: Email,
    message: UnicodeStringIncludingNewLine,
    name: SensitiveUnicodeString,
    receiver_identifier: ParticipantIdentifier,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
) -> CreateConnectionInvitationResponse

Creates a new connection invitation to establish a partnership with another organization.

Parameters:

  • catalog (Catalog) –

    The catalog identifier where the connection invitation will be created.

  • client_token (ClientToken) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

  • connection_type (ConnectionType) –

    The type of connection being requested (e.g., reseller, distributor, technology partner).

  • email (Email) –

    The email address of the person to send the connection invitation to.

  • message (UnicodeStringIncludingNewLine) –

    A custom message to include with the connection invitation.

  • name (SensitiveUnicodeString) –

    The name of the person sending the connection invitation.

  • receiver_identifier (ParticipantIdentifier) –

    The identifier of the organization or partner to invite for connection.

Raises:

  • AccessDeniedException –

    The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.

  • InternalServerException –

    An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.

  • ResourceNotFoundException –

    The specified resource could not be found. This may occur when referencing a resource that does not exist or has been deleted.

  • ServiceQuotaExceededException –

    The request was rejected because it would exceed a service quota or limit. This may occur when trying to create more resources than allowed by the service limits.

  • ThrottlingException –

    The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.

  • ValidationException –

    The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.

  • UnknownServiceError –

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

Source code in docs_src/capo_partnercentral_account/_services/async_partner_central_account.py
async def create_connection_invitation(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    client_token: "capo_partnercentral_account.types.client_token.ClientToken",
    connection_type: "capo_partnercentral_account.types.connection_type.ConnectionType",
    email: "capo_partnercentral_account.types.email.Email",
    message: "capo_partnercentral_account.types.unicode_string_including_new_line.UnicodeStringIncludingNewLine",
    name: "capo_partnercentral_account.types.sensitive_unicode_string.SensitiveUnicodeString",
    receiver_identifier: "capo_partnercentral_account.types.participant_identifier.ParticipantIdentifier",
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
) -> "capo_partnercentral_account.types.create_connection_invitation_response.CreateConnectionInvitationResponse":
    """<p>Creates a new connection invitation to establish a partnership with another organization.</p>

    Args:
        catalog: <p>The catalog identifier where the connection invitation will be created.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        connection_type: <p>The type of connection being requested (e.g., reseller, distributor, technology partner).</p>
        email: <p>The email address of the person to send the connection invitation to.</p>
        message: <p>A custom message to include with the connection invitation.</p>
        name: <p>The name of the person sending the connection invitation.</p>
        receiver_identifier: <p>The identifier of the organization or partner to invite for connection.</p>

    Raises:
        capo_partnercentral_account.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions. The caller does not have the required permissions to perform this operation.</p>
        capo_partnercentral_account.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource. This typically occurs when trying to create a resource that already exists or modify a resource that has been changed by another process.</p>
        capo_partnercentral_account.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request. This is typically a temporary condition and the request may be retried.</p>
        capo_partnercentral_account.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found. This may occur when referencing a resource that does not exist or has been deleted.</p>
        capo_partnercentral_account.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request was rejected because it would exceed a service quota or limit. This may occur when trying to create more resources than allowed by the service limits.</p>
        capo_partnercentral_account.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period of time. The client should implement exponential backoff and retry the request.</p>
        capo_partnercentral_account.errors.validation_exception.ValidationException: <p>The request failed validation. One or more input parameters are invalid, missing, or do not meet the required format or constraints.</p>
        capo_partnercentral_account.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_account.types.create_connection_invitation_request.CreateConnectionInvitationRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.create_connection_invitation_response.CreateConnectionInvitationResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.create_connection_invitation

        (
            output,
            http_response,
        ) = await capo_partnercentral_account._operations.partner_central_account.create_connection_invitation.async_create_connection_invitation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_partnercentral_account.types.create_connection_invitation_request.CreateConnectionInvitationRequest",
    ) -> dict[str, Any]:
        import capo_partnercentral_account.types.create_connection_invitation_request

        return capo_partnercentral_account.types.create_connection_invitation_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_partnercentral_account.types.create_connection_invitation_response.CreateConnectionInvitationResponse",
    ) -> dict[str, Any]:
        import capo_partnercentral_account.types.create_connection_invitation_response

        return capo_partnercentral_account.types.create_connection_invitation_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateConnectionInvitation",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_partnercentral_account.types.create_connection_invitation_request.CreateConnectionInvitationRequest = {
        "catalog": catalog,
        "client_token": client_token,
        "connection_type": connection_type,
        "email": email,
        "message": message,
        "name": name,
        "receiver_identifier": receiver_identifier,
    }

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