Sha256: c8018bf145d69b6b107f78c0dde2b013a3a613e37d2b0b1bf8ae5ef3986f1565

Contents?: true

Size: 657 Bytes

Versions: 31

Compression:

Stored size: 657 Bytes

Contents

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

31 entries across 31 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.25.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.24.4 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.24.3 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.24.2 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.24.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.24.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.23.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.22.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.22.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.21.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.21.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.20.0 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.19.2 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.19.1 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.19.0 lib/awspec/helper/finder/cloudtrail.rb
cthiesfork-awspec-1.2.4 lib/awspec/helper/finder/cloudtrail.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/helper/finder/cloudtrail.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/helper/finder/cloudtrail.rb
awspec-1.18.6 lib/awspec/helper/finder/cloudtrail.rb