Class BranchOptions.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • asset

      @Stability(Experimental) public BranchOptions.Builder asset(Asset asset)
      Sets the value of BranchOptions.getAsset()
      Parameters:
      asset - 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.
      Returns:
      this
    • autoBuild

      @Stability(Experimental) public BranchOptions.Builder autoBuild(Boolean autoBuild)
      Parameters:
      autoBuild - Whether to enable auto building for the branch.
      Returns:
      this
    • basicAuth

      @Stability(Experimental) public BranchOptions.Builder basicAuth(BasicAuth basicAuth)
      Parameters:
      basicAuth - The Basic Auth configuration. Use this to set password protection for the branch
      Returns:
      this
    • branchName

      @Stability(Experimental) public BranchOptions.Builder branchName(String branchName)
      Parameters:
      branchName - The name of the branch.
      Returns:
      this
    • buildSpec

      @Stability(Experimental) public BranchOptions.Builder buildSpec(BuildSpec buildSpec)
      Parameters:
      buildSpec - BuildSpec for the branch.
      Returns:
      this
    • computeRole

      @Stability(Experimental) public BranchOptions.Builder computeRole(IRole computeRole)
      Parameters:
      computeRole - The IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role's permissions.

      This role overrides the app-level compute role.

      Returns:
      this
    • description

      @Stability(Experimental) public BranchOptions.Builder description(String description)
      Parameters:
      description - A description for the branch.
      Returns:
      this
    • environmentVariables

      @Stability(Experimental) public BranchOptions.Builder environmentVariables(Map<String,String> environmentVariables)
      Parameters:
      environmentVariables - 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.
      Returns:
      this
    • performanceMode

      @Stability(Experimental) public BranchOptions.Builder performanceMode(Boolean performanceMode)
      Parameters:
      performanceMode - 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.
      Returns:
      this
    • pullRequestEnvironmentName

      @Stability(Experimental) public BranchOptions.Builder pullRequestEnvironmentName(String pullRequestEnvironmentName)
      Parameters:
      pullRequestEnvironmentName - The dedicated backend environment for the pull request previews.
      Returns:
      this
    • pullRequestPreview

      @Stability(Experimental) public BranchOptions.Builder pullRequestPreview(Boolean pullRequestPreview)
      Parameters:
      pullRequestPreview - Whether to enable pull request preview for the branch.
      Returns:
      this
    • skewProtection

      @Stability(Experimental) public BranchOptions.Builder skewProtection(Boolean skewProtection)
      Parameters:
      skewProtection - Specifies whether the skew protection feature is enabled for the branch. Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs.
      Returns:
      this
    • stage

      @Stability(Experimental) public BranchOptions.Builder stage(String stage)
      Sets the value of BranchOptions.getStage()
      Parameters:
      stage - Stage for the branch.
      Returns:
      this
    • build

      @Stability(Experimental) public BranchOptions build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<BranchOptions>
      Returns:
      a new instance of BranchOptions
      Throws:
      NullPointerException - if any required attribute was not provided