Class App
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
You would normally define an App instance in your program's entrypoint,
then define constructs where the app is used as the parent scope.
After all the child constructs are defined within the app, you should call
app.synth() which will emit a "cloud assembly" from this app into the
directory specified by outdir. Cloud assemblies includes artifacts such as
CloudFormation templates and assets that are needed to deploy this app into
the AWS cloud.
Example:
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.s3.*;
IBucket bucket;
App app = new App();
Stack stack = new Stack(app, "Stack");
Table.Builder.create(stack, "Table")
.partitionKey(Attribute.builder()
.name("id")
.type(AttributeType.STRING)
.build())
.importSource(ImportSourceSpecification.builder()
.compressionType(InputCompressionType.GZIP)
.inputFormat(InputFormat.csv(CsvOptions.builder()
.delimiter(",")
.headerList(List.of("id", "name"))
.build()))
.bucket(bucket)
.keyPrefix("prefix")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanChecks if an object is an instance of theAppclass.static Stageof(software.constructs.IConstruct construct) Return the app that is the root of the construct tree, if available.synth()Synthesize this App into a cloud assembly.synth(StageSynthesisOptions options) Synthesize this App into a cloud assembly.Methods inherited from class software.amazon.awscdk.Stage
getAccount, getArtifactId, getAssetOutdir, getOutdir, getParentStage, getPolicyValidationBeta1, getRegion, getStageName, isStageMethods inherited from class software.constructs.Construct
getNode, isConstruct, toString, withMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
App
protected App(software.amazon.jsii.JsiiObjectRef objRef) -
App
protected App(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
App
Initializes a CDK application.- Parameters:
props- initialization properties.
-
App
@Stability(Stable) public App()Initializes a CDK application.
-
-
Method Details
-
isApp
Checks if an object is an instance of theAppclass.- Parameters:
obj- The object to evaluate. This parameter is required.- Returns:
trueifobjis anApp.
-
of
@Stability(Stable) @Nullable public static Stage of(@NotNull software.constructs.IConstruct construct) Return the app that is the root of the construct tree, if available.- Parameters:
construct- This parameter is required.
-
synth
Synthesize this App into a cloud assembly.Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.
-
synth
Synthesize this App into a cloud assembly.Once an assembly has been synthesized, it cannot be modified. Subsequent calls will return the same assembly.
-