# File lib/fog/aws/models/auto_scaling/policy.rb, line 16 def initialize(attributes) attributes['AdjustmentType'] ||= 'ChangeInCapacity' attributes['ScalingAdjustment'] ||= 1 super end
# File lib/fog/aws/models/auto_scaling/policy.rb, line 38 def destroy requires :id requires :auto_scaling_group_name connection.delete_policy(auto_scaling_group_name, id) end
TODO: implement alarms TODO: implement auto_scaling_group
# File lib/fog/aws/models/auto_scaling/policy.rb, line 25 def save requires :id requires :adjustment_type requires :auto_scaling_group_name requires :scaling_adjustment options = Hash[self.class.aliases.map { |key, value| [key, send(value)] }] options.delete_if { |key, value| value.nil? } connection.put_scaling_policy(adjustment_type, auto_scaling_group_name, id, scaling_adjustment, options) reload end