Class App

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Stage
software.amazon.awscdk.App
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:24.306Z") @Stability(Stable) public class App extends Stage
A construct which represents an entire CDK app. This construct is normally the root of the construct tree.

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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for App.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    App()
    Initializes a CDK application.
     
    App(AppProps props)
    Initializes a CDK application.
    protected
    App(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    App(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Boolean
    Checks if an object is an instance of the App class.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods 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

      @Stability(Stable) public App(@Nullable AppProps props)
      Initializes a CDK application.

      Parameters:
      props - initialization properties.
    • App

      @Stability(Stable) public App()
      Initializes a CDK application.
  • Method Details

    • isApp

      @Stability(Stable) @NotNull public static Boolean isApp(@NotNull Object obj)
      Checks if an object is an instance of the App class.

      Parameters:
      obj - The object to evaluate. This parameter is required.
      Returns:
      true if obj is an App.