Skip to content

associate_aws_training_certification_email_domain async

associate_aws_training_certification_email_domain(
    catalog: Catalog,
    identifier: PartnerIdentifier,
    email: Email,
    email_verification_code: EmailVerificationCode,
    *,
    config_overrides: Optional[AsyncPartnerCentralAccountClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> AssociateAwsTrainingCertificationEmailDomainResponse

Associates an email domain with AWS training and certification for the partner account, enabling automatic verification of employee certifications.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the partner account.

  • identifier (PartnerIdentifier) –

    The unique identifier of the partner account.

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

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

  • email (Email) –

    The email address used to verify domain ownership for AWS training and certification association.

  • email_verification_code (EmailVerificationCode) –

    The verification code sent to the email address to confirm domain ownership.

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.

  • 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 associate_aws_training_certification_email_domain(
    self,
    catalog: "capo_partnercentral_account.types.catalog.Catalog",
    identifier: "capo_partnercentral_account.types.partner_identifier.PartnerIdentifier",
    email: "capo_partnercentral_account.types.email.Email",
    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,
) -> "capo_partnercentral_account.types.associate_aws_training_certification_email_domain_response.AssociateAwsTrainingCertificationEmailDomainResponse":
    """<p>Associates an email domain with AWS training and certification for the partner account, enabling automatic verification of employee certifications.</p>

    Args:
        catalog: <p>The catalog identifier for the partner account.</p>
        identifier: <p>The unique identifier of the partner account.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        email: <p>The email address used to verify domain ownership for AWS training and certification association.</p>
        email_verification_code: <p>The verification code sent to the email address to confirm domain ownership.</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.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.associate_aws_training_certification_email_domain_request.AssociateAwsTrainingCertificationEmailDomainRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_account.types.associate_aws_training_certification_email_domain_response.AssociateAwsTrainingCertificationEmailDomainResponse"
    ]:
        import capo_partnercentral_account._operations.partner_central_account.associate_aws_training_certification_email_domain

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

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

        return capo_partnercentral_account.types.associate_aws_training_certification_email_domain_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "AssociateAwsTrainingCertificationEmailDomain",
            redact_input=_redact_input,
        ),
    )
    input_: capo_partnercentral_account.types.associate_aws_training_certification_email_domain_request.AssociateAwsTrainingCertificationEmailDomainRequest = {
        "catalog": catalog,
        "identifier": identifier,
        "email": email,
        "email_verification_code": email_verification_code,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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