Class: AWSCDK::CXAPI::AWSCloudFormationStackProperties Deprecated

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cxapi/aws_cloud_formation_stack_properties.rb

Overview

Deprecated.

The definition of this type has moved to @aws-cdk/cloud-assembly-api.

Artifact properties for CloudFormation stacks.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template_file:, parameters: nil, stack_name: nil, termination_protection: nil) ⇒ AWSCloudFormationStackProperties

Returns a new instance of AWSCloudFormationStackProperties.

Parameters:

  • template_file (String)

    A file relative to the assembly root which contains the CloudFormation template for this stack.

  • parameters (Hash{String => String}, nil) (defaults to: nil)

    Values for CloudFormation stack parameters that should be passed when the stack is deployed.

  • stack_name (String, nil) (defaults to: nil)

    The name to use for the CloudFormation stack.

  • termination_protection (Boolean, nil) (defaults to: nil)

    Whether to enable termination protection for this stack.



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

#parametersHash{String => String}? (readonly)

Values for CloudFormation stack parameters that should be passed when the stack is deployed.

Returns:

  • (Hash{String => String}, nil)


31
32
33
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 31

def parameters
  @parameters
end

#stack_nameString? (readonly)

Note:

Default: - name derived from artifact ID

The name to use for the CloudFormation stack.

Returns:

  • (String, nil)


36
37
38
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 36

def stack_name
  @stack_name
end

#template_fileString (readonly)

A file relative to the assembly root which contains the CloudFormation template for this stack.

Returns:

  • (String)


27
28
29
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 27

def template_file
  @template_file
end

#termination_protectionBoolean? (readonly)

Note:

Default: false

Whether to enable termination protection for this stack.

Returns:

  • (Boolean, nil)


41
42
43
# File 'cxapi/aws_cloud_formation_stack_properties.rb', line 41

def termination_protection
  @termination_protection
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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