Skip to main content

cloud_watch_alarm_templates

Creates, updates, deletes, gets or lists a cloud_watch_alarm_templates resource.

Overview

Namecloud_watch_alarm_templates
TypeResource
Idaws.medialive.cloud_watch_alarm_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringA cloudwatch alarm template's ARN (Amazon Resource Name)
comparison_operatorstringThe comparison operator used to compare the specified statistic and the threshold. (GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold)
created_atstring (date-time)Placeholder documentation for __timestampIso8601
datapoints_to_alarmintegerPlaceholder documentation for __integerMin1
descriptionstringPlaceholder documentation for __stringMin0Max1024
evaluation_periodsintegerPlaceholder documentation for __integerMin1
group_idstringPlaceholder documentation for __stringMin7Max11PatternAws097
idstringPlaceholder documentation for __stringMin7Max11PatternAws097
metric_namestringPlaceholder documentation for __stringMax64
modified_atstring (date-time)Placeholder documentation for __timestampIso8601
namestringPlaceholder documentation for __stringMin1Max255PatternS
periodintegerPlaceholder documentation for __integerMin10Max86400
statisticstringThe statistic to apply to the alarm's metric data. (SampleCount, Average, Sum, Minimum, Maximum)
tagsobject
target_resource_typestringThe resource type this template should dynamically generate cloudwatch metric alarms for. (CLOUDFRONT_DISTRIBUTION, MEDIALIVE_MULTIPLEX, MEDIALIVE_CHANNEL, MEDIALIVE_INPUT_DEVICE, MEDIAPACKAGE_CHANNEL, MEDIAPACKAGE_ORIGIN_ENDPOINT, MEDIACONNECT_FLOW, S3_BUCKET, MEDIATAILOR_PLAYBACK_CONFIGURATION)
thresholdnumber (double)Placeholder documentation for __double
treat_missing_datastringSpecifies how missing data points are treated when evaluating the alarm's condition. (notBreaching, breaching, ignore, missing)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cloud_watch_alarm_templateselectidentifier, regionRetrieves the specified cloudwatch alarm template.
list_cloud_watch_alarm_templatesselectregiongroupIdentifier, maxResults, nextToken, scope, signalMapIdentifierLists cloudwatch alarm templates.
create_cloud_watch_alarm_templateinsertregion, ComparisonOperator, EvaluationPeriods, GroupIdentifier, MetricName, TargetResourceType, TreatMissingDataCreates a cloudwatch alarm template to dynamically generate cloudwatch metric alarms on targeted resource types.
update_cloud_watch_alarm_templateupdateidentifier, regionUpdates the specified cloudwatch alarm template.
delete_cloud_watch_alarm_templatedeleteidentifier, regionDeletes a cloudwatch alarm template.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
identifierstringA cloudwatch alarm template's identifier. Can be either be its id or current name.
regionstringAWS region (default: us-east-1)
groupIdentifierstringA cloudwatch alarm template group's identifier. Can be either be its id or current name.
maxResultsinteger
nextTokenstringA token used to retrieve the next set of results in paginated list responses.
scopestringRepresents the scope of a resource, with options for all scopes, AWS provided resources, or local resources.
signalMapIdentifierstringA signal map's identifier. Can be either be its id or current name.

SELECT examples

Retrieves the specified cloudwatch alarm template.

SELECT
arn,
comparison_operator,
created_at,
datapoints_to_alarm,
description,
evaluation_periods,
group_id,
id,
metric_name,
modified_at,
name,
period,
statistic,
tags,
target_resource_type,
threshold,
treat_missing_data
FROM aws.medialive.cloud_watch_alarm_templates
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a cloudwatch alarm template to dynamically generate cloudwatch metric alarms on targeted resource types.

INSERT INTO aws.medialive.cloud_watch_alarm_templates (
ComparisonOperator,
DatapointsToAlarm,
Description,
EvaluationPeriods,
GroupIdentifier,
MetricName,
Name,
Period,
Statistic,
Tags,
TargetResourceType,
Threshold,
TreatMissingData,
RequestId,
region
)
SELECT
'{{ ComparisonOperator }}' /* required */,
{{ DatapointsToAlarm }},
'{{ Description }}',
{{ EvaluationPeriods }} /* required */,
'{{ GroupIdentifier }}' /* required */,
'{{ MetricName }}' /* required */,
'{{ Name }}',
{{ Period }},
'{{ Statistic }}',
'{{ Tags }}',
'{{ TargetResourceType }}' /* required */,
{{ Threshold }},
'{{ TreatMissingData }}' /* required */,
'{{ RequestId }}',
'{{ region }}'
RETURNING
arn,
comparison_operator,
created_at,
datapoints_to_alarm,
description,
evaluation_periods,
group_id,
id,
metric_name,
modified_at,
name,
period,
statistic,
tags,
target_resource_type,
threshold,
treat_missing_data
;

UPDATE examples

Updates the specified cloudwatch alarm template.

UPDATE aws.medialive.cloud_watch_alarm_templates
SET
ComparisonOperator = '{{ ComparisonOperator }}',
DatapointsToAlarm = {{ DatapointsToAlarm }},
Description = '{{ Description }}',
EvaluationPeriods = {{ EvaluationPeriods }},
GroupIdentifier = '{{ GroupIdentifier }}',
MetricName = '{{ MetricName }}',
Name = '{{ Name }}',
Period = {{ Period }},
Statistic = '{{ Statistic }}',
TargetResourceType = '{{ TargetResourceType }}',
Threshold = {{ Threshold }},
TreatMissingData = '{{ TreatMissingData }}'
WHERE
identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
comparison_operator,
created_at,
datapoints_to_alarm,
description,
evaluation_periods,
group_id,
id,
metric_name,
modified_at,
name,
period,
statistic,
tags,
target_resource_type,
threshold,
treat_missing_data;

DELETE examples

Deletes a cloudwatch alarm template.

DELETE FROM aws.medialive.cloud_watch_alarm_templates
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;