Class: AwsStack::CfnTemplate
- Inherits:
-
Object
- Object
- AwsStack::CfnTemplate
- Defined in:
- lib/awsstack/cfntemplate.rb
Overview
AWS CFN template file handling
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #delete_template ⇒ Object
-
#initialize(options) ⇒ CfnTemplate
constructor
A new instance of CfnTemplate.
Constructor Details
#initialize(options) ⇒ CfnTemplate
Returns a new instance of CfnTemplate.
7 8 9 10 11 12 13 14 |
# File 'lib/awsstack/cfntemplate.rb', line 7 def initialize() @credentials = [:credentials] @templatefile = [:templatefile] @stackname = [:stackname] @bucket_name = 'awsstack.cloudformation.templates' @bucket_template_filename = "#{@stackname}_#{File.basename(@templatefile)}" template end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/awsstack/cfntemplate.rb', line 6 def body @body end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/awsstack/cfntemplate.rb', line 6 def url @url end |
Instance Method Details
#delete_template ⇒ Object
16 17 18 19 20 21 |
# File 'lib/awsstack/cfntemplate.rb', line 16 def delete_template s3.delete_object( bucket: @bucket_name, key: @bucket_template_filename ) end |