> **Experimental**
>
> `@aws-cdk/aws-amplify-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# BranchOptions

Options to add a branch to an application.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/branch.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-amplify-alpha/lib/branch.ts#L41)

## Example

```ts
declare const computeRole: iam.Role;
declare const amplifyApp: amplify.App

const branch = amplifyApp.addBranch("dev", { computeRole });
```

## Properties

- `asset`: [Asset](/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html) — Asset for deployment.

  **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.

- `autoBuild`: boolean = true — Whether to enable auto building for the branch.

- `basicAuth`: [BasicAuth](/cdk/api/v2/docs/@aws-cdk_aws-amplify-alpha.BasicAuth.html) — The Basic Auth configuration.

  **Default:** no password protection

  Use this to set password protection for
  the branch

- `branchName`: string — The name of the branch.

  **Default:** the construct's id

- `buildSpec`: [BuildSpec](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.BuildSpec.html) — BuildSpec for the branch.

  **Default:** no build spec

- `computeRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role to assign to a branch of an SSR app.

  **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.

- `description`: string — A description for the branch.

  **Default:** no description

- `environmentVariables`: { [key: string]: string } — Environment variables for the branch.

  **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.

- `performanceMode`: boolean = 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`: string — The dedicated backend environment for the pull request previews.

  **Default:** automatically provision a temporary backend

- `pullRequestPreview`: boolean = true — Whether to enable pull request preview for the branch.

- `skewProtection`: boolean — Specifies whether the skew protection feature is enabled for the branch.

  **Default:** None - Default setting is no skew protection.

  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`: string — Stage for the branch.

  **Default:** no stage
