Class AppProps.Builder
java.lang.Object
software.amazon.awscdk.services.amplify.alpha.AppProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AppProps>
- Enclosing interface:
AppProps
@Stability(Experimental)
public static final class AppProps.Builder
extends Object
implements software.amazon.jsii.Builder<AppProps>
A builder for
AppProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofAppProps.getAppName()autoBranchCreation(AutoBranchCreation autoBranchCreation) Sets the value ofAppProps.getAutoBranchCreation()autoBranchDeletion(Boolean autoBranchDeletion) Sets the value ofAppProps.getAutoBranchDeletion()Sets the value ofAppProps.getBasicAuth()build()Builds the configured instance.buildComputeType(BuildComputeType buildComputeType) Sets the value ofAppProps.getBuildComputeType()Sets the value ofAppProps.getBuildSpec()cacheConfigType(CacheConfigType cacheConfigType) Sets the value ofAppProps.getCacheConfigType()computeRole(IRole computeRole) Sets the value ofAppProps.getComputeRole()customResponseHeaders(List<? extends CustomResponseHeader> customResponseHeaders) Sets the value ofAppProps.getCustomResponseHeaders()customRules(List<? extends CustomRule> customRules) Sets the value ofAppProps.getCustomRules()description(String description) Sets the value ofAppProps.getDescription()environmentVariables(Map<String, String> environmentVariables) Sets the value ofAppProps.getEnvironmentVariables()Sets the value ofAppProps.getPlatform()Sets the value ofAppProps.getRole()sourceCodeProvider(ISourceCodeProvider sourceCodeProvider) Sets the value ofAppProps.getSourceCodeProvider()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
appName
Sets the value ofAppProps.getAppName()- Parameters:
appName- The name for the application.- Returns:
this
-
autoBranchCreation
@Stability(Experimental) public AppProps.Builder autoBranchCreation(AutoBranchCreation autoBranchCreation) Sets the value ofAppProps.getAutoBranchCreation()- Parameters:
autoBranchCreation- The auto branch creation configuration. Use this to automatically create branches that match a certain pattern.- Returns:
this
-
autoBranchDeletion
Sets the value ofAppProps.getAutoBranchDeletion()- Parameters:
autoBranchDeletion- Automatically disconnect a branch in the Amplify Console when you delete a branch from your Git repository.- Returns:
this
-
basicAuth
Sets the value ofAppProps.getBasicAuth()- Parameters:
basicAuth- The Basic Auth configuration. Use this to set password protection at an app level to all your branches.- Returns:
this
-
buildComputeType
@Stability(Experimental) public AppProps.Builder buildComputeType(BuildComputeType buildComputeType) Sets the value ofAppProps.getBuildComputeType()- Parameters:
buildComputeType- Specifies the size of the build instance.- Returns:
this
-
buildSpec
Sets the value ofAppProps.getBuildSpec()- Parameters:
buildSpec- BuildSpec for the application. Alternatively, add aamplify.ymlfile to the repository.- Returns:
this
-
cacheConfigType
Sets the value ofAppProps.getCacheConfigType()- Parameters:
cacheConfigType- The type of cache configuration to use for an Amplify app.- Returns:
this
-
computeRole
Sets the value ofAppProps.getComputeRole()- Parameters:
computeRole- The IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role's permissions.- Returns:
this
-
customResponseHeaders
@Stability(Experimental) public AppProps.Builder customResponseHeaders(List<? extends CustomResponseHeader> customResponseHeaders) Sets the value ofAppProps.getCustomResponseHeaders()- Parameters:
customResponseHeaders- The custom HTTP response headers for an Amplify app.- Returns:
this
-
customRules
@Stability(Experimental) public AppProps.Builder customRules(List<? extends CustomRule> customRules) Sets the value ofAppProps.getCustomRules()- Parameters:
customRules- Custom rewrite/redirect rules for the application.- Returns:
this
-
description
Sets the value ofAppProps.getDescription()- Parameters:
description- A description for the application.- Returns:
this
-
environmentVariables
@Stability(Experimental) public AppProps.Builder environmentVariables(Map<String, String> environmentVariables) Sets the value ofAppProps.getEnvironmentVariables()- Parameters:
environmentVariables- Environment variables for the application. All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.- Returns:
this
-
platform
Sets the value ofAppProps.getPlatform()- Parameters:
platform- Indicates the hosting platform to use. Set to WEB for static site generated (SSG) apps (i.e. a Create React App or Gatsby) and WEB_COMPUTE for server side rendered (SSR) apps (i.e. NextJS).- Returns:
this
-
role
Sets the value ofAppProps.getRole()- Parameters:
role- The IAM service role to associate with the application. The App implements IGrantable.- Returns:
this
-
sourceCodeProvider
@Stability(Experimental) public AppProps.Builder sourceCodeProvider(ISourceCodeProvider sourceCodeProvider) Sets the value ofAppProps.getSourceCodeProvider()- Parameters:
sourceCodeProvider- The source code provider for this application.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AppProps>- Returns:
- a new instance of
AppProps - Throws:
NullPointerException- if any required attribute was not provided
-