Sha256: d82af08f7d8a28767d5a04c432d62e0b37e6e4350cf395e9fb9524b0521e1485
Contents?: true
Size: 1.08 KB
Versions: 56
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true # # Collect Redshift resources # class Redshift < Mapper # # Returns an array of resources. # def collect resources = [] # # describe_clusters # @client.describe_clusters.each_with_index do |response, page| log(response.context.operation_name, page) response.clusters.each do |cluster| struct = OpenStruct.new(cluster.to_h) struct.type = 'cluster' struct.arn = cluster.cluster_identifier struct.logging_status = @client.describe_logging_status({ cluster_identifier: cluster.cluster_identifier }).to_h resources.push(struct.to_h) end end # # describe_cluster_subnet_groups # @client.describe_cluster_subnet_groups.each_with_index do |response, page| log(response.context.operation_name, page) response.cluster_subnet_groups.each do |group| struct = OpenStruct.new(group.to_h) struct.type = 'subnet_group' struct.arn = group.cluster_subnet_group_name resources.push(struct.to_h) end end resources end end
Version data entries
56 entries across 56 versions & 1 rubygems