cloud_watch_alarm_templates
Creates, updates, deletes, gets or lists a cloud_watch_alarm_templates resource.
Overview
| Name | cloud_watch_alarm_templates |
| Type | Resource |
| Id | aws.medialive.cloud_watch_alarm_templates |
Fields
The following fields are returned by SELECT queries:
- get_cloud_watch_alarm_template
- list_cloud_watch_alarm_templates
| 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. (GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold) |
created_at | string (date-time) | Placeholder documentation for __timestampIso8601 |
datapoints_to_alarm | integer | Placeholder documentation for __integerMin1 |
description | string | Placeholder documentation for __stringMin0Max1024 |
evaluation_periods | integer | Placeholder documentation for __integerMin1 |
group_id | string | Placeholder documentation for __stringMin7Max11PatternAws097 |
id | string | Placeholder documentation for __stringMin7Max11PatternAws097 |
metric_name | string | Placeholder documentation for __stringMax64 |
modified_at | string (date-time) | Placeholder documentation for __timestampIso8601 |
name | string | Placeholder documentation for __stringMin1Max255PatternS |
period | integer | Placeholder documentation for __integerMin10Max86400 |
statistic | string | The statistic to apply to the alarm's metric data. (SampleCount, Average, Sum, Minimum, Maximum) |
tags | object | |
target_resource_type | string | The 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) |
threshold | number (double) | Placeholder documentation for __double |
treat_missing_data | string | Specifies how missing data points are treated when evaluating the alarm's condition. (notBreaching, breaching, ignore, missing) |
| 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. (GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold) |
created_at | string (date-time) | Placeholder documentation for __timestampIso8601 |
datapoints_to_alarm | integer | Placeholder documentation for __integerMin1 |
description | string | Placeholder documentation for __stringMin0Max1024 |
evaluation_periods | integer | Placeholder documentation for __integerMin1 |
group_id | string | A cloudwatch alarm template group's id. AWS provided template groups have ids that start with aws- |
id | string | A cloudwatch alarm template's id. AWS provided templates have ids that start with aws- |
metric_name | string | Placeholder documentation for __stringMax64 |
modified_at | string (date-time) | Placeholder documentation for __timestampIso8601 |
name | string | Placeholder documentation for __stringMin1Max255PatternS |
period | integer | Placeholder documentation for __integerMin10Max86400 |
statistic | string | The statistic to apply to the alarm's metric data. (SampleCount, Average, Sum, Minimum, Maximum) |
tags | object | |
target_resource_type | string | The 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) |
threshold | number (double) | Placeholder documentation for __double |
treat_missing_data | string | Specifies 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cloud_watch_alarm_template | select | identifier, region | Retrieves the specified cloudwatch alarm template. | |
list_cloud_watch_alarm_templates | select | region | groupIdentifier, maxResults, nextToken, scope, signalMapIdentifier | Lists cloudwatch alarm templates. |
create_cloud_watch_alarm_template | insert | region, ComparisonOperator, EvaluationPeriods, GroupIdentifier, MetricName, TargetResourceType, TreatMissingData | Creates a cloudwatch alarm template to dynamically generate cloudwatch metric alarms on targeted resource types. | |
update_cloud_watch_alarm_template | update | identifier, region | Updates the specified cloudwatch alarm template. | |
delete_cloud_watch_alarm_template | delete | identifier, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
identifier | string | A cloudwatch alarm template's identifier. Can be either be its id or current name. |
region | string | AWS region (default: us-east-1) |
groupIdentifier | string | A cloudwatch alarm template group's identifier. Can be either be its id or current name. |
maxResults | integer | |
nextToken | string | A token used to retrieve the next set of results in paginated list responses. |
scope | string | Represents the scope of a resource, with options for all scopes, AWS provided resources, or local resources. |
signalMapIdentifier | string | A signal map's identifier. Can be either be its id or current name. |
SELECT examples
- get_cloud_watch_alarm_template
- list_cloud_watch_alarm_templates
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
;
Lists cloudwatch alarm templates.
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 region = '{{ region }}' -- required
AND groupIdentifier = '{{ groupIdentifier }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND scope = '{{ scope }}'
AND signalMapIdentifier = '{{ signalMapIdentifier }}'
;
INSERT examples
- create_cloud_watch_alarm_template
- Manifest
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
;
# Description fields are for documentation purposes
- name: cloud_watch_alarm_templates
props:
- name: region
value: "{{ region }}"
description: Required parameter for the cloud_watch_alarm_templates resource.
- name: ComparisonOperator
value: "{{ ComparisonOperator }}"
description: |
The comparison operator used to compare the specified statistic and the threshold.
valid_values: ['GreaterThanOrEqualToThreshold', 'GreaterThanThreshold', 'LessThanThreshold', 'LessThanOrEqualToThreshold']
- name: DatapointsToAlarm
value: {{ DatapointsToAlarm }}
description: |
Placeholder documentation for __integerMin1
- name: Description
value: "{{ Description }}"
description: |
Placeholder documentation for __stringMin0Max1024
- name: EvaluationPeriods
value: {{ EvaluationPeriods }}
description: |
Placeholder documentation for __integerMin1
- name: GroupIdentifier
value: "{{ GroupIdentifier }}"
description: |
Placeholder documentation for __stringPatternS
- name: MetricName
value: "{{ MetricName }}"
description: |
Placeholder documentation for __stringMax64
- name: Name
value: "{{ Name }}"
description: |
Placeholder documentation for __stringMin1Max255PatternS
- name: Period
value: {{ Period }}
description: |
Placeholder documentation for __integerMin10Max86400
- name: Statistic
value: "{{ Statistic }}"
description: |
The statistic to apply to the alarm's metric data.
valid_values: ['SampleCount', 'Average', 'Sum', 'Minimum', 'Maximum']
- name: Tags
value: "{{ Tags }}"
description: |
Represents the tags associated with a resource.
- name: TargetResourceType
value: "{{ TargetResourceType }}"
description: |
The resource type this template should dynamically generate cloudwatch metric alarms for.
valid_values: ['CLOUDFRONT_DISTRIBUTION', 'MEDIALIVE_MULTIPLEX', 'MEDIALIVE_CHANNEL', 'MEDIALIVE_INPUT_DEVICE', 'MEDIAPACKAGE_CHANNEL', 'MEDIAPACKAGE_ORIGIN_ENDPOINT', 'MEDIACONNECT_FLOW', 'S3_BUCKET', 'MEDIATAILOR_PLAYBACK_CONFIGURATION']
- name: Threshold
value: {{ Threshold }}
description: |
Placeholder documentation for __double
- name: TreatMissingData
value: "{{ TreatMissingData }}"
description: |
Specifies how missing data points are treated when evaluating the alarm's condition.
valid_values: ['notBreaching', 'breaching', 'ignore', 'missing']
- name: RequestId
value: "{{ RequestId }}"
description: |
Placeholder documentation for __stringMin1Max256PatternS
UPDATE examples
- update_cloud_watch_alarm_template
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
- delete_cloud_watch_alarm_template
Deletes a cloudwatch alarm template.
DELETE FROM aws.medialive.cloud_watch_alarm_templates
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;