interface BranchOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Amplify.Alpha.BranchOptions |
![]() | github.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#BranchOptions |
![]() | software.amazon.awscdk.services.amplify.alpha.BranchOptions |
![]() | aws_cdk.aws_amplify_alpha.BranchOptions |
![]() | @aws-cdk/aws-amplify-alpha ยป BranchOptions |
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
Name | Type | Description |
---|---|---|
asset? | Asset | Asset for deployment. |
auto | boolean | Whether to enable auto building for the branch. |
basic | Basic | The Basic Auth configuration. |
branch | string | The name of the branch. |
build | Build | BuildSpec for the branch. |
compute | IRole | The IAM role to assign to a branch of an SSR app. |
description? | string | A description for the branch. |
environment | { [string]: string } | Environment variables for the branch. |
performance | boolean | Enables performance mode for the branch. |
pull | string | The dedicated backend environment for the pull request previews. |
pull | boolean | Whether to enable pull request preview for the branch. |
skew | boolean | Specifies whether the skew protection feature is enabled for the branch. |
stage? | string | Stage for the branch. |
asset?
Type:
Asset
(optional, default: no 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.
autoBuild?
Type:
boolean
(optional, default: true)
Whether to enable auto building for the branch.
basicAuth?
Type:
Basic
(optional, default: no password protection)
The Basic Auth configuration.
Use this to set password protection for the branch
branchName?
Type:
string
(optional, default: the construct's id)
The name of the branch.
buildSpec?
Type:
Build
(optional, default: no build spec)
BuildSpec for the branch.
See also: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html
computeRole?
Type:
IRole
(optional, default: undefined - No specific role for the branch. If the app has a compute role, it will be inherited.)
The IAM role to assign to a branch of an SSR app.
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.
description?
Type:
string
(optional, default: no description)
A description for the branch.
environmentVariables?
Type:
{ [string]: string }
(optional, default: application environment variables)
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.
performanceMode?
Type:
boolean
(optional, default: false)
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.
pullRequestEnvironmentName?
Type:
string
(optional, default: automatically provision a temporary backend)
The dedicated backend environment for the pull request previews.
pullRequestPreview?
Type:
boolean
(optional, default: true)
Whether to enable pull request preview for the branch.
skewProtection?
Type:
boolean
(optional, default: None - Default setting is no skew protection.)
Specifies whether the skew protection feature is enabled for the branch.
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.
stage?
Type:
string
(optional, default: no stage)
Stage for the branch.