Method: Fog::AWS::AutoScaling::Policy#save

Defined in:
lib/fog/aws/models/auto_scaling/policy.rb

#saveObject

TODO: implement #alarms TODO: implement #auto_scaling_group



25
26
27
28
29
30
31
32
33
34
35
36
# 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