Experimental
@aws-cdk/aws-amplify-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
BranchOptions Struct
Options to add a branch to an application.
Example
declare const computeRole: iam.Role;
declare const amplifyApp: amplify.App
const branch = amplifyApp.addBranch("dev", { computeRole });
Properties
Default: no asset
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.
Default: no password protection
Use this to set password protection for the branch
Default: the construct's id
Default: no build spec
Default: undefined - No specific role for the branch. If the app has a compute role, it will be inherited.
The SSR Compute role allows the Amplify Hosting compute service to securely access specific AWS resources based on the role's permissions.
This role overrides the app-level compute role.
Default: no description
environmentVariables{ [key: string]: string }environment_variablestyping.Mapping[str, str]environmentVariablesMap<String, String>EnvironmentVariablesIDictionary<string, string>EnvironmentVariables*map[string]*string#Default: application environment variables
All environment variables that you add are encrypted to prevent rogue access so you can use them to store secret information.
performanceModebooleanperformance_modeboolperformanceModeBooleanPerformanceModeboolPerformanceMode*bool= false#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.
pullRequestEnvironmentNamestringpull_request_environment_namestrpullRequestEnvironmentNameStringPullRequestEnvironmentNamestringPullRequestEnvironmentName*string#Default: automatically provision a temporary backend
pullRequestPreviewbooleanpull_request_previewboolpullRequestPreviewBooleanPullRequestPreviewboolPullRequestPreview*bool= true#Default: None - Default setting is no skew protection.
notes
Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs.