Class: Fog::AWS::ELB::Policy
- Defined in:
- lib/fog/aws/models/elb/policy.rb
Instance Attribute Summary collapse
-
#cookie_stickiness ⇒ Object
Either :app or :lb.
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#initialize, #inspect, #symbolize_keys, #to_json, #wait_for
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Attribute Details
#cookie_stickiness ⇒ Object
Either :app or :lb
12 13 14 |
# File 'lib/fog/aws/models/elb/policy.rb', line 12 def @cookie_stickiness end |
Instance Method Details
#destroy ⇒ Object
34 35 36 37 38 |
# File 'lib/fog/aws/models/elb/policy.rb', line 34 def destroy requires :id, :load_balancer connection.delete_load_balancer_policy(load_balancer.id, id) reload end |
#load_balancer ⇒ Object
44 45 46 |
# File 'lib/fog/aws/models/elb/policy.rb', line 44 def load_balancer collection.load_balancer end |
#reload ⇒ Object
40 41 42 |
# File 'lib/fog/aws/models/elb/policy.rb', line 40 def reload load_balancer.reload end |
#save ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fog/aws/models/elb/policy.rb', line 14 def save requires :id, :load_balancer, :cookie_stickiness connection_method = nil args = [load_balancer.id, id] case when :app requires :cookie method = :create_app_cookie_stickiness_policy args << when :lb method = :create_lb_cookie_stickiness_policy args << expiration if expiration else raise ArgumentError.new('cookie_stickiness must be :app or :lb') end connection.send(method, *args) reload end |