Skip to main content

cloud_watch_alarm_templates

Creates, updates, deletes or gets a cloud_watch_alarm_template resource or lists cloud_watch_alarm_templates in a region

Overview

Namecloud_watch_alarm_templates
TypeResource
DescriptionDefinition of AWS::MediaLive::CloudWatchAlarmTemplate Resource Type
Idaws.medialive.cloud_watch_alarm_templates

Fields

NameDatatypeDescription
arnstringA cloudwatch alarm template's ARN (Amazon Resource Name)
comparison_operatorstringThe comparison operator used to compare the specified statistic and the threshold.
created_atstring
datapoints_to_alarmnumberThe number of datapoints within the evaluation period that must be breaching to trigger the alarm.
descriptionstringA resource's optional description.
evaluation_periodsnumberThe number of periods over which data is compared to the specified threshold.
group_idstringA cloudwatch alarm template group's id. AWS provided template groups have ids that start with `aws-`
group_identifierstringA cloudwatch alarm template group's identifier. Can be either be its id or current name.
idstringA cloudwatch alarm template's id. AWS provided templates have ids that start with `aws-`
identifierstring
metric_namestringThe name of the metric associated with the alarm. Must be compatible with targetResourceType.
modified_atstring
namestringA resource's name. Names must be unique within the scope of a resource type in a specific region.
periodnumberThe period, in seconds, over which the specified statistic is applied.
statisticstringThe statistic to apply to the alarm's metric data.
tagsobjectRepresents the tags associated with a resource.
target_resource_typestringThe resource type this template should dynamically generate cloudwatch metric alarms for.
thresholdnumberThe threshold value to compare with the specified statistic.
treat_missing_datastringSpecifies how missing data points are treated when evaluating the alarm's condition.
regionstringAWS region.

For more information, see AWS::MediaLive::CloudWatchAlarmTemplate.

Methods

NameAccessible byRequired Params
create_resourceINSERTComparisonOperator, EvaluationPeriods, GroupIdentifier, MetricName, Name, Period, Statistic, TargetResourceType, Threshold, TreatMissingData, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all cloud_watch_alarm_templates in a region.

SELECT
region,
arn,
comparison_operator,
created_at,
datapoints_to_alarm,
description,
evaluation_periods,
group_id,
group_identifier,
id,
identifier,
metric_name,
modified_at,
name,
period,
statistic,
tags,
target_resource_type,
threshold,
treat_missing_data
FROM aws.medialive.cloud_watch_alarm_templates
WHERE region = 'us-east-1';

Gets all properties from an individual cloud_watch_alarm_template.

SELECT
region,
arn,
comparison_operator,
created_at,
datapoints_to_alarm,
description,
evaluation_periods,
group_id,
group_identifier,
id,
identifier,
metric_name,
modified_at,
name,
period,
statistic,
tags,
target_resource_type,
threshold,
treat_missing_data
FROM aws.medialive.cloud_watch_alarm_templates
WHERE region = 'us-east-1' AND data__Identifier = '<Identifier>';

INSERT example

Use the following StackQL query and manifest file to create a new cloud_watch_alarm_template resource, using stack-deploy.

/*+ create */
INSERT INTO aws.medialive.cloud_watch_alarm_templates (
ComparisonOperator,
EvaluationPeriods,
GroupIdentifier,
MetricName,
Name,
Period,
Statistic,
TargetResourceType,
Threshold,
TreatMissingData,
region
)
SELECT
'{{ ComparisonOperator }}',
'{{ EvaluationPeriods }}',
'{{ GroupIdentifier }}',
'{{ MetricName }}',
'{{ Name }}',
'{{ Period }}',
'{{ Statistic }}',
'{{ TargetResourceType }}',
'{{ Threshold }}',
'{{ TreatMissingData }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.medialive.cloud_watch_alarm_templates
WHERE data__Identifier = '<Identifier>'
AND region = 'us-east-1';

Permissions

To operate on the cloud_watch_alarm_templates resource, the following permissions are required:

Create

medialive:CreateCloudWatchAlarmTemplate,
medialive:GetCloudWatchAlarmTemplate,
medialive:CreateTags

Read

medialive:GetCloudWatchAlarmTemplate

Update

medialive:UpdateCloudWatchAlarmTemplate,
medialive:GetCloudWatchAlarmTemplate,
medialive:CreateTags,
medialive:DeleteTags

Delete

medialive:DeleteCloudWatchAlarmTemplate

List

medialive:ListCloudWatchAlarmTemplates