Class: CfnGuardian::Resource::Glue

Inherits:
Base
  • Object
show all
Defined in:
lib/cfnguardian/resources/glue.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
13
14
15
16
17
18
19
20
21
# File 'lib/cfnguardian/resources/glue.rb', line 3

def default_event_subscriptions()
  event_subscription = CfnGuardian::Models::BatchEventSubscription.new(@resource)
  event_subscription.name = 'FailedGlueJob'
  event_subscription.detail_type = 'Glue Job State Change'
  event_subscription.detail = {
    'state': ['FAILED'],
    'jobName': [{'prefix': @resource['Id']}]
  }
  @event_subscriptions.push(event_subscription)

  event_subscription = CfnGuardian::Models::BatchEventSubscription.new(@resource)
  event_subscription.name = 'TimeoutGlueJob'
  event_subscription.detail_type = 'Glue Job State Change'
  event_subscription.detail = {
    'state': ['TIMEOUT'],
    'jobName': [{'prefix': @resource['Id']}]
  }
  @event_subscriptions.push(event_subscription)
end