Class BranchOptions.Builder
java.lang.Object
software.amazon.awscdk.services.amplify.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBranchOptions.getAsset()
Sets the value ofBranchOptions.getAutoBuild()
Sets the value ofBranchOptions.getBasicAuth()
branchName
(String branchName) Sets the value ofBranchOptions.getBranchName()
build()
Builds the configured instance.Sets the value ofBranchOptions.getBuildSpec()
description
(String description) Sets the value ofBranchOptions.getDescription()
environmentVariables
(Map<String, String> environmentVariables) Sets the value ofBranchOptions.getEnvironmentVariables()
performanceMode
(Boolean performanceMode) Sets the value ofBranchOptions.getPerformanceMode()
pullRequestEnvironmentName
(String pullRequestEnvironmentName) Sets the value ofBranchOptions.getPullRequestEnvironmentName()
pullRequestPreview
(Boolean pullRequestPreview) Sets the value ofBranchOptions.getPullRequestPreview()
Sets the value ofBranchOptions.getStage()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
asset
Sets the value ofBranchOptions.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
Sets the value ofBranchOptions.getAutoBuild()
- Parameters:
autoBuild
- Whether to enable auto building for the branch.- Returns:
this
-
basicAuth
Sets the value ofBranchOptions.getBasicAuth()
- Parameters:
basicAuth
- The Basic Auth configuration. Use this to set password protection for the branch- Returns:
this
-
branchName
Sets the value ofBranchOptions.getBranchName()
- Parameters:
branchName
- The name of the branch.- Returns:
this
-
buildSpec
Sets the value ofBranchOptions.getBuildSpec()
- Parameters:
buildSpec
- BuildSpec for the branch.- Returns:
this
-
description
Sets the value ofBranchOptions.getDescription()
- Parameters:
description
- A description for the branch.- Returns:
this
-
environmentVariables
@Stability(Experimental) public BranchOptions.Builder environmentVariables(Map<String, String> environmentVariables) Sets the value ofBranchOptions.getEnvironmentVariables()
- 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
Sets the value ofBranchOptions.getPerformanceMode()
- 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) Sets the value ofBranchOptions.getPullRequestEnvironmentName()
- Parameters:
pullRequestEnvironmentName
- The dedicated backend environment for the pull request previews.- Returns:
this
-
pullRequestPreview
@Stability(Experimental) public BranchOptions.Builder pullRequestPreview(Boolean pullRequestPreview) Sets the value ofBranchOptions.getPullRequestPreview()
- Parameters:
pullRequestPreview
- Whether to enable pull request preview for the branch.- Returns:
this
-
stage
Sets the value ofBranchOptions.getStage()
- Parameters:
stage
- Stage for the branch.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BranchOptions>
- Returns:
- a new instance of
BranchOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-