Skip to content

associate_certificate async

associate_certificate(
    proxy_identifier: ProxyIdentifier,
    certificate_identifier: CertificateIdentifier,
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
) -> AssociateCertificateResponse

Associates an ACM certificate with the specified Proxy.

Parameters:

  • proxy_identifier (ProxyIdentifier) –

    The Amazon Resource Name (ARN) of the proxy.

  • certificate_identifier (CertificateIdentifier) –

    The Amazon Resource Name (ARN) of the ACM certificate.

Raises:

Examples:

To associate a certificate with a proxy The following example associates the specified ACM certificate with the specified proxy.

>>> await client.associate_certificate(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', certificate_identifier='arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012')
Source code in docs_src/capo_elb_proxy/_services/async_elb_proxy.py
async def associate_certificate(
    self,
    proxy_identifier: "capo_elb_proxy.types.proxy_identifier.ProxyIdentifier",
    certificate_identifier: "capo_elb_proxy.types.certificate_identifier.CertificateIdentifier",
    *,
    config_overrides: Optional[AsyncELBProxyClientConfig] = None,
) -> "capo_elb_proxy.types.associate_certificate_response.AssociateCertificateResponse":
    """Associates an ACM certificate with the specified Proxy.

    Args:
        proxy_identifier: The Amazon Resource Name (ARN) of the proxy.
        certificate_identifier: The Amazon Resource Name (ARN) of the ACM certificate.

    Raises:
        capo_elb_proxy.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_elb_proxy.errors.throttling_exception.ThrottlingException: The limit on the number of requests per second was exceeded.
        capo_elb_proxy.errors.access_denied_exception.AccessDeniedException: The user does not have sufficient access to perform this action.
        capo_elb_proxy.errors.conflict_exception.ConflictException: The request conflicts with the current state of the resource.
        capo_elb_proxy.errors.resource_not_found_exception.ResourceNotFoundException: The request references a resource that does not exist.
        capo_elb_proxy.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: The request would cause a service quota to be exceeded.
        capo_elb_proxy.errors.validation_exception.ValidationException: The input does not satisfy the constraints specified by an AWS service.
        capo_elb_proxy.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To associate a certificate with a proxy
        The following example associates the specified ACM certificate with the specified proxy.

        >>> await client.associate_certificate(proxy_identifier='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', certificate_identifier='arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elb_proxy.types.associate_certificate_request.AssociateCertificateRequest]",
    ) -> AsyncOperationResponse[
        "capo_elb_proxy.types.associate_certificate_response.AssociateCertificateResponse"
    ]:
        import capo_elb_proxy._operations.elb_proxy.associate_certificate

        (
            output,
            http_response,
        ) = await capo_elb_proxy._operations.elb_proxy.associate_certificate.async_associate_certificate(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateCertificate")
    )
    input_: capo_elb_proxy.types.associate_certificate_request.AssociateCertificateRequest = {
        "proxy_identifier": proxy_identifier,
        "certificate_identifier": certificate_identifier,
    }

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