Sha256: 35c68a64be2467eaad04ad0666ec80c049889d1a4ad982cf5969794e3f7c3367
Contents?: true
Size: 1.29 KB
Versions: 43
Compression:
Stored size: 1.29 KB
Contents
require_relative '../resource_attribute' module Convection module Model class Template class ResourceAttribute # Represents {http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html} class UpdatePolicy < ResourceAttribute @pause = 'PT5M' @min_in_service = 0 @max_batch = 1 @wait_on_res = false def pause_time(val) @pause = val end def min_instances_in_service(val) @min_in_service = val end def max_batch_size(val) @max_batch = val end def wait_on_resource_signals(val) @wait_on_res = val end def render(resource) resource.tap do |r| r['UpdatePolicy'] = { 'AutoScalingScheduledAction' => { 'IgnoreUnmodifiedGroupSizeProperties' => true }, 'AutoScalingRollingUpdate' => { 'MinInstancesInService' => @min_in_service, 'MaxBatchSize' => @max_batch, 'WaitOnResourceSignals' => @wait_on_res, 'PauseTime' => @pause } } end end end end end end end
Version data entries
43 entries across 43 versions & 1 rubygems