Skip to content

associate_certificate async

associate_certificate(
    gateway_id: GatewayId,
    acm_certificate_arn: AcmCertificateArn,
    client_token: str,
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
) -> AssociateCertificateResponse

Associates an ACM certificate with a responder gateway.

Parameters:

  • gateway_id (GatewayId) –

    The unique identifier of the gateway.

  • acm_certificate_arn (AcmCertificateArn) –

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

  • client_token (str) –

    Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.

    If you don't provide this value, then Amazon Web Services generates a random one for you.

    If you retry the operation with the same clientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

Raises:

  • AccessDeniedException –

    The request could not be completed because you do not have sufficient access to perform this action.

  • ConflictException –

    The request could not be completed because of a conflict in the current state of the resource.

  • InternalServerException –

    The request could not be completed because of an internal server error. Try your call again.

  • ResourceNotFoundException –

    The request could not be completed because the resource does not exist.

  • ServiceQuotaExceededException –

    The request could not be completed because you exceeded a service quota.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request could not be completed because it fails satisfy the constraints specified by the service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Associate a certificate with a responder gateway Associate an ACM certificate with a responder gateway

>>> await client.associate_certificate(gateway_id='rtb-gw-12345678', acm_certificate_arn='arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012', client_token='550e8400-e29b-41d4-a716-446655440000')
Source code in docs_src/capo_rtbfabric/_services/async_rtb_fabric.py
async def associate_certificate(
    self,
    gateway_id: "capo_rtbfabric.types.gateway_id.GatewayId",
    acm_certificate_arn: "capo_rtbfabric.types.acm_certificate_arn.AcmCertificateArn",
    client_token: str,
    *,
    config_overrides: Optional[AsyncRTBFabricClientConfig] = None,
) -> "capo_rtbfabric.types.associate_certificate_response.AssociateCertificateResponse":
    """<p>Associates an ACM certificate with a responder gateway.</p>

    Args:
        gateway_id: <p>The unique identifier of the gateway.</p>
        acm_certificate_arn: <p>The Amazon Resource Name (ARN) of the ACM certificate to associate.</p>
        client_token: <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>clientToken</code>, but with different parameters, the retry fails with an <code>IdempotentParameterMismatch</code> error.</p>

    Raises:
        capo_rtbfabric.errors.access_denied_exception.AccessDeniedException: <p>The request could not be completed because you do not have sufficient access to perform this action.</p>
        capo_rtbfabric.errors.conflict_exception.ConflictException: <p>The request could not be completed because of a conflict in the current state of the resource.</p>
        capo_rtbfabric.errors.internal_server_exception.InternalServerException: <p>The request could not be completed because of an internal server error. Try your call again.</p>
        capo_rtbfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request could not be completed because the resource does not exist.</p>
        capo_rtbfabric.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request could not be completed because you exceeded a service quota.</p>
        capo_rtbfabric.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_rtbfabric.errors.validation_exception.ValidationException: <p>The request could not be completed because it fails satisfy the constraints specified by the service.</p>
        capo_rtbfabric.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Associate a certificate with a responder gateway
        Associate an ACM certificate with a responder gateway

        >>> await client.associate_certificate(gateway_id='rtb-gw-12345678', acm_certificate_arn='arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012', client_token='550e8400-e29b-41d4-a716-446655440000')
    """

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

        (
            output,
            http_response,
        ) = await capo_rtbfabric._operations.rtb_fabric.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_rtbfabric.types.associate_certificate_request.AssociateCertificateRequest = {
        "gateway_id": gateway_id,
        "acm_certificate_arn": acm_certificate_arn,
        "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