Skip to content

put_alliance_lead_contact async

put_alliance_lead_contact(
    catalog: Catalog,
    identifier: PartnerIdentifier,
    alliance_lead_contact: AllianceLeadContact,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    email_verification_code: Optional[EmailVerificationCode] = None,
) -> PutAllianceLeadContactResponse

Creates or updates the alliance lead contact information for a partner account.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the partner account.

  • identifier (PartnerIdentifier) –

    The unique identifier of the partner account.

  • alliance_lead_contact (AllianceLeadContact) –

    The alliance lead contact information to set for the partner account.

  • email_verification_code (Optional[EmailVerificationCode], default: None ) –

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

Raises:

  • AccessDeniedException –

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

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

  • 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 put_alliance_lead_contact(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    identifier: "capo_partnercentral_account.types.partner_identifier.PartnerIdentifier",
    alliance_lead_contact: "capo_partnercentral_account.types.alliance_lead_contact.AllianceLeadContact",
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    email_verification_code: Optional[
        "capo_partnercentral_account.types.email_verification_code.EmailVerificationCode"
    ] = None,
) -> "capo_partnercentral_account.types.put_alliance_lead_contact_response.PutAllianceLeadContactResponse":
    """<p>Creates or updates the alliance lead contact information for a partner account.</p>

    Args:
        catalog: <p>The catalog identifier for the partner account.</p>
        identifier: <p>The unique identifier of the partner account.</p>
        alliance_lead_contact: <p>The alliance lead contact information to set for the partner account.</p>
        email_verification_code: <p>The verification code sent to the alliance lead contact's email to confirm the update.</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.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.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.put_alliance_lead_contact_request.PutAllianceLeadContactRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.put_alliance_lead_contact_response.PutAllianceLeadContactResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.put_alliance_lead_contact

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

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

        return capo_partnercentral_account.types.put_alliance_lead_contact_request.redact_sensitive(
            input_
        )

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

        return capo_partnercentral_account.types.put_alliance_lead_contact_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "PutAllianceLeadContact",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_partnercentral_account.types.put_alliance_lead_contact_request.PutAllianceLeadContactRequest = {
        "catalog": catalog,
        "identifier": identifier,
        "alliance_lead_contact": alliance_lead_contact,
    }
    if email_verification_code is not None:
        input_["email_verification_code"] = email_verification_code

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