Sha256: 7ef17cac94cca09669b32bd893424908029de8ea0d8af80f1acb0ac2cbc0e0c3

Contents?: true

Size: 726 Bytes

Versions: 6

Compression:

Stored size: 726 Bytes

Contents

# frozen_string_literal: true

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

    #
    # list_identities
    #
    @client.list_identities.each_with_index do |response, page|
      log(response.context.operation_name, page)

      response.identities.each do |identity|
        struct = OpenStruct.new
        struct.type = 'identity'
        struct.arn = "aws:ses:#{@region}::identity/#{identity}"

        # get_identity_dkim_attributes
        struct.dkim_attributes = @client.get_identity_dkim_attributes({ identities: [identity] }).dkim_attributes[identity].to_h

        resources.push(struct.to_h)
      end
    end

    resources
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aws_recon-0.2.33 lib/aws_recon/collectors/ses.rb
aws_recon-0.2.32 lib/aws_recon/collectors/ses.rb
aws_recon-0.2.31 lib/aws_recon/collectors/ses.rb
aws_recon-0.2.30 lib/aws_recon/collectors/ses.rb
aws_recon-0.2.29 lib/aws_recon/collectors/ses.rb
aws_recon-0.2.28 lib/aws_recon/collectors/ses.rb