java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IResource, IApp, IGrantable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.070Z") @Stability(Experimental) public class App extends Resource implements IApp, IGrantable
(experimental) An Amplify Console application.

Example:

 App amplifyApp = App.Builder.create(this, "MyApp")
         .sourceCodeProvider(GitHubSourceCodeProvider.Builder.create()
                 .owner("<user>")
                 .repository("<repo>")
                 .oauthToken(SecretValue.secretsManager("my-github-token"))
                 .build())
         .autoBranchCreation(AutoBranchCreation.builder() // Automatically connect branches that match a pattern set
                 .patterns(List.of("feature/*", "test/*")).build())
         .autoBranchDeletion(true)
         .build();
 
  • Constructor Details

    • App

      protected App(software.amazon.jsii.JsiiObjectRef objRef)
    • App

      protected App(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • App

      @Stability(Experimental) public App(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AppProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromAppId

      @Stability(Experimental) @NotNull public static IApp fromAppId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String appId)
      (experimental) Import an existing application.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      appId - This parameter is required.
    • addAutoBranchEnvironment

      @Stability(Experimental) @NotNull public App addAutoBranchEnvironment(@NotNull String name, @NotNull String value)
      (experimental) Adds an environment variable to the auto created branch.

      All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • addBranch

      @Stability(Experimental) @NotNull public Branch addBranch(@NotNull String id, @Nullable BranchOptions options)
      (experimental) Adds a branch to this application.

      Parameters:
      id - This parameter is required.
      options -
    • addBranch

      @Stability(Experimental) @NotNull public Branch addBranch(@NotNull String id)
      (experimental) Adds a branch to this application.

      Parameters:
      id - This parameter is required.
    • addCustomRule

      @Stability(Experimental) @NotNull public App addCustomRule(@NotNull CustomRule rule)
      (experimental) Adds a custom rewrite/redirect rule to this application.

      Parameters:
      rule - This parameter is required.
    • addDomain

      @Stability(Experimental) @NotNull public Domain addDomain(@NotNull String id, @Nullable DomainOptions options)
      (experimental) Adds a domain to this application.

      Parameters:
      id - This parameter is required.
      options -
    • addDomain

      @Stability(Experimental) @NotNull public Domain addDomain(@NotNull String id)
      (experimental) Adds a domain to this application.

      Parameters:
      id - This parameter is required.
    • addEnvironment

      @Stability(Experimental) @NotNull public App addEnvironment(@NotNull String name, @NotNull String value)
      (experimental) Adds an environment variable to this application.

      All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.

      Parameters:
      name - This parameter is required.
      value - This parameter is required.
    • getAppId

      @Stability(Experimental) @NotNull public String getAppId()
      (experimental) The application id.
      Specified by:
      getAppId in interface IApp
    • getAppName

      @Stability(Experimental) @NotNull public String getAppName()
      (experimental) The name of the application.
    • getArn

      @Stability(Experimental) @NotNull public String getArn()
      (experimental) The ARN of the application.
    • getDefaultDomain

      @Stability(Experimental) @NotNull public String getDefaultDomain()
      (experimental) The default domain of the application.
    • getGrantPrincipal

      @Stability(Experimental) @NotNull public IPrincipal getGrantPrincipal()
      (experimental) The principal to grant permissions to.
      Specified by:
      getGrantPrincipal in interface IGrantable