Class: AWSCDK::CloudWatch::CfnAlarmMuteRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/cfn_alarm_mute_rule_props.rb

Overview

Properties for defining a CfnAlarmMuteRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule:, description: nil, expire_date: nil, mute_targets: nil, name: nil, start_date: nil, tags: nil) ⇒ CfnAlarmMuteRuleProps

Returns a new instance of CfnAlarmMuteRuleProps.

Parameters:

  • rule (AWSCDK::IResolvable, AWSCDK::CloudWatch::CfnAlarmMuteRule::RuleProperty)

    The rule for the mute.

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

    The description of the AlarmMuteRule.

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

    The date, with the same timezone offset as "ScheduleTimezone" after which the alarm mute rule will be expired.

  • mute_targets (AWSCDK::IResolvable, AWSCDK::CloudWatch::CfnAlarmMuteRule::MuteTargetsProperty, nil) (defaults to: nil)

    Targets to be muted.

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

    The name of the AlarmMuteRule.

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

    The date, with the same timezone offset as "ScheduleTimezone", after which the alarm mute rule will become active.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 16

def initialize(rule:, description: nil, expire_date: nil, mute_targets: nil, name: nil, start_date: nil, tags: nil)
  @rule = rule.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAlarmMuteRule::RuleProperty.new(**rule.transform_keys(&:to_sym)) : rule
  Jsii::Type.check_type(@rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFsYXJtTXV0ZVJ1bGUuUnVsZVByb3BlcnR5In1dfX0=")), "rule")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @expire_date = expire_date
  Jsii::Type.check_type(@expire_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expireDate") unless @expire_date.nil?
  @mute_targets = mute_targets.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAlarmMuteRule::MuteTargetsProperty.new(**mute_targets.transform_keys(&:to_sym)) : mute_targets
  Jsii::Type.check_type(@mute_targets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFsYXJtTXV0ZVJ1bGUuTXV0ZVRhcmdldHNQcm9wZXJ0eSJ9XX19")), "muteTargets") unless @mute_targets.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @start_date = start_date
  Jsii::Type.check_type(@start_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startDate") unless @start_date.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the AlarmMuteRule.



42
43
44
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 42

def description
  @description
end

#expire_dateString? (readonly)

The date, with the same timezone offset as "ScheduleTimezone" after which the alarm mute rule will be expired.



47
48
49
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 47

def expire_date
  @expire_date
end

#mute_targetsAWSCDK::IResolvable, ... (readonly)

Targets to be muted.



52
53
54
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 52

def mute_targets
  @mute_targets
end

#nameString? (readonly)

The name of the AlarmMuteRule.



57
58
59
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 57

def name
  @name
end

#start_dateString? (readonly)

The date, with the same timezone offset as "ScheduleTimezone", after which the alarm mute rule will become active.



62
63
64
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 62

def start_date
  @start_date
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.



67
68
69
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 67

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
79
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 69

def self.jsii_properties
  {
    :rule => "rule",
    :description => "description",
    :expire_date => "expireDate",
    :mute_targets => "muteTargets",
    :name => "name",
    :start_date => "startDate",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'cloud_watch/cfn_alarm_mute_rule_props.rb', line 81

def to_jsii
  result = {}
  result.merge!({
    "rule" => @rule,
    "description" => @description,
    "expireDate" => @expire_date,
    "muteTargets" => @mute_targets,
    "name" => @name,
    "startDate" => @start_date,
    "tags" => @tags,
  })
  result.compact
end