Class: AWSCDK::CloudAssemblySchema::AWSCloudFormationStackProperties
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudAssemblySchema::AWSCloudFormationStackProperties
- Defined in:
- cloud_assembly_schema/aws_cloud_formation_stack_properties.rb
Overview
Artifact properties for CloudFormation stacks.
Instance Attribute Summary collapse
-
#assume_role_additional_options ⇒ Hash{String => Object}?
readonly
Additional options to pass to STS when assuming the role.
-
#assume_role_arn ⇒ String?
readonly
The role that needs to be assumed to deploy the stack.
-
#assume_role_external_id ⇒ String?
readonly
External ID to use when assuming role for cloudformation deployments.
-
#bootstrap_stack_version_ssm_parameter ⇒ String?
readonly
SSM parameter where the bootstrap stack version number can be found.
-
#cloud_formation_execution_role_arn ⇒ String?
readonly
The role that is passed to CloudFormation to execute the change set.
-
#lookup_role ⇒ AWSCDK::CloudAssemblySchema::BootstrapRole?
readonly
The role to use to look up values from the target AWS account.
-
#notification_arns ⇒ Array<String>?
readonly
SNS Notification ARNs that should receive CloudFormation Stack Events.
-
#parameters ⇒ Hash{String => String}?
readonly
Values for CloudFormation stack parameters that should be passed when the stack is deployed.
-
#requires_bootstrap_stack_version ⇒ Numeric?
readonly
Version of bootstrap stack required to deploy this stack.
-
#stack_name ⇒ String?
readonly
The name to use for the CloudFormation stack.
-
#stack_template_asset_object_url ⇒ String?
readonly
If the stack template has already been included in the asset manifest, its asset URL.
-
#tags ⇒ Hash{String => String}?
readonly
Values for CloudFormation stack tags that should be passed when the stack is deployed.
-
#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.
-
#validate_on_synth ⇒ Boolean?
readonly
Whether this stack should be validated by the CLI after synthesis.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(template_file:, assume_role_additional_options: nil, assume_role_arn: nil, assume_role_external_id: nil, bootstrap_stack_version_ssm_parameter: nil, cloud_formation_execution_role_arn: nil, lookup_role: nil, notification_arns: nil, parameters: nil, requires_bootstrap_stack_version: nil, stack_name: nil, stack_template_asset_object_url: nil, tags: nil, termination_protection: nil, validate_on_synth: nil) ⇒ AWSCloudFormationStackProperties
constructor
A new instance of AWSCloudFormationStackProperties.
- #to_jsii ⇒ Object
Constructor Details
#initialize(template_file:, assume_role_additional_options: nil, assume_role_arn: nil, assume_role_external_id: nil, bootstrap_stack_version_ssm_parameter: nil, cloud_formation_execution_role_arn: nil, lookup_role: nil, notification_arns: nil, parameters: nil, requires_bootstrap_stack_version: nil, stack_name: nil, stack_template_asset_object_url: nil, tags: nil, termination_protection: nil, validate_on_synth: nil) ⇒ AWSCloudFormationStackProperties
Returns a new instance of AWSCloudFormationStackProperties.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 22 def initialize(template_file:, assume_role_additional_options: nil, assume_role_arn: nil, assume_role_external_id: nil, bootstrap_stack_version_ssm_parameter: nil, cloud_formation_execution_role_arn: nil, lookup_role: nil, notification_arns: nil, parameters: nil, requires_bootstrap_stack_version: nil, stack_name: nil, stack_template_asset_object_url: nil, tags: nil, termination_protection: nil, validate_on_synth: nil) @template_file = template_file Jsii::Type.check_type(@template_file, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateFile") @assume_role_additional_options = Jsii::Type.check_type(@assume_role_additional_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "assumeRoleAdditionalOptions") unless @assume_role_additional_options.nil? @assume_role_arn = assume_role_arn Jsii::Type.check_type(@assume_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assumeRoleArn") unless @assume_role_arn.nil? @assume_role_external_id = assume_role_external_id Jsii::Type.check_type(@assume_role_external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "assumeRoleExternalId") unless @assume_role_external_id.nil? @bootstrap_stack_version_ssm_parameter = bootstrap_stack_version_ssm_parameter Jsii::Type.check_type(@bootstrap_stack_version_ssm_parameter, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bootstrapStackVersionSsmParameter") unless @bootstrap_stack_version_ssm_parameter.nil? @cloud_formation_execution_role_arn = cloud_formation_execution_role_arn Jsii::Type.check_type(@cloud_formation_execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cloudFormationExecutionRoleArn") unless @cloud_formation_execution_role_arn.nil? @lookup_role = lookup_role.is_a?(Hash) ? ::AWSCDK::CloudAssemblySchema::BootstrapRole.new(**lookup_role.transform_keys(&:to_sym)) : lookup_role Jsii::Type.check_type(@lookup_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuQm9vdHN0cmFwUm9sZSJ9")), "lookupRole") unless @lookup_role.nil? @notification_arns = notification_arns Jsii::Type.check_type(@notification_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notificationArns") unless @notification_arns.nil? @parameters = parameters Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "parameters") unless @parameters.nil? @requires_bootstrap_stack_version = requires_bootstrap_stack_version Jsii::Type.check_type(@requires_bootstrap_stack_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "requiresBootstrapStackVersion") unless @requires_bootstrap_stack_version.nil? @stack_name = stack_name Jsii::Type.check_type(@stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName") unless @stack_name.nil? @stack_template_asset_object_url = stack_template_asset_object_url Jsii::Type.check_type(@stack_template_asset_object_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackTemplateAssetObjectUrl") unless @stack_template_asset_object_url.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil? @termination_protection = termination_protection Jsii::Type.check_type(@termination_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "terminationProtection") unless @termination_protection.nil? @validate_on_synth = validate_on_synth Jsii::Type.check_type(@validate_on_synth, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "validateOnSynth") unless @validate_on_synth.nil? end |
Instance Attribute Details
#assume_role_additional_options ⇒ Hash{String => Object}? (readonly)
Default: - No additional options.
Additional options to pass to STS when assuming the role.
RoleArnshould not be used. Use the dedicatedassume_role_arnproperty instead.ExternalIdshould not be used. Use the dedicatedassume_role_external_idinstead.
67 68 69 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 67 def @assume_role_additional_options end |
#assume_role_arn ⇒ String? (readonly)
Default: - No role is assumed (current credentials are used)
The role that needs to be assumed to deploy the stack.
72 73 74 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 72 def assume_role_arn @assume_role_arn end |
#assume_role_external_id ⇒ String? (readonly)
Default: - No external ID
External ID to use when assuming role for cloudformation deployments.
77 78 79 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 77 def assume_role_external_id @assume_role_external_id end |
#bootstrap_stack_version_ssm_parameter ⇒ String? (readonly)
Default: - Bootstrap stack version number looked up
SSM parameter where the bootstrap stack version number can be found.
Only used if requires_bootstrap_stack_version is set.
- If this value is not set, the bootstrap stack name must be known at deployment time so the stack version can be looked up from the stack outputs.
- If this value is set, the bootstrap stack can have any name because we won't need to look it up.
90 91 92 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 90 def bootstrap_stack_version_ssm_parameter @bootstrap_stack_version_ssm_parameter end |
#cloud_formation_execution_role_arn ⇒ String? (readonly)
Default: - No role is passed (currently assumed role/credentials are used)
The role that is passed to CloudFormation to execute the change set.
95 96 97 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 95 def cloud_formation_execution_role_arn @cloud_formation_execution_role_arn end |
#lookup_role ⇒ AWSCDK::CloudAssemblySchema::BootstrapRole? (readonly)
Default: - No role is assumed (current credentials are used)
The role to use to look up values from the target AWS account.
100 101 102 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 100 def lookup_role @lookup_role end |
#notification_arns ⇒ Array<String>? (readonly)
Default: - No notification arns
SNS Notification ARNs that should receive CloudFormation Stack Events.
105 106 107 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 105 def notification_arns @notification_arns end |
#parameters ⇒ Hash{String => String}? (readonly)
Default: - No parameters
Values for CloudFormation stack parameters that should be passed when the stack is deployed.
110 111 112 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 110 def parameters @parameters end |
#requires_bootstrap_stack_version ⇒ Numeric? (readonly)
Default: - No bootstrap stack required
Version of bootstrap stack required to deploy this stack.
115 116 117 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 115 def requires_bootstrap_stack_version @requires_bootstrap_stack_version end |
#stack_name ⇒ String? (readonly)
Default: - name derived from artifact ID
The name to use for the CloudFormation stack.
120 121 122 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 120 def stack_name @stack_name end |
#stack_template_asset_object_url ⇒ String? (readonly)
Default: - Not uploaded yet, upload just before deploying
If the stack template has already been included in the asset manifest, its asset URL.
125 126 127 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 125 def stack_template_asset_object_url @stack_template_asset_object_url end |
#tags ⇒ Hash{String => String}? (readonly)
Default: - No tags
Values for CloudFormation stack tags that should be passed when the stack is deployed.
N.B.: Tags are also written to stack metadata, under the path of the Stack
construct. Only in CDK CLI v1 are those tags found in metadata used for
actual deployments; in all stable versions of CDK only the stack tags
directly found in the tags property of AwsCloudFormationStack artifact
(i.e., this property) are used.
136 137 138 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 136 def @tags end |
#template_file ⇒ String (readonly)
A file relative to the assembly root which contains the CloudFormation template for this stack.
58 59 60 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 58 def template_file @template_file end |
#termination_protection ⇒ Boolean? (readonly)
Default: false
Whether to enable termination protection for this stack.
141 142 143 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 141 def termination_protection @termination_protection end |
#validate_on_synth ⇒ Boolean? (readonly)
Default: - false
Whether this stack should be validated by the CLI after synthesis.
146 147 148 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 146 def validate_on_synth @validate_on_synth end |
Class Method Details
.jsii_properties ⇒ Object
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 148 def self.jsii_properties { :template_file => "templateFile", :assume_role_additional_options => "assumeRoleAdditionalOptions", :assume_role_arn => "assumeRoleArn", :assume_role_external_id => "assumeRoleExternalId", :bootstrap_stack_version_ssm_parameter => "bootstrapStackVersionSsmParameter", :cloud_formation_execution_role_arn => "cloudFormationExecutionRoleArn", :lookup_role => "lookupRole", :notification_arns => "notificationArns", :parameters => "parameters", :requires_bootstrap_stack_version => "requiresBootstrapStackVersion", :stack_name => "stackName", :stack_template_asset_object_url => "stackTemplateAssetObjectUrl", :tags => "tags", :termination_protection => "terminationProtection", :validate_on_synth => "validateOnSynth", } end |
Instance Method Details
#to_jsii ⇒ Object
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'cloud_assembly_schema/aws_cloud_formation_stack_properties.rb', line 168 def to_jsii result = {} result.merge!({ "templateFile" => @template_file, "assumeRoleAdditionalOptions" => @assume_role_additional_options, "assumeRoleArn" => @assume_role_arn, "assumeRoleExternalId" => @assume_role_external_id, "bootstrapStackVersionSsmParameter" => @bootstrap_stack_version_ssm_parameter, "cloudFormationExecutionRoleArn" => @cloud_formation_execution_role_arn, "lookupRole" => @lookup_role, "notificationArns" => @notification_arns, "parameters" => @parameters, "requiresBootstrapStackVersion" => @requires_bootstrap_stack_version, "stackName" => @stack_name, "stackTemplateAssetObjectUrl" => @stack_template_asset_object_url, "tags" => @tags, "terminationProtection" => @termination_protection, "validateOnSynth" => @validate_on_synth, }) result.compact end |