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
Name | cloud_watch_alarm_templates |
Type | Resource |
Description | Definition of AWS::MediaLive::CloudWatchAlarmTemplate Resource Type |
Id | aws.medialive.cloud_watch_alarm_templates |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | A cloudwatch alarm template's ARN (Amazon Resource Name) |
comparison_operator | string | The comparison operator used to compare the specified statistic and the threshold. |
created_at | string | |
datapoints_to_alarm | number | The number of datapoints within the evaluation period that must be breaching to trigger the alarm. |
description | string | A resource's optional description. |
evaluation_periods | number | The number of periods over which data is compared to the specified threshold. |
group_id | string | A cloudwatch alarm template group's id. AWS provided template groups have ids that start with `aws-` |
group_identifier | string | A cloudwatch alarm template group's identifier. Can be either be its id or current name. |
id | string | A cloudwatch alarm template's id. AWS provided templates have ids that start with `aws-` |
identifier | string | |
metric_name | string | The name of the metric associated with the alarm. Must be compatible with targetResourceType. |
modified_at | string | |
name | string | A resource's name. Names must be unique within the scope of a resource type in a specific region. |
period | number | The period, in seconds, over which the specified statistic is applied. |
statistic | string | The statistic to apply to the alarm's metric data. |
tags | object | Represents the tags associated with a resource. |
target_resource_type | string | The resource type this template should dynamically generate cloudwatch metric alarms for. |
threshold | number | The threshold value to compare with the specified statistic. |
treat_missing_data | string | Specifies how missing data points are treated when evaluating the alarm's condition. |
region | string | AWS region. |
For more information, see AWS::MediaLive::CloudWatchAlarmTemplate
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ComparisonOperator, EvaluationPeriods, GroupIdentifier, MetricName, Name, Period, Statistic, TargetResourceType, Threshold, TreatMissingData, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ create */
INSERT INTO aws.medialive.cloud_watch_alarm_templates (
ComparisonOperator,
DatapointsToAlarm,
Description,
EvaluationPeriods,
GroupIdentifier,
MetricName,
Name,
Period,
Statistic,
Tags,
TargetResourceType,
Threshold,
TreatMissingData,
region
)
SELECT
'{{ ComparisonOperator }}',
'{{ DatapointsToAlarm }}',
'{{ Description }}',
'{{ EvaluationPeriods }}',
'{{ GroupIdentifier }}',
'{{ MetricName }}',
'{{ Name }}',
'{{ Period }}',
'{{ Statistic }}',
'{{ Tags }}',
'{{ TargetResourceType }}',
'{{ Threshold }}',
'{{ TreatMissingData }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cloud_watch_alarm_template
props:
- name: ComparisonOperator
value: '{{ ComparisonOperator }}'
- name: DatapointsToAlarm
value: null
- name: Description
value: '{{ Description }}'
- name: EvaluationPeriods
value: null
- name: GroupIdentifier
value: '{{ GroupIdentifier }}'
- name: MetricName
value: '{{ MetricName }}'
- name: Name
value: '{{ Name }}'
- name: Period
value: null
- name: Statistic
value: '{{ Statistic }}'
- name: Tags
value: {}
- name: TargetResourceType
value: '{{ TargetResourceType }}'
- name: Threshold
value: null
- name: TreatMissingData
value: '{{ TreatMissingData }}'
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