Class CfnBranch.Builder

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

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

    • create

      @Stability(Stable) public static CfnBranch.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnBranch.Builder.
    • appId

      @Stability(Stable) public CfnBranch.Builder appId(String appId)
      The unique ID for an Amplify app.

      Length Constraints: Minimum length of 1. Maximum length of 20.

      Pattern: d[a-z0-9]+

      Parameters:
      appId - The unique ID for an Amplify app. This parameter is required.
      Returns:
      this
    • branchName

      @Stability(Stable) public CfnBranch.Builder branchName(String branchName)
      The name for the branch.

      Length Constraints: Minimum length of 1. Maximum length of 255.

      Pattern: (?s).+

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

      @Stability(Stable) public CfnBranch.Builder basicAuthConfig(IResolvable basicAuthConfig)
      The basic authorization credentials for a branch of an Amplify app.

      You must base64-encode the authorization credentials and provide them in the format user:password .

      Parameters:
      basicAuthConfig - The basic authorization credentials for a branch of an Amplify app. This parameter is required.
      Returns:
      this
    • basicAuthConfig

      @Stability(Stable) public CfnBranch.Builder basicAuthConfig(CfnBranch.BasicAuthConfigProperty basicAuthConfig)
      The basic authorization credentials for a branch of an Amplify app.

      You must base64-encode the authorization credentials and provide them in the format user:password .

      Parameters:
      basicAuthConfig - The basic authorization credentials for a branch of an Amplify app. This parameter is required.
      Returns:
      this
    • buildSpec

      @Stability(Stable) public CfnBranch.Builder buildSpec(String buildSpec)
      The build specification (build spec) for the branch.

      Length Constraints: Minimum length of 1. Maximum length of 25000.

      Pattern: (?s).+

      Parameters:
      buildSpec - The build specification (build spec) for the branch. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnBranch.Builder description(String description)
      The description for the branch that is part of an Amplify app.

      Length Constraints: Maximum length of 1000.

      Pattern: (?s).*

      Parameters:
      description - The description for the branch that is part of an Amplify app. This parameter is required.
      Returns:
      this
    • enableAutoBuild

      @Stability(Stable) public CfnBranch.Builder enableAutoBuild(Boolean enableAutoBuild)
      Enables auto building for the branch.

      Parameters:
      enableAutoBuild - Enables auto building for the branch. This parameter is required.
      Returns:
      this
    • enableAutoBuild

      @Stability(Stable) public CfnBranch.Builder enableAutoBuild(IResolvable enableAutoBuild)
      Enables auto building for the branch.

      Parameters:
      enableAutoBuild - Enables auto building for the branch. This parameter is required.
      Returns:
      this
    • enablePerformanceMode

      @Stability(Stable) public CfnBranch.Builder enablePerformanceMode(Boolean enablePerformanceMode)
      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.

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

      @Stability(Stable) public CfnBranch.Builder enablePerformanceMode(IResolvable enablePerformanceMode)
      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.

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

      @Stability(Stable) public CfnBranch.Builder enablePullRequestPreview(Boolean enablePullRequestPreview)
      Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.

      If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.

      To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the PullRequestEnvironmentName property.

      For more information, see Web Previews in the AWS Amplify Hosting User Guide .

      Parameters:
      enablePullRequestPreview - Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. This parameter is required.
      Returns:
      this
    • enablePullRequestPreview

      @Stability(Stable) public CfnBranch.Builder enablePullRequestPreview(IResolvable enablePullRequestPreview)
      Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.

      If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.

      To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the PullRequestEnvironmentName property.

      For more information, see Web Previews in the AWS Amplify Hosting User Guide .

      Parameters:
      enablePullRequestPreview - Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. This parameter is required.
      Returns:
      this
    • environmentVariables

      @Stability(Stable) public CfnBranch.Builder environmentVariables(IResolvable environmentVariables)
      The environment variables for the branch.

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

      @Stability(Stable) public CfnBranch.Builder environmentVariables(List<? extends Object> environmentVariables)
      The environment variables for the branch.

      Parameters:
      environmentVariables - The environment variables for the branch. This parameter is required.
      Returns:
      this
    • framework

      @Stability(Stable) public CfnBranch.Builder framework(String framework)
      The framework for the branch.

      Parameters:
      framework - The framework for the branch. This parameter is required.
      Returns:
      this
    • pullRequestEnvironmentName

      @Stability(Stable) public CfnBranch.Builder pullRequestEnvironmentName(String pullRequestEnvironmentName)
      If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.

      For example, you could specify an environment named prod , test , or dev that you initialized with the Amplify CLI and mapped to this branch.

      To enable pull request previews, set the EnablePullRequestPreview property to true .

      If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.

      For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .

      Length Constraints: Maximum length of 20.

      Pattern: (?s).*

      Parameters:
      pullRequestEnvironmentName - If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. This parameter is required.
      Returns:
      this
    • stage

      @Stability(Stable) public CfnBranch.Builder stage(String stage)
      Describes the current stage for the branch.

      Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST

      Parameters:
      stage - Describes the current stage for the branch. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnBranch.Builder tags(List<? extends CfnTag> tags)
      The tag for the branch.

      Parameters:
      tags - The tag for the branch. This parameter is required.
      Returns:
      this
    • build

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