Method: AwsCloudTrailTrail#delivered_logs_days_ago
- Defined in:
- lib/resources/aws/aws_cloudtrail_trail.rb
#delivered_logs_days_ago ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/resources/aws/aws_cloudtrail_trail.rb', line 32 def delivered_logs_days_ago query = { name: @trail_name } catch_aws_errors do begin resp = BackendFactory.create(inspec_runner).get_trail_status(query).to_h ((Time.now - resp[:latest_cloud_watch_logs_delivery_time])/(24*60*60)).to_i unless resp[:latest_cloud_watch_logs_delivery_time].nil? rescue Aws::CloudTrail::Errors::TrailNotFoundException nil end end end |