Sha256: b45223039846def0fa0de0d3b2f5e5ef15565f6396d9cd0b26a2fbd0583e0fef

Contents?: true

Size: 580 Bytes

Versions: 9

Compression:

Stored size: 580 Bytes

Contents

class ApplicationAutoScaling < Mapper
  #
  # Returns an array of resources.
  #
  def collect
    resources = []

    #
    # DynamoDB auto-scaling policies
    #
    @client.describe_scaling_policies({ service_namespace: 'dynamodb' }).each_with_index do |response, page|
      log(response.context.operation_name, page)

      response.scaling_policies.each do |policy|
        struct = OpenStruct.new(policy.to_h)
        struct.type = 'auto_scaling_policy'
        struct.arn = policy.policy_arn

        resources.push(struct.to_h)
      end
    end

    resources
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aws_recon-0.2.27 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.26 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.25 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.24 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.23 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.22 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.21 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.20 lib/aws_recon/collectors/applicationautoscaling.rb
aws_recon-0.2.19 lib/aws_recon/collectors/applicationautoscaling.rb