public static final class BranchProps.Builder
extends java.lang.Object
BranchProps
Constructor and Description |
---|
Builder() |
public BranchProps.Builder app(IApp app)
BranchProps.getApp()
app
- The application within which the branch must be created. This parameter is required.this
public BranchProps.Builder asset(Asset asset)
BranchOptions.getAsset()
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.this
public BranchProps.Builder autoBuild(java.lang.Boolean autoBuild)
BranchOptions.getAutoBuild()
autoBuild
- Whether to enable auto building for the branch.this
public BranchProps.Builder basicAuth(BasicAuth basicAuth)
BranchOptions.getBasicAuth()
basicAuth
- The Basic Auth configuration.
Use this to set password protection for
the branchthis
public BranchProps.Builder branchName(java.lang.String branchName)
BranchOptions.getBranchName()
branchName
- The name of the branch.this
public BranchProps.Builder buildSpec(BuildSpec buildSpec)
BranchOptions.getBuildSpec()
buildSpec
- BuildSpec for the branch.this
public BranchProps.Builder description(java.lang.String description)
BranchOptions.getDescription()
description
- A description for the branch.this
public BranchProps.Builder environmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
BranchOptions.getEnvironmentVariables()
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.this
public BranchProps.Builder performanceMode(java.lang.Boolean performanceMode)
BranchOptions.getPerformanceMode()
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.this
public BranchProps.Builder pullRequestEnvironmentName(java.lang.String pullRequestEnvironmentName)
BranchOptions.getPullRequestEnvironmentName()
pullRequestEnvironmentName
- The dedicated backend environment for the pull request previews.this
public BranchProps.Builder pullRequestPreview(java.lang.Boolean pullRequestPreview)
BranchOptions.getPullRequestPreview()
pullRequestPreview
- Whether to enable pull request preview for the branch.this
public BranchProps.Builder stage(java.lang.String stage)
BranchOptions.getStage()
stage
- Stage for the branch.this
public BranchProps build()
BranchProps
java.lang.NullPointerException
- if any required attribute was not provided