Class: Fog::AWS::ELB::Policy
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::ELB::Policy
- Defined in:
- lib/fog/aws/models/elb/policy.rb
Instance Attribute Summary collapse
-
#cookie_stickiness ⇒ Object
Either :app or :lb.
Instance Method Summary collapse
Instance Attribute Details
#cookie_stickiness ⇒ Object
Either :app or :lb
13 14 15 |
# File 'lib/fog/aws/models/elb/policy.rb', line 13 def @cookie_stickiness end |
Instance Method Details
#destroy ⇒ Object
43 44 45 46 47 |
# File 'lib/fog/aws/models/elb/policy.rb', line 43 def destroy requires :id, :load_balancer service.delete_load_balancer_policy(load_balancer.id, id) reload end |
#load_balancer ⇒ Object
53 54 55 |
# File 'lib/fog/aws/models/elb/policy.rb', line 53 def load_balancer collection.load_balancer end |
#reload ⇒ Object
49 50 51 |
# File 'lib/fog/aws/models/elb/policy.rb', line 49 def reload load_balancer.reload end |
#save ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/fog/aws/models/elb/policy.rb', line 15 def save requires :id, :load_balancer service_method = nil args = [load_balancer.id, id] if 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 else requires :type_name, :policy_attributes method = :create_load_balancer_policy args << type_name args << policy_attributes end service.send(method, *args) reload end |