Class: AWSCDK::AppProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppProps
- Defined in:
- app_props.rb
Overview
Initialization props for apps.
Instance Attribute Summary collapse
-
#analytics_reporting ⇒ Boolean?
readonly
Include runtime versioning information in the Stacks of this app.
-
#auto_synth ⇒ Boolean?
readonly
Automatically call
synth()before the program exits. -
#context ⇒ Hash{String => Object}?
readonly
Additional context values for the application.
-
#default_stack_synthesizer ⇒ AWSCDK::IReusableStackSynthesizer?
readonly
The stack synthesizer to use by default for all Stacks in the App.
-
#outdir ⇒ String?
readonly
The output directory into which to emit synthesized artifacts.
-
#performance_reporting ⇒ Boolean?
readonly
Produce a performance counter report if supported by the CLI.
-
#policy_validation_beta1 ⇒ Array<AWSCDK::IPolicyValidationPluginBeta1>?
readonly
deprecated
Deprecated.
Use
Validations.of(app).addPlugins()instead. -
#post_cli_context ⇒ Hash{String => Object}?
readonly
Additional context values for the application.
-
#property_injectors ⇒ Array<AWSCDK::IPropertyInjector>?
readonly
A list of IPropertyInjector attached to this App.
-
#stack_traces ⇒ Boolean?
readonly
Include construct creation stack trace in the
aws:cdk:tracemetadata key of all constructs. -
#tree_metadata ⇒ Boolean?
readonly
Include construct tree metadata as part of the Cloud Assembly.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(analytics_reporting: nil, auto_synth: nil, context: nil, default_stack_synthesizer: nil, outdir: nil, performance_reporting: nil, policy_validation_beta1: nil, post_cli_context: nil, property_injectors: nil, stack_traces: nil, tree_metadata: nil) ⇒ AppProps
constructor
A new instance of AppProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(analytics_reporting: nil, auto_synth: nil, context: nil, default_stack_synthesizer: nil, outdir: nil, performance_reporting: nil, policy_validation_beta1: nil, post_cli_context: nil, property_injectors: nil, stack_traces: nil, tree_metadata: nil) ⇒ AppProps
Returns a new instance of AppProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app_props.rb', line 18 def initialize(analytics_reporting: nil, auto_synth: nil, context: nil, default_stack_synthesizer: nil, outdir: nil, performance_reporting: nil, policy_validation_beta1: nil, post_cli_context: nil, property_injectors: nil, stack_traces: nil, tree_metadata: nil) @analytics_reporting = analytics_reporting Jsii::Type.check_type(@analytics_reporting, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "analyticsReporting") unless @analytics_reporting.nil? @auto_synth = auto_synth Jsii::Type.check_type(@auto_synth, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "autoSynth") unless @auto_synth.nil? @context = context Jsii::Type.check_type(@context, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "context") unless @context.nil? @default_stack_synthesizer = default_stack_synthesizer Jsii::Type.check_type(@default_stack_synthesizer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmV1c2FibGVTdGFja1N5bnRoZXNpemVyIn0=")), "defaultStackSynthesizer") unless @default_stack_synthesizer.nil? @outdir = outdir Jsii::Type.check_type(@outdir, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outdir") unless @outdir.nil? @performance_reporting = performance_reporting Jsii::Type.check_type(@performance_reporting, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "performanceReporting") unless @performance_reporting.nil? @policy_validation_beta1 = policy_validation_beta1 Jsii::Type.check_type(@policy_validation_beta1, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLklQb2xpY3lWYWxpZGF0aW9uUGx1Z2luQmV0YTEifSwia2luZCI6ImFycmF5In19")), "policyValidationBeta1") unless @policy_validation_beta1.nil? @post_cli_context = post_cli_context Jsii::Type.check_type(@post_cli_context, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "postCliContext") unless @post_cli_context.nil? @property_injectors = property_injectors Jsii::Type.check_type(@property_injectors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLklQcm9wZXJ0eUluamVjdG9yIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "propertyInjectors") unless @property_injectors.nil? @stack_traces = stack_traces Jsii::Type.check_type(@stack_traces, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "stackTraces") unless @stack_traces.nil? @tree_metadata = Jsii::Type.check_type(@tree_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "treeMetadata") unless @tree_metadata.nil? end |
Instance Attribute Details
#analytics_reporting ⇒ Boolean? (readonly)
Default: Value of 'aws:cdk:version-reporting' context key
Include runtime versioning information in the Stacks of this app.
47 48 49 |
# File 'app_props.rb', line 47 def analytics_reporting @analytics_reporting end |
#auto_synth ⇒ Boolean? (readonly)
Default: true if running via CDK CLI (CDK_OUTDIR is set), false otherwise
Automatically call synth() before the program exits.
If you set this, you don't have to call synth() explicitly. Note that
this feature is only available for certain programming languages, and
calling synth() is still recommended.
56 57 58 |
# File 'app_props.rb', line 56 def auto_synth @auto_synth end |
#context ⇒ Hash{String => Object}? (readonly)
Default: - no additional context
Additional context values for the application.
Context set by the CLI or the context key in cdk.json has precedence.
Context can be read from any construct using node.getContext(key).
65 66 67 |
# File 'app_props.rb', line 65 def context @context end |
#default_stack_synthesizer ⇒ AWSCDK::IReusableStackSynthesizer? (readonly)
Default: - A DefaultStackSynthesizer with default settings
The stack synthesizer to use by default for all Stacks in the App.
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.
74 75 76 |
# File 'app_props.rb', line 74 def default_stack_synthesizer @default_stack_synthesizer end |
#outdir ⇒ String? (readonly)
Default: - If this value is not set, considers the environment variable CDK_OUTDIR. If CDK_OUTDIR is not defined, uses a temp directory.
The output directory into which to emit synthesized artifacts.
You should never need to set this value. By default, the value you pass to
the CLI's --output flag will be used, and if you change it to a different
directory the CLI will fail to pick up the generated Cloud Assembly.
This property is intended for internal and testing use.
85 86 87 |
# File 'app_props.rb', line 85 def outdir @outdir end |
#performance_reporting ⇒ Boolean? (readonly)
Default: Value of 'aws:cdk:performance-reporting' context key
Produce a performance counter report if supported by the CLI.
The performance report will be produced if the total synthesis time
exceeds 10 seconds/stack, unless this property is used to switch the
report off altogether (set to false).
94 95 96 |
# File 'app_props.rb', line 94 def performance_reporting @performance_reporting end |
#policy_validation_beta1 ⇒ Array<AWSCDK::IPolicyValidationPluginBeta1>? (readonly)
Use Validations.of(app).addPlugins() instead.
Default: - no validation plugins
Validation plugins to run after synthesis.
100 101 102 |
# File 'app_props.rb', line 100 def policy_validation_beta1 @policy_validation_beta1 end |
#post_cli_context ⇒ Hash{String => Object}? (readonly)
Default: - no additional context
Additional context values for the application.
Context provided here has precedence over context set by:
- The CLI via --context
- The
contextkey incdk.json - The
AppProps.contextproperty
This property is recommended over the AppProps.context property since you
can make final decision over which context value to take in your app.
Context can be read from any construct using node.getContext(key).
128 129 130 |
# File 'app_props.rb', line 128 def post_cli_context @post_cli_context end |
#property_injectors ⇒ Array<AWSCDK::IPropertyInjector>? (readonly)
Default: - no PropertyInjectors
A list of IPropertyInjector attached to this App.
133 134 135 |
# File 'app_props.rb', line 133 def property_injectors @property_injectors end |
#stack_traces ⇒ Boolean? (readonly)
Default: true stack traces are included unless aws:cdk:disable-stack-trace is set in the context.
Include construct creation stack trace in the aws:cdk:trace metadata key of all constructs.
138 139 140 |
# File 'app_props.rb', line 138 def stack_traces @stack_traces end |
#tree_metadata ⇒ Boolean? (readonly)
Default: true
Include construct tree metadata as part of the Cloud Assembly.
143 144 145 |
# File 'app_props.rb', line 143 def @tree_metadata end |
Class Method Details
.jsii_properties ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'app_props.rb', line 145 def self.jsii_properties { :analytics_reporting => "analyticsReporting", :auto_synth => "autoSynth", :context => "context", :default_stack_synthesizer => "defaultStackSynthesizer", :outdir => "outdir", :performance_reporting => "performanceReporting", :policy_validation_beta1 => "policyValidationBeta1", :post_cli_context => "postCliContext", :property_injectors => "propertyInjectors", :stack_traces => "stackTraces", :tree_metadata => "treeMetadata", } end |
Instance Method Details
#to_jsii ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'app_props.rb', line 161 def to_jsii result = {} result.merge!({ "analyticsReporting" => @analytics_reporting, "autoSynth" => @auto_synth, "context" => @context, "defaultStackSynthesizer" => @default_stack_synthesizer, "outdir" => @outdir, "performanceReporting" => @performance_reporting, "policyValidationBeta1" => @policy_validation_beta1, "postCliContext" => @post_cli_context, "propertyInjectors" => @property_injectors, "stackTraces" => @stack_traces, "treeMetadata" => @tree_metadata, }) result.compact end |