Class: AWSCDK::MediaLive::CfnCloudWatchAlarmTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
media_live/cfn_cloud_watch_alarm_template_props.rb

Overview

Properties for defining a CfnCloudWatchAlarmTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(comparison_operator:, evaluation_periods:, metric_name:, name:, period:, statistic:, target_resource_type:, threshold:, treat_missing_data:, datapoints_to_alarm: nil, description: nil, group_identifier: nil, tags: nil) ⇒ CfnCloudWatchAlarmTemplateProps

Returns a new instance of CfnCloudWatchAlarmTemplateProps.

Parameters:

  • comparison_operator (String)

    The comparison operator used to compare the specified statistic and the threshold.

  • evaluation_periods (Numeric)

    The number of periods over which data is compared to the specified threshold.

  • metric_name (String)

    The name of the metric associated with the alarm.

  • name (String)

    A resource's name.

  • period (Numeric)

    The period, in seconds, over which the specified statistic is applied.

  • statistic (String)

    The statistic to apply to the alarm's metric data.

  • target_resource_type (String)

    The resource type this template should dynamically generate CloudWatch metric alarms for.

  • threshold (Numeric)

    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.

  • datapoints_to_alarm (Numeric, nil) (defaults to: nil)

    The number of datapoints within the evaluation period that must be breaching to trigger the alarm.

  • description (String, nil) (defaults to: nil)

    A resource's optional description.

  • group_identifier (String, nil) (defaults to: nil)

    A cloudwatch alarm template group's identifier.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Represents the tags associated with a resource.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 22

def initialize(comparison_operator:, evaluation_periods:, metric_name:, name:, period:, statistic:, target_resource_type:, threshold:, treat_missing_data:, datapoints_to_alarm: nil, description: nil, group_identifier: nil, tags: nil)
  @comparison_operator = comparison_operator
  Jsii::Type.check_type(@comparison_operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comparisonOperator")
  @evaluation_periods = evaluation_periods
  Jsii::Type.check_type(@evaluation_periods, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "evaluationPeriods")
  @metric_name = metric_name
  Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @period = period
  Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "period")
  @statistic = statistic
  Jsii::Type.check_type(@statistic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statistic")
  @target_resource_type = target_resource_type
  Jsii::Type.check_type(@target_resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetResourceType")
  @threshold = threshold
  Jsii::Type.check_type(@threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "threshold")
  @treat_missing_data = treat_missing_data
  Jsii::Type.check_type(@treat_missing_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatMissingData")
  @datapoints_to_alarm = datapoints_to_alarm
  Jsii::Type.check_type(@datapoints_to_alarm, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "datapointsToAlarm") unless @datapoints_to_alarm.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @group_identifier = group_identifier
  Jsii::Type.check_type(@group_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupIdentifier") unless @group_identifier.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#comparison_operatorString (readonly)

The comparison operator used to compare the specified statistic and the threshold.



55
56
57
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 55

def comparison_operator
  @comparison_operator
end

#datapoints_to_alarmNumeric? (readonly)

Note:

Default: - 0

The number of datapoints within the evaluation period that must be breaching to trigger the alarm.



108
109
110
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 108

def datapoints_to_alarm
  @datapoints_to_alarm
end

#descriptionString? (readonly)

A resource's optional description.



113
114
115
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 113

def description
  @description
end

#evaluation_periodsNumeric (readonly)

Note:

Default: - 0

The number of periods over which data is compared to the specified threshold.



61
62
63
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 61

def evaluation_periods
  @evaluation_periods
end

#group_identifierString? (readonly)

A cloudwatch alarm template group's identifier.

Can be either be its id or current name.



120
121
122
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 120

def group_identifier
  @group_identifier
end

#metric_nameString (readonly)

The name of the metric associated with the alarm.

Must be compatible with targetResourceType.



68
69
70
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 68

def metric_name
  @metric_name
end

#nameString (readonly)

A resource's name.

Names must be unique within the scope of a resource type in a specific region.



75
76
77
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 75

def name
  @name
end

#periodNumeric (readonly)

Note:

Default: - 0

The period, in seconds, over which the specified statistic is applied.



81
82
83
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 81

def period
  @period
end

#statisticString (readonly)

The statistic to apply to the alarm's metric data.



86
87
88
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 86

def statistic
  @statistic
end

#tagsHash{String => String}? (readonly)

Represents the tags associated with a resource.



125
126
127
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 125

def tags
  @tags
end

#target_resource_typeString (readonly)

The resource type this template should dynamically generate CloudWatch metric alarms for.



91
92
93
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 91

def target_resource_type
  @target_resource_type
end

#thresholdNumeric (readonly)

Note:

Default: - 0

The threshold value to compare with the specified statistic.



97
98
99
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 97

def threshold
  @threshold
end

#treat_missing_dataString (readonly)

Specifies how missing data points are treated when evaluating the alarm's condition.



102
103
104
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 102

def treat_missing_data
  @treat_missing_data
end

Class Method Details

.jsii_propertiesObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 127

def self.jsii_properties
  {
    :comparison_operator => "comparisonOperator",
    :evaluation_periods => "evaluationPeriods",
    :metric_name => "metricName",
    :name => "name",
    :period => "period",
    :statistic => "statistic",
    :target_resource_type => "targetResourceType",
    :threshold => "threshold",
    :treat_missing_data => "treatMissingData",
    :datapoints_to_alarm => "datapointsToAlarm",
    :description => "description",
    :group_identifier => "groupIdentifier",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'media_live/cfn_cloud_watch_alarm_template_props.rb', line 145

def to_jsii
  result = {}
  result.merge!({
    "comparisonOperator" => @comparison_operator,
    "evaluationPeriods" => @evaluation_periods,
    "metricName" => @metric_name,
    "name" => @name,
    "period" => @period,
    "statistic" => @statistic,
    "targetResourceType" => @target_resource_type,
    "threshold" => @threshold,
    "treatMissingData" => @treat_missing_data,
    "datapointsToAlarm" => @datapoints_to_alarm,
    "description" => @description,
    "groupIdentifier" => @group_identifier,
    "tags" => @tags,
  })
  result.compact
end