Class: Jets::Cfn::Resource::S3::Bucket
- Defined in:
- lib/jets/cfn/resource/s3/bucket.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bucket_logical_id ⇒ Object
readonly
Returns the value of attribute bucket_logical_id.
Instance Method Summary collapse
- #definition ⇒ Object
-
#initialize(props = {}) ⇒ Bucket
constructor
A new instance of Bucket.
- #outputs ⇒ Object
Methods inherited from Base
#attributes, #config, #logical_id, #normalize_tags, #parameters, #properties, #replacements, #replacer, #standarize, #template, truncate_id, #type
Methods included from Util::Camelize
Methods included from Util::Logging
Constructor Details
#initialize(props = {}) ⇒ Bucket
Returns a new instance of Bucket.
4 5 6 7 |
# File 'lib/jets/cfn/resource/s3/bucket.rb', line 4 def initialize(props = {}) @props = props # associated_properties from dsl.rb @bucket_logical_id = props.delete(:logical_id) || "{namespace}_s3_bucket" end |
Instance Attribute Details
#bucket_logical_id ⇒ Object (readonly)
Returns the value of attribute bucket_logical_id.
3 4 5 |
# File 'lib/jets/cfn/resource/s3/bucket.rb', line 3 def bucket_logical_id @bucket_logical_id end |
Instance Method Details
#definition ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/jets/cfn/resource/s3/bucket.rb', line 9 def definition { bucket_logical_id => { Type: "AWS::S3::Bucket", Properties: @props } } end |
#outputs ⇒ Object
18 19 20 21 22 |
# File 'lib/jets/cfn/resource/s3/bucket.rb', line 18 def outputs { bucket_logical_id => "!Ref #{bucket_logical_id.to_s.camelize}" } end |