Class: AWSCDK::StackProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StackProps
- Defined in:
- stack_props.rb
Instance Attribute Summary collapse
-
#analytics_reporting ⇒ Boolean?
readonly
Include runtime versioning information in this Stack.
-
#cross_region_references ⇒ Boolean?
readonly
Enable this flag to allow native cross region stack references.
-
#description ⇒ String?
readonly
A description of the stack.
-
#env ⇒ AWSCDK::Environment?
readonly
The AWS environment (account/region) where this stack will be deployed.
-
#notification_arns ⇒ Array<String>?
readonly
SNS Topic ARNs that will receive stack events.
-
#permissions_boundary ⇒ AWSCDK::PermissionsBoundary?
readonly
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
-
#property_injectors ⇒ Array<AWSCDK::IPropertyInjector>?
readonly
A list of IPropertyInjector attached to this Stack.
-
#stack_name ⇒ String?
readonly
Name to deploy the stack with.
-
#suppress_template_indentation ⇒ Boolean?
readonly
Enable this flag to suppress indentation in generated CloudFormation templates.
-
#synthesizer ⇒ AWSCDK::IStackSynthesizer?
readonly
Synthesis method to use while deploying this stack.
-
#tags ⇒ Hash{String => String}?
readonly
Tags that will be applied to the Stack.
-
#termination_protection ⇒ Boolean?
readonly
Whether to enable termination protection for this stack.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(analytics_reporting: nil, cross_region_references: nil, description: nil, env: nil, notification_arns: nil, permissions_boundary: nil, property_injectors: nil, stack_name: nil, suppress_template_indentation: nil, synthesizer: nil, tags: nil, termination_protection: nil) ⇒ StackProps
constructor
A new instance of StackProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(analytics_reporting: nil, cross_region_references: nil, description: nil, env: nil, notification_arns: nil, permissions_boundary: nil, property_injectors: nil, stack_name: nil, suppress_template_indentation: nil, synthesizer: nil, tags: nil, termination_protection: nil) ⇒ StackProps
Returns a new instance of StackProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'stack_props.rb', line 18 def initialize(analytics_reporting: nil, cross_region_references: nil, description: nil, env: nil, notification_arns: nil, permissions_boundary: nil, property_injectors: nil, stack_name: nil, suppress_template_indentation: nil, synthesizer: nil, tags: nil, termination_protection: nil) @analytics_reporting = analytics_reporting Jsii::Type.check_type(@analytics_reporting, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "analyticsReporting") unless @analytics_reporting.nil? @cross_region_references = cross_region_references Jsii::Type.check_type(@cross_region_references, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "crossRegionReferences") unless @cross_region_references.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @env = env.is_a?(Hash) ? ::AWSCDK::Environment.new(**env.transform_keys(&:to_sym)) : env Jsii::Type.check_type(@env, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5FbnZpcm9ubWVudCJ9")), "env") unless @env.nil? @notification_arns = notification_arns Jsii::Type.check_type(@notification_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notificationArns") unless @notification_arns.nil? @permissions_boundary = Jsii::Type.check_type(@permissions_boundary, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5QZXJtaXNzaW9uc0JvdW5kYXJ5In0=")), "permissionsBoundary") unless @permissions_boundary.nil? @property_injectors = property_injectors Jsii::Type.check_type(@property_injectors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLklQcm9wZXJ0eUluamVjdG9yIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "propertyInjectors") unless @property_injectors.nil? @stack_name = stack_name Jsii::Type.check_type(@stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackName") unless @stack_name.nil? @suppress_template_indentation = suppress_template_indentation Jsii::Type.check_type(@suppress_template_indentation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "suppressTemplateIndentation") unless @suppress_template_indentation.nil? @synthesizer = synthesizer Jsii::Type.check_type(@synthesizer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JU3RhY2tTeW50aGVzaXplciJ9")), "synthesizer") unless @synthesizer.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? end |
Instance Attribute Details
#analytics_reporting ⇒ Boolean? (readonly)
Default: analyticsReporting setting of containing App, or value of 'aws:cdk:version-reporting' context key
Include runtime versioning information in this Stack.
49 50 51 |
# File 'stack_props.rb', line 49 def analytics_reporting @analytics_reporting end |
#cross_region_references ⇒ Boolean? (readonly)
Default: false
Enable this flag to allow native cross region stack references.
Enabling this will create a CloudFormation custom resource in both the producing stack and consuming stack in order to perform the export/import
This feature is currently experimental
59 60 61 |
# File 'stack_props.rb', line 59 def cross_region_references @cross_region_references end |
#description ⇒ String? (readonly)
Default: - No description.
A description of the stack.
64 65 66 |
# File 'stack_props.rb', line 64 def description @description end |
#env ⇒ AWSCDK::Environment? (readonly)
Default: - The environment of the containing Stage if available, otherwise create the stack will be environment-agnostic.
The AWS environment (account/region) where this stack will be deployed.
Set the region/account fields of env to either a concrete value to
select the indicated environment (recommended for production stacks), or to
the values of environment variables
CDK_DEFAULT_REGION/CDK_DEFAULT_ACCOUNT to let the target environment
depend on the AWS credentials/configuration that the CDK CLI is executed
under (recommended for development stacks).
If the Stack is instantiated inside a Stage, any undefined
region/account fields from env will default to the same field on the
encompassing Stage, if configured there.
If either region or account are not set nor inherited from Stage, the
Stack will be considered "environment-agnostic"". Environment-agnostic
stacks can be deployed to any environment but may not be able to take
advantage of all features of the CDK. For example, they will not be able to
use environmental context lookups such as ec2.Vpc.fromLookup and will not
automatically translate Service Principals to the right format based on the
environment's AWS partition, and other such enhancements.
125 126 127 |
# File 'stack_props.rb', line 125 def env @env end |
#notification_arns ⇒ Array<String>? (readonly)
Default: - no notification arns.
SNS Topic ARNs that will receive stack events.
130 131 132 |
# File 'stack_props.rb', line 130 def notification_arns @notification_arns end |
#permissions_boundary ⇒ AWSCDK::PermissionsBoundary? (readonly)
Default: - no permissions boundary is applied
Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
135 136 137 |
# File 'stack_props.rb', line 135 def @permissions_boundary end |
#property_injectors ⇒ Array<AWSCDK::IPropertyInjector>? (readonly)
Default: - no PropertyInjectors
A list of IPropertyInjector attached to this Stack.
140 141 142 |
# File 'stack_props.rb', line 140 def property_injectors @property_injectors end |
#stack_name ⇒ String? (readonly)
Default: - Derived from construct path.
Name to deploy the stack with.
145 146 147 |
# File 'stack_props.rb', line 145 def stack_name @stack_name end |
#suppress_template_indentation ⇒ Boolean? (readonly)
Default: - the value of @aws-cdk/core:suppressTemplateIndentation, or false if that is not set.
Enable this flag to suppress indentation in generated CloudFormation templates.
If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation
context key will be used. If that is not specified, then the
default value false will be used.
154 155 156 |
# File 'stack_props.rb', line 154 def suppress_template_indentation @suppress_template_indentation end |
#synthesizer ⇒ AWSCDK::IStackSynthesizer? (readonly)
Default: - The synthesizer specified on App, or DefaultStackSynthesizer otherwise.
Synthesis method to use while deploying this stack.
The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package.
If not specified, the default_stack_synthesizer from App will be used.
If that is not specified, DefaultStackSynthesizer is used if
@aws-cdk/core:newStyleStackSynthesis is set to true or the CDK major
version is v2. In CDK v1 LegacyStackSynthesizer is the default if no
other synthesizer is specified.
169 170 171 |
# File 'stack_props.rb', line 169 def synthesizer @synthesizer end |
#tags ⇒ Hash{String => String}? (readonly)
Default: {}
Tags that will be applied to the Stack.
These tags are applied to the CloudFormation Stack itself. They will not appear in the CloudFormation template.
However, at deployment time, CloudFormation will apply these tags to all
resources in the stack that support tagging. You will not be able to exempt
resources from tagging (using the exclude_resource_types property of
Tags.of(...).add()) for tags applied in this way.
182 183 184 |
# File 'stack_props.rb', line 182 def @tags end |
#termination_protection ⇒ Boolean? (readonly)
Default: false
Whether to enable termination protection for this stack.
187 188 189 |
# File 'stack_props.rb', line 187 def termination_protection @termination_protection end |
Class Method Details
.jsii_properties ⇒ Object
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'stack_props.rb', line 189 def self.jsii_properties { :analytics_reporting => "analyticsReporting", :cross_region_references => "crossRegionReferences", :description => "description", :env => "env", :notification_arns => "notificationArns", :permissions_boundary => "permissionsBoundary", :property_injectors => "propertyInjectors", :stack_name => "stackName", :suppress_template_indentation => "suppressTemplateIndentation", :synthesizer => "synthesizer", :tags => "tags", :termination_protection => "terminationProtection", } end |
Instance Method Details
#to_jsii ⇒ Object
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'stack_props.rb', line 206 def to_jsii result = {} result.merge!({ "analyticsReporting" => @analytics_reporting, "crossRegionReferences" => @cross_region_references, "description" => @description, "env" => @env, "notificationArns" => @notification_arns, "permissionsBoundary" => @permissions_boundary, "propertyInjectors" => @property_injectors, "stackName" => @stack_name, "suppressTemplateIndentation" => @suppress_template_indentation, "synthesizer" => @synthesizer, "tags" => @tags, "terminationProtection" => @termination_protection, }) result.compact end |