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.



220
221
222
223
224
225
226
227
228
# File 'lib/cfnguardian/models/event.rb', line 220

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.



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

def domain
  @domain
end

#regionObject

Returns the value of attribute region.



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

def region
  @region
end

Instance Method Details

#payloadObject



230
231
232
# File 'lib/cfnguardian/models/event.rb', line 230

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