class Fog::AWS::AutoScaling::Policy
Public Class Methods
new(attributes)
click to toggle source
Calls superclass method
# File lib/fog/aws/models/auto_scaling/policy.rb, line 14 def initialize(attributes) attributes['AdjustmentType'] ||= 'ChangeInCapacity' attributes['ScalingAdjustment'] ||= 1 super end
Public Instance Methods
destroy()
click to toggle source
# File lib/fog/aws/models/auto_scaling/policy.rb, line 36 def destroy requires :id requires :auto_scaling_group_name service.delete_policy(auto_scaling_group_name, id) end
save()
click to toggle source
TODO: implement alarms TODO: implement auto_scaling_group
# File lib/fog/aws/models/auto_scaling/policy.rb, line 23 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? } service.put_scaling_policy(adjustment_type, auto_scaling_group_name, id, scaling_adjustment, options) reload end