Class: CfnGuardian::Models::BaseEventSubscription

Inherits:
Object
  • Object
show all
Defined in:
lib/cfnguardian/models/event_subscription.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ BaseEventSubscription

Returns a new instance of BaseEventSubscription.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cfnguardian/models/event_subscription.rb', line 17

def initialize(resource)
  @type = 'EventSubscription'
  @group = self.class.name.split('::').last
  @name = ''
  @hash = Digest::MD5.hexdigest resource['Id']
  @enabled = true
  @events = []
  @topic = 'Events'
  @resource_id = resource['Id']
  @resource_arn = ''
  @source = ''
  @detail_type = ''
  @detail = {}
end

Instance Attribute Details

#detailObject

Returns the value of attribute detail.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def detail
  @detail
end

#detail_typeObject

Returns the value of attribute detail_type.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def detail_type
  @detail_type
end

#enabledObject

Returns the value of attribute enabled.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def enabled
  @enabled
end

#groupObject (readonly)

Returns the value of attribute group.



5
6
7
# File 'lib/cfnguardian/models/event_subscription.rb', line 5

def group
  @group
end

#hashObject

Returns the value of attribute hash.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def hash
  @hash
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def name
  @name
end

#resource_arnObject

Returns the value of attribute resource_arn.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def resource_arn
  @resource_arn
end

#resource_idObject

Returns the value of attribute resource_id.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def resource_id
  @resource_id
end

#sourceObject

Returns the value of attribute source.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def source
  @source
end

#topicObject

Returns the value of attribute topic.



7
8
9
# File 'lib/cfnguardian/models/event_subscription.rb', line 7

def topic
  @topic
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/cfnguardian/models/event_subscription.rb', line 5

def type
  @type
end