Class Branch.Builder

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

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

    • create

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

      @Stability(Experimental) public Branch.Builder asset(Asset asset)
      (experimental) Asset for deployment.

      The Amplify app must not have a sourceCodeProvider configured as this resource uses Amplify's startDeployment API to initiate and deploy a S3 asset onto the App.

      Default: - no asset

      Parameters:
      asset - Asset for deployment. This parameter is required.
      Returns:
      this
    • autoBuild

      @Stability(Experimental) public Branch.Builder autoBuild(Boolean autoBuild)
      (experimental) Whether to enable auto building for the branch.

      Default: true

      Parameters:
      autoBuild - Whether to enable auto building for the branch. This parameter is required.
      Returns:
      this
    • basicAuth

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

      Use this to set password protection for the branch

      Default: - no password protection

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

      @Stability(Experimental) public Branch.Builder branchName(String branchName)
      (experimental) The name of the branch.

      Default: - the construct's id

      Parameters:
      branchName - The name of the branch. This parameter is required.
      Returns:
      this
    • buildSpec

      @Stability(Experimental) public Branch.Builder buildSpec(BuildSpec buildSpec)
      (experimental) BuildSpec for the branch.

      Default: - no build spec

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

      @Stability(Experimental) public Branch.Builder description(String description)
      (experimental) A description for the branch.

      Default: - no description

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

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

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

      Default: - application environment variables

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

      @Stability(Experimental) public Branch.Builder performanceMode(Boolean performanceMode)
      (experimental) Enables performance mode for the branch.

      Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.

      Default: false

      Parameters:
      performanceMode - Enables performance mode for the branch. This parameter is required.
      Returns:
      this
    • pullRequestEnvironmentName

      @Stability(Experimental) public Branch.Builder pullRequestEnvironmentName(String pullRequestEnvironmentName)
      (experimental) The dedicated backend environment for the pull request previews.

      Default: - automatically provision a temporary backend

      Parameters:
      pullRequestEnvironmentName - The dedicated backend environment for the pull request previews. This parameter is required.
      Returns:
      this
    • pullRequestPreview

      @Stability(Experimental) public Branch.Builder pullRequestPreview(Boolean pullRequestPreview)
      (experimental) Whether to enable pull request preview for the branch.

      Default: true

      Parameters:
      pullRequestPreview - Whether to enable pull request preview for the branch. This parameter is required.
      Returns:
      this
    • stage

      @Stability(Experimental) public Branch.Builder stage(String stage)
      (experimental) Stage for the branch.

      Default: - no stage

      Parameters:
      stage - Stage for the branch. This parameter is required.
      Returns:
      this
    • app

      @Stability(Experimental) public Branch.Builder app(IApp app)
      (experimental) The application within which the branch must be created.

      Parameters:
      app - The application within which the branch must be created. This parameter is required.
      Returns:
      this
    • build

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