Class: CfnGuardian::Models::DomainExpiryEvent

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

Instance Attribute Summary collapse

Attributes inherited from BaseEvent

#cron, #enabled, #environment, #group, #hash, #name, #resource, #ssm_parameters, #target, #type

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ DomainExpiryEvent

Returns a new instance of DomainExpiryEvent.



206
207
208
209
210
211
212
213
214
# File 'lib/cfnguardian/models/event.rb', line 206

def initialize(resource)
  super(resource)
  @group = 'DomainExpiry'
  @name = 'DomainExpiryEvent'
  @target = 'DomainExpiryCheckFunction'
  @cron = resource.fetch('Schedule', "0 12 * * ? *")
  @domain = resource['Id']
  @region = resource.fetch('Region',"${AWS::Region}")
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



203
204
205
# File 'lib/cfnguardian/models/event.rb', line 203

def domain
  @domain
end

#regionObject

Returns the value of attribute region.



203
204
205
# File 'lib/cfnguardian/models/event.rb', line 203

def region
  @region
end

Instance Method Details

#payloadObject



216
217
218
# File 'lib/cfnguardian/models/event.rb', line 216

def payload
  return {'Domain' => @domain}.to_json
end