interface AppProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AppProps |
Java | software.amazon.awscdk.core.AppProps |
Python | aws_cdk.core.AppProps |
TypeScript (source) | @aws-cdk/core » AppProps |
Initialization props for apps.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from '@aws-cdk/core';
declare const context: any;
const appProps: cdk.AppProps = {
analyticsReporting: false,
autoSynth: false,
context: {
contextKey: context,
},
outdir: 'outdir',
runtimeInfo: false,
stackTraces: false,
treeMetadata: false,
};
Properties
Name | Type | Description |
---|---|---|
analytics | boolean | Include runtime versioning information in the Stacks of this app. |
auto | boolean | Automatically call synth() before the program exits. |
context? | { [string]: any } | Additional context values for the application. |
outdir? | string | The output directory into which to emit synthesized artifacts. |
runtime | boolean | Include runtime versioning information in the Stacks of this app. |
stack | boolean | Include construct creation stack trace in the aws:cdk:trace metadata key of all constructs. |
tree | boolean | Include construct tree metadata as part of the Cloud Assembly. |
analyticsReporting?
Type:
boolean
(optional, default: Value of 'aws:cdk:version-reporting' context key)
Include runtime versioning information in the Stacks of this app.
autoSynth?
Type:
boolean
(optional, 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.
context?
Type:
{ [string]: any }
(optional, 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)
.
outdir?
Type:
string
(optional, 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.
runtimeInfo?
⚠️ Deprecated: use versionReporting
instead
Type:
boolean
(optional, default: Value of 'aws:cdk:version-reporting' context key)
Include runtime versioning information in the Stacks of this app.
stackTraces?
Type:
boolean
(optional, 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.
treeMetadata?
Type:
boolean
(optional, default: true)
Include construct tree metadata as part of the Cloud Assembly.