Skip to content

associate_certificate

associate_certificate(
    *,
    config_overrides: Optional[MediaConvertClientConfig] = None,
    arn: Optional[__string] = None,
) -> AssociateCertificateResponse

Associates an AWS Certificate Manager (ACM) Amazon Resource Name (ARN) with AWS Elemental MediaConvert.

Parameters:

  • arn (Optional[__string], default: None ) –

    The ARN of the ACM certificate that you want to associate with your MediaConvert resource.

Raises:

  • BadRequestException –

    The service can't process your request because of a problem in the request. Please check your request form and syntax.

  • ConflictException –

    The service couldn't complete your request because there is a conflict with the current state of the resource.

  • ForbiddenException –

    You don't have permissions for this action with the credentials you sent.

  • InternalServerErrorException –

    The service encountered an unexpected condition and can't fulfill your request.

  • NotFoundException –

    The resource you requested doesn't exist.

  • ServiceQuotaExceededException –

    You attempted to create more resources than the service allows based on service quotas.

  • TooManyRequestsException –

    Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests.

  • UnknownServiceError –

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

Source code in docs_src/capo_mediaconvert/_services/media_convert.py
def associate_certificate(
    self,
    *,
    config_overrides: Optional[MediaConvertClientConfig] = None,
    arn: Optional["capo_mediaconvert.types.__string.__string"] = None,
) -> "capo_mediaconvert.types.associate_certificate_response.AssociateCertificateResponse":
    """Associates an AWS Certificate Manager (ACM) Amazon Resource Name (ARN) with AWS Elemental MediaConvert.

    Args:
        arn: The ARN of the ACM certificate that you want to associate with your MediaConvert resource.

    Raises:
        capo_mediaconvert.errors.bad_request_exception.BadRequestException: The service can't process your request because of a problem in the request. Please check your request form and syntax.
        capo_mediaconvert.errors.conflict_exception.ConflictException: The service couldn't complete your request because there is a conflict with the current state of the resource.
        capo_mediaconvert.errors.forbidden_exception.ForbiddenException: You don't have permissions for this action with the credentials you sent.
        capo_mediaconvert.errors.internal_server_error_exception.InternalServerErrorException: The service encountered an unexpected condition and can't fulfill your request.
        capo_mediaconvert.errors.not_found_exception.NotFoundException: The resource you requested doesn't exist.
        capo_mediaconvert.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: You attempted to create more resources than the service allows based on service quotas.
        capo_mediaconvert.errors.too_many_requests_exception.TooManyRequestsException: Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests.
        capo_mediaconvert.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mediaconvert.types.associate_certificate_request.AssociateCertificateRequest]",
    ) -> OperationResponse[
        "capo_mediaconvert.types.associate_certificate_response.AssociateCertificateResponse"
    ]:
        import capo_mediaconvert._operations.media_convert.associate_certificate

        output, http_response = (
            capo_mediaconvert._operations.media_convert.associate_certificate.associate_certificate(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateCertificate")
    )
    input_: capo_mediaconvert.types.associate_certificate_request.AssociateCertificateRequest = {}
    if arn is not None:
        input_["arn"] = arn

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output