Class: AWSCDK::ARCRegionSwitch::CfnPlan::TriggerProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
arc_region_switch/cfn_plan.rb

Overview

Defines a condition that can automatically trigger the execution of a Region switch plan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, conditions:, min_delay_minutes_between_executions:, target_region:, description: nil) ⇒ TriggerProperty

Returns a new instance of TriggerProperty.

Parameters:

  • action (String)

    The action to perform when the trigger fires.

  • conditions (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ARCRegionSwitch::CfnPlan::TriggerConditionProperty>)

    The conditions that must be met for the trigger to fire.

  • min_delay_minutes_between_executions (Numeric)

    The minimum time, in minutes, that must elapse between automatic executions of the plan.

  • target_region (String)

    The AWS Region for a trigger.

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

    The description for a trigger.



3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
# File 'arc_region_switch/cfn_plan.rb', line 3133

def initialize(action:, conditions:, min_delay_minutes_between_executions:, target_region:, description: nil)
  @action = action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action")
  @conditions = conditions
  Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXJjcmVnaW9uc3dpdGNoLkNmblBsYW4uVHJpZ2dlckNvbmRpdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "conditions")
  @min_delay_minutes_between_executions = min_delay_minutes_between_executions
  Jsii::Type.check_type(@min_delay_minutes_between_executions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minDelayMinutesBetweenExecutions")
  @target_region = target_region
  Jsii::Type.check_type(@target_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetRegion")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
end

Instance Attribute Details

#actionString (readonly)

The action to perform when the trigger fires.

Valid values include ACTIVATE and DEACTIVATE.



3152
3153
3154
# File 'arc_region_switch/cfn_plan.rb', line 3152

def action
  @action
end

#descriptionString? (readonly)

The description for a trigger.



3172
3173
3174
# File 'arc_region_switch/cfn_plan.rb', line 3172

def description
  @description
end

#min_delay_minutes_between_executionsNumeric (readonly)

The minimum time, in minutes, that must elapse between automatic executions of the plan.



3162
3163
3164
# File 'arc_region_switch/cfn_plan.rb', line 3162

def min_delay_minutes_between_executions
  @min_delay_minutes_between_executions
end

#target_regionString (readonly)

The AWS Region for a trigger.



3167
3168
3169
# File 'arc_region_switch/cfn_plan.rb', line 3167

def target_region
  @target_region
end

Class Method Details

.jsii_propertiesObject



3174
3175
3176
3177
3178
3179
3180
3181
3182
# File 'arc_region_switch/cfn_plan.rb', line 3174

def self.jsii_properties
  {
    :action => "action",
    :conditions => "conditions",
    :min_delay_minutes_between_executions => "minDelayMinutesBetweenExecutions",
    :target_region => "targetRegion",
    :description => "description",
  }
end

Instance Method Details

#to_jsiiObject



3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
# File 'arc_region_switch/cfn_plan.rb', line 3184

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "conditions" => @conditions,
    "minDelayMinutesBetweenExecutions" => @min_delay_minutes_between_executions,
    "targetRegion" => @target_region,
    "description" => @description,
  })
  result.compact
end