Skip to content

get_cloud_watch_alarm_template

get_cloud_watch_alarm_template(
    identifier: __string, *, config_overrides: Optional[MediaLiveClientConfig] = None
) -> GetCloudWatchAlarmTemplateResponse

Retrieves the specified cloudwatch alarm template.

Parameters:

  • identifier (__string) –

    A cloudwatch alarm template's identifier. Can be either be its id or current name.

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def get_cloud_watch_alarm_template(
    self,
    identifier: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
) -> "capo_medialive.types.get_cloud_watch_alarm_template_response.GetCloudWatchAlarmTemplateResponse":
    """Retrieves the specified cloudwatch alarm template.

    Args:
        identifier: A cloudwatch alarm template's identifier. Can be either be its id or current name.

    Raises:
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.not_found_exception.NotFoundException: Placeholder documentation for NotFoundException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medialive.types.get_cloud_watch_alarm_template_request.GetCloudWatchAlarmTemplateRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.get_cloud_watch_alarm_template_response.GetCloudWatchAlarmTemplateResponse"
    ]:
        import capo_medialive._operations.media_live.get_cloud_watch_alarm_template

        output, http_response = (
            capo_medialive._operations.media_live.get_cloud_watch_alarm_template.get_cloud_watch_alarm_template(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCloudWatchAlarmTemplate")
    )
    input_: capo_medialive.types.get_cloud_watch_alarm_template_request.GetCloudWatchAlarmTemplateRequest = {
        "identifier": identifier
    }

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