Sha256: 7cb05a0b0cba3da21d6e6660d6e8ee967bac400ab41edac862721de15a184999
Contents?: true
Size: 952 Bytes
Versions: 12
Compression:
Stored size: 952 Bytes
Contents
require 'fog/aws/models/auto_scaling/policy' module Fog module AWS class AutoScaling class Policies < Fog::Collection model Fog::AWS::AutoScaling::Policy # Creates a new scaling policy. def initialize(attributes={}) super end def all data = [] next_token = nil loop do result = connection.describe_policies('NextToken' => next_token).body['DescribePoliciesResult'] data += result['ScalingPolicies'] next_token = result['NextToken'] break if next_token.nil? end load(data) end def get(identity, auto_scaling_group = nil) data = connection.describe_policies('PolicyNames' => identity, 'AutoScalingGroupName' => auto_scaling_group).body['DescribePoliciesResult']['ScalingPolicies'].first new(data) unless data.nil? end end end end end
Version data entries
12 entries across 12 versions & 7 rubygems