Class: AWSCDK::CXAPI::AWSCloudFormationStackProperties Deprecated
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CXAPI::AWSCloudFormationStackProperties
- Defined in:
- cxapi/aws_cloud_formation_stack_properties.rb
Overview
The definition of this type has moved to @aws-cdk/cloud-assembly-api.
Artifact properties for CloudFormation stacks.
Instance Attribute Summary collapse
-
#parameters ⇒ Hash{String => String}?
readonly
Values for CloudFormation stack parameters that should be passed when the stack is deployed.
-
#stack_name ⇒ String?
readonly
The name to use for the CloudFormation stack.
-
#template_file ⇒ String
readonly
A file relative to the assembly root which contains the CloudFormation template for this stack.
-
#termination_protection ⇒ Boolean?
readonly
Whether to enable termination protection for this stack.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(template_file:, parameters: nil, stack_name: nil, termination_protection: nil) ⇒ AWSCloudFormationStackProperties
constructor
A new instance of AWSCloudFormationStackProperties.
- #to_jsii ⇒ Object
Constructor Details
#initialize(template_file:, parameters: nil, stack_name: nil, termination_protection: nil) ⇒ AWSCloudFormationStackProperties
Returns a new instance of AWSCloudFormationStackProperties.
13 14 15 16 17 18 19 20 21 22 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 13 def initialize(template_file:, parameters: nil, stack_name: nil, termination_protection: nil) @template_file = template_file Jsii::Type.check_type(@template_file, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateFile") @parameters = parameters Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "parameters") unless @parameters.nil? @stack_name = stack_name Jsii::Type.check_type(@stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName") unless @stack_name.nil? @termination_protection = termination_protection Jsii::Type.check_type(@termination_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "terminationProtection") unless @termination_protection.nil? end |
Instance Attribute Details
#parameters ⇒ Hash{String => String}? (readonly)
Values for CloudFormation stack parameters that should be passed when the stack is deployed.
31 32 33 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 31 def parameters @parameters end |
#stack_name ⇒ String? (readonly)
Default: - name derived from artifact ID
The name to use for the CloudFormation stack.
36 37 38 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 36 def stack_name @stack_name end |
#template_file ⇒ String (readonly)
A file relative to the assembly root which contains the CloudFormation template for this stack.
27 28 29 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 27 def template_file @template_file end |
#termination_protection ⇒ Boolean? (readonly)
Default: false
Whether to enable termination protection for this stack.
41 42 43 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 41 def termination_protection @termination_protection end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 43 def self.jsii_properties { :template_file => "templateFile", :parameters => "parameters", :stack_name => "stackName", :termination_protection => "terminationProtection", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 52 def to_jsii result = {} result.merge!({ "templateFile" => @template_file, "parameters" => @parameters, "stackName" => @stack_name, "terminationProtection" => @termination_protection, }) result.compact end |