Class: CfnGuardian::Resource::Batch

Inherits:
Base
  • Object
show all
Defined in:
lib/cfnguardian/resources/batch.rb

Instance Method Summary collapse

Methods inherited from Base

#default_alarms, #default_checks, #default_events, #default_metric_filters, #get_alarms, #get_checks, #get_cost, #get_event_subscriptions, #get_events, #get_metric_filters, #initialize, #resource_exists?

Methods included from Logging

colors, included, logger, #logger, logger=

Constructor Details

This class inherits a constructor from CfnGuardian::Resource::Base

Instance Method Details

#default_event_subscriptionsObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/cfnguardian/resources/batch.rb', line 3

def default_event_subscriptions()
  event_subscription = CfnGuardian::Models::BatchEventSubscription.new(@resource)
  event_subscription.name = 'FailedBatch'
  event_subscription.detail_type = 'Batch Job State Change'
  event_subscription.detail = {
    'status': ['FAILED'],
    'jobQueue': ["arn:aws:batch:${AWS::Region}:${AWS::AccountId}:job-queue/#{@resource['Id']}"]
  }
  @event_subscriptions.push(event_subscription)
end