Skip to content

create_acme_domain_validation async

create_acme_domain_validation(
    acme_endpoint_arn: AcmeEndpointArn,
    domain_name: DomainName,
    prevalidation_options: PrevalidationOptions,
    *,
    config_overrides: Optional[AsyncACMClientConfig] = None,
    idempotency_token: Optional[str] = None,
    tags: Optional[TagList] = None,
) -> CreateAcmeDomainValidationResponse

Creates a domain validation for an ACME endpoint. Domain validations authorize the endpoint to issue certificates for specified domain names. You configure prevalidation to prove domain ownership.

Parameters:

  • idempotency_token (Optional[str], default: None ) –

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

  • acme_endpoint_arn (AcmeEndpointArn) –

    The Amazon Resource Name (ARN) of the ACME endpoint.

  • domain_name (DomainName) –

    The domain name to validate.

  • prevalidation_options (PrevalidationOptions) –

    The prevalidation options for the domain.

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

    One or more tags to associate with the domain validation.

Raises:

Source code in docs_src/capo_acm/_services/async_acm.py
async def create_acme_domain_validation(
    self,
    acme_endpoint_arn: "capo_acm.types.acme_endpoint_arn.AcmeEndpointArn",
    domain_name: "capo_acm.types.domain_name.DomainName",
    prevalidation_options: "capo_acm.types.prevalidation_options.PrevalidationOptions",
    *,
    config_overrides: Optional[AsyncACMClientConfig] = None,
    idempotency_token: Optional[str] = None,
    tags: Optional["capo_acm.types.tag_list.TagList"] = None,
) -> "capo_acm.types.create_acme_domain_validation_response.CreateAcmeDomainValidationResponse":
    """<p>Creates a domain validation for an ACME endpoint. Domain validations authorize the endpoint to issue certificates for specified domain names. You configure prevalidation to prove domain ownership.</p>

    Args:
        idempotency_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
        acme_endpoint_arn: <p>The Amazon Resource Name (ARN) of the ACME endpoint.</p>
        domain_name: <p>The domain name to validate.</p>
        prevalidation_options: <p>The prevalidation options for the domain.</p>
        tags: <p>One or more tags to associate with the domain validation.</p>

    Raises:
        capo_acm.errors.access_denied_exception.AccessDeniedException: <p>You do not have access required to perform this action.</p>
        capo_acm.errors.conflict_exception.ConflictException: <p>You are trying to update a resource or configuration that is already being created or updated. Wait for the previous operation to finish and try again.</p>
        capo_acm.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_acm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified certificate cannot be found in the caller's account or the caller's account cannot be found.</p>
        capo_acm.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota has been exceeded.</p>
        capo_acm.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a quota.</p>
        capo_acm.errors.validation_exception.ValidationException: <p>The supplied input failed to satisfy constraints of an Amazon Web Services service.</p>
        capo_acm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_acm.types.create_acme_domain_validation_request.CreateAcmeDomainValidationRequest]",
    ) -> AsyncOperationResponse[
        "capo_acm.types.create_acme_domain_validation_response.CreateAcmeDomainValidationResponse"
    ]:
        import capo_acm._operations.certificate_manager.create_acme_domain_validation

        (
            output,
            http_response,
        ) = await capo_acm._operations.certificate_manager.create_acme_domain_validation.async_create_acme_domain_validation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateAcmeDomainValidation")
    )
    input_: capo_acm.types.create_acme_domain_validation_request.CreateAcmeDomainValidationRequest = {
        "acme_endpoint_arn": acme_endpoint_arn,
        "domain_name": domain_name,
        "prevalidation_options": prevalidation_options,
    }
    if idempotency_token is None:
        idempotency_token = str(uuid.uuid4())
    input_["idempotency_token"] = idempotency_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