You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::AutoScaling::ScalingPolicyCollection
- Inherits:
-
Object
- Object
- AWS::AutoScaling::ScalingPolicyCollection
- Includes:
- Core::Collection::WithLimitAndNextToken
- Defined in:
- lib/aws/auto_scaling/scaling_policy_collection.rb
Instance Attribute Summary collapse
-
#group ⇒ Group
(also: #auto_scaling_group)
readonly
Instance Method Summary collapse
-
#[](policy_name) ⇒ ScalingPolicy
-
#create(name, options = {}) ⇒ ScalingPolicy
(also: #put)
-
#initialize(auto_scaling_group, options = {}) ⇒ ScalingPolicyCollection
constructor
A new instance of ScalingPolicyCollection.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Constructor Details
#initialize(auto_scaling_group, options = {}) ⇒ ScalingPolicyCollection
Returns a new instance of ScalingPolicyCollection
21 22 23 24 |
# File 'lib/aws/auto_scaling/scaling_policy_collection.rb', line 21 def initialize auto_scaling_group, = {} @group = auto_scaling_group super end |
Instance Attribute Details
#group ⇒ Group (readonly) Also known as: auto_scaling_group
27 28 29 |
# File 'lib/aws/auto_scaling/scaling_policy_collection.rb', line 27 def group @group end |
Instance Method Details
#[](policy_name) ⇒ ScalingPolicy
45 46 47 |
# File 'lib/aws/auto_scaling/scaling_policy_collection.rb', line 45 def [] policy_name ScalingPolicy.new(group, policy_name) end |
#create(name, options = {}) ⇒ ScalingPolicy Also known as: put
36 37 38 39 40 |
# File 'lib/aws/auto_scaling/scaling_policy_collection.rb', line 36 def create name, = {} scaling_policy = self[name] scaling_policy.put() scaling_policy end |