Sha256: 74e2291b164b4edf26c8708c1d2c070ea9f6ded0d1489668e8787fcddcde90ac

Contents?: true

Size: 688 Bytes

Versions: 13

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

module Awspec::Helper
  module Finder
    module Cloudtrail
      def select_all_trails
        cloudtrail_client.describe_trails.trail_list
      end

      def find_trail(id)
        ret = cloudtrail_client.describe_trails.trail_list.find do |trail|
          trail.name == id
        end
      end

      def get_trail_status(id)
        cloudtrail_client.get_trail_status(name: id)
      end

      def get_trail_tags(arn)
        cloudtrail_client.list_tags(
          resource_id_list: [arn]
        )[:resource_tag_list].first[:tags_list]
      end

      def is_logging?(id)
        ret = get_trail_status(id).is_logging
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
awspec-1.31.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.30.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.29.3 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.29.2 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.29.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.29.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.28.2 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.28.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.28.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.27.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.27.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.26.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.25.2 lib/awspec/helper/finder/cloudtrail.rb