Class: EcsDeploy::AutoScaler::TriggerConfig

Inherits:
Struct
  • Object
show all
Includes:
ConfigBase
Defined in:
lib/ecs_deploy/auto_scaler/trigger_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConfigBase

#initialize, #logger

Instance Attribute Details

#alarm_nameObject

Returns the value of attribute alarm_name

Returns:

  • (Object)

    the current value of alarm_name



8
9
10
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 8

def alarm_name
  @alarm_name
end

#prioritized_over_upscale_triggersObject

Returns the value of attribute prioritized_over_upscale_triggers

Returns:

  • (Object)

    the current value of prioritized_over_upscale_triggers



8
9
10
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 8

def prioritized_over_upscale_triggers
  @prioritized_over_upscale_triggers
end

#regionObject

Returns the value of attribute region

Returns:

  • (Object)

    the current value of region



8
9
10
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 8

def region
  @region
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



8
9
10
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 8

def state
  @state
end

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



8
9
10
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 8

def step
  @step
end

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 11

def match?
  fetch_alarm.state_value == state
end

#prioritized_over_upscale_triggers?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ecs_deploy/auto_scaler/trigger_config.rb', line 15

def prioritized_over_upscale_triggers?
  !!prioritized_over_upscale_triggers
end