Class: Cumulus::CloudFront::InvalidationConfig
- Inherits:
-
Object
- Object
- Cumulus::CloudFront::InvalidationConfig
- Defined in:
- lib/cloudfront/models/InvalidationConfig.rb
Overview
Public: An object representing configuration for a CloudFront invalidation
Instance Attribute Summary collapse
-
#distribution_id ⇒ Object
readonly
Returns the value of attribute distribution_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(name, json = nil) ⇒ InvalidationConfig
constructor
Public: Constructor.
Constructor Details
#initialize(name, json = nil) ⇒ InvalidationConfig
Public: Constructor
json - a hash containing the JSON configuration for the invalidation
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/cloudfront/models/InvalidationConfig.rb', line 14 def initialize(name, json = nil) if json @name = name begin @distribution_id = json.fetch("distribution-id") rescue KeyError puts "Must supply 'distribution-id' in invalidation config" exit end begin @paths = json.fetch("paths") rescue KeyError puts "Must supply 'paths' in invalidation config" exit end end end |
Instance Attribute Details
#distribution_id ⇒ Object (readonly)
Returns the value of attribute distribution_id.
7 8 9 |
# File 'lib/cloudfront/models/InvalidationConfig.rb', line 7 def distribution_id @distribution_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/cloudfront/models/InvalidationConfig.rb', line 9 def name @name end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
8 9 10 |
# File 'lib/cloudfront/models/InvalidationConfig.rb', line 8 def paths @paths end |