Skip to content

create_partner async

create_partner(
    catalog: Catalog,
    legal_name: SensitiveUnicodeString,
    primary_solution_type: PrimarySolutionType,
    alliance_lead_contact: AllianceLeadContact,
    email_verification_code: EmailVerificationCode,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagList] = None,
) -> CreatePartnerResponse

Creates a new partner account in the AWS Partner Network with the specified details and configuration.

Parameters:

  • catalog (Catalog) –

    The catalog identifier where the partner account will be created.

  • client_token (Optional[ClientToken], default: None ) –

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

  • legal_name (SensitiveUnicodeString) –

    The legal name of the organization becoming a partner.

  • primary_solution_type (PrimarySolutionType) –

    The primary type of solution or service the partner provides (e.g., consulting, software, managed services).

  • alliance_lead_contact (AllianceLeadContact) –

    The primary contact person for alliance and partnership matters.

  • email_verification_code (EmailVerificationCode) –

    The verification code sent to the alliance lead contact's email to confirm account creation.

  • tags (Optional[TagList], default: None ) –

    A list of tags to associate with the partner account for organization and billing purposes.

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.

  • 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_partner(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    legal_name: "capo_partnercentral_account.types.sensitive_unicode_string.SensitiveUnicodeString",
    primary_solution_type: "capo_partnercentral_account.types.primary_solution_type.PrimarySolutionType",
    alliance_lead_contact: "capo_partnercentral_account.types.alliance_lead_contact.AllianceLeadContact",
    email_verification_code: "capo_partnercentral_account.types.email_verification_code.EmailVerificationCode",
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    client_token: Optional[
        "capo_partnercentral_account.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_partnercentral_account.types.tag_list.TagList"] = None,
) -> "capo_partnercentral_account.types.create_partner_response.CreatePartnerResponse":
    """<p>Creates a new partner account in the AWS Partner Network with the specified details and configuration.</p>

    Args:
        catalog: <p>The catalog identifier where the partner account will be created.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        legal_name: <p>The legal name of the organization becoming a partner.</p>
        primary_solution_type: <p>The primary type of solution or service the partner provides (e.g., consulting, software, managed services).</p>
        alliance_lead_contact: <p>The primary contact person for alliance and partnership matters.</p>
        email_verification_code: <p>The verification code sent to the alliance lead contact's email to confirm account creation.</p>
        tags: <p>A list of tags to associate with the partner account for organization and billing purposes.</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.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_partner_request.CreatePartnerRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.create_partner_response.CreatePartnerResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.create_partner

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

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

        return capo_partnercentral_account.types.create_partner_request.redact_sensitive(
            input_
        )

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

        return capo_partnercentral_account.types.create_partner_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreatePartner",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_partnercentral_account.types.create_partner_request.CreatePartnerRequest = {
        "catalog": catalog,
        "legal_name": legal_name,
        "primary_solution_type": primary_solution_type,
        "alliance_lead_contact": alliance_lead_contact,
        "email_verification_code": email_verification_code,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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