Class BranchProps.Builder
java.lang.Object
software.amazon.awscdk.services.amplify.alpha.BranchProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BranchProps>
- Enclosing interface:
BranchProps
@Stability(Experimental)
public static final class BranchProps.Builder
extends Object
implements software.amazon.jsii.Builder<BranchProps>
A builder for
BranchProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBranchProps.getApp()
Sets 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
-
app
Sets the value ofBranchProps.getApp()
- Parameters:
app
- The application within which the branch must be created. This parameter is required.- Returns:
this
-
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 BranchProps.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 BranchProps.Builder pullRequestEnvironmentName(String pullRequestEnvironmentName) Sets the value ofBranchOptions.getPullRequestEnvironmentName()
- Parameters:
pullRequestEnvironmentName
- The dedicated backend environment for the pull request previews.- Returns:
this
-
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<BranchProps>
- Returns:
- a new instance of
BranchProps
- Throws:
NullPointerException
- if any required attribute was not provided
-