java.lang.Object
software.amazon.awscdk.services.amplify.alpha.App.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<App>
Enclosing class:
App

@Stability(Experimental) public static final class App.Builder extends Object implements software.amazon.jsii.Builder<App>
(experimental) A fluent builder for App.
  • Method Details

    • create

      @Stability(Experimental) public static App.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of App.Builder.
    • appName

      @Stability(Experimental) public App.Builder appName(String appName)
      (experimental) The name for the application.

      Default: - a CDK generated name

      Parameters:
      appName - The name for the application. This parameter is required.
      Returns:
      this
    • autoBranchCreation

      @Stability(Experimental) public App.Builder autoBranchCreation(AutoBranchCreation autoBranchCreation)
      (experimental) The auto branch creation configuration.

      Use this to automatically create branches that match a certain pattern.

      Default: - no auto branch creation

      Parameters:
      autoBranchCreation - The auto branch creation configuration. This parameter is required.
      Returns:
      this
    • autoBranchDeletion

      @Stability(Experimental) public App.Builder autoBranchDeletion(Boolean autoBranchDeletion)
      (experimental) Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository.

      Default: false

      Parameters:
      autoBranchDeletion - Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository. This parameter is required.
      Returns:
      this
    • basicAuth

      @Stability(Experimental) public App.Builder basicAuth(BasicAuth basicAuth)
      (experimental) The Basic Auth configuration.

      Use this to set password protection at an app level to all your branches.

      Default: - no password protection

      Parameters:
      basicAuth - The Basic Auth configuration. This parameter is required.
      Returns:
      this
    • buildSpec

      @Stability(Experimental) public App.Builder buildSpec(BuildSpec buildSpec)
      (experimental) BuildSpec for the application.

      Alternatively, add a amplify.yml file to the repository.

      Default: - no build spec

      Parameters:
      buildSpec - BuildSpec for the application. This parameter is required.
      Returns:
      this
      See Also:
    • customResponseHeaders

      @Stability(Experimental) public App.Builder customResponseHeaders(List<? extends CustomResponseHeader> customResponseHeaders)
      (experimental) The custom HTTP response headers for an Amplify app.

      Default: - no custom response headers

      Parameters:
      customResponseHeaders - The custom HTTP response headers for an Amplify app. This parameter is required.
      Returns:
      this
      See Also:
    • customRules

      @Stability(Experimental) public App.Builder customRules(List<? extends CustomRule> customRules)
      (experimental) Custom rewrite/redirect rules for the application.

      Default: - no custom rewrite/redirect rules

      Parameters:
      customRules - Custom rewrite/redirect rules for the application. This parameter is required.
      Returns:
      this
    • description

      @Stability(Experimental) public App.Builder description(String description)
      (experimental) A description for the application.

      Default: - no description

      Parameters:
      description - A description for the application. This parameter is required.
      Returns:
      this
    • environmentVariables

      @Stability(Experimental) public App.Builder environmentVariables(Map<String,String> environmentVariables)
      (experimental) Environment variables for the application.

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

      Default: - no environment variables

      Parameters:
      environmentVariables - Environment variables for the application. This parameter is required.
      Returns:
      this
    • platform

      @Stability(Experimental) public App.Builder platform(Platform platform)
      (experimental) Indicates the hosting platform to use.

      Set to WEB for static site generated (SSG) apps (i.e. a Create React App or Gatsby) and WEB_COMPUTE for server side rendered (SSR) apps (i.e. NextJS).

      Default: Platform.WEB

      Parameters:
      platform - Indicates the hosting platform to use. This parameter is required.
      Returns:
      this
    • role

      @Stability(Experimental) public App.Builder role(IRole role)
      (experimental) The IAM service role to associate with the application.

      The App implements IGrantable.

      Default: - a new role is created

      Parameters:
      role - The IAM service role to associate with the application. This parameter is required.
      Returns:
      this
    • sourceCodeProvider

      @Stability(Experimental) public App.Builder sourceCodeProvider(ISourceCodeProvider sourceCodeProvider)
      (experimental) The source code provider for this application.

      Default: - not connected to a source code provider

      Parameters:
      sourceCodeProvider - The source code provider for this application. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public App build()
      Specified by:
      build in interface software.amazon.jsii.Builder<App>
      Returns:
      a newly built instance of App.