BranchOptions

class aws_cdk.aws_amplify_alpha.BranchOptions(*, asset=None, auto_build=None, basic_auth=None, branch_name=None, build_spec=None, compute_role=None, description=None, environment_variables=None, performance_mode=None, pull_request_environment_name=None, pull_request_preview=None, skew_protection=None, stage=None)

Bases: object

(experimental) Options to add a branch to an application.

Parameters:
  • asset (Optional[Asset]) – (experimental) 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. Default: - no asset

  • auto_build (Optional[bool]) – (experimental) Whether to enable auto building for the branch. Default: true

  • basic_auth (Optional[BasicAuth]) – (experimental) The Basic Auth configuration. Use this to set password protection for the branch Default: - no password protection

  • branch_name (Optional[str]) – (experimental) The name of the branch. Default: - the construct’s id

  • build_spec (Optional[BuildSpec]) – (experimental) BuildSpec for the branch. Default: - no build spec

  • compute_role (Optional[IRole]) – (experimental) 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. Default: undefined - No specific role for the branch. If the app has a compute role, it will be inherited.

  • description (Optional[str]) – (experimental) A description for the branch. Default: - no description

  • environment_variables (Optional[Mapping[str, str]]) – (experimental) 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. Default: - application environment variables

  • performance_mode (Optional[bool]) – (experimental) 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. Default: false

  • pull_request_environment_name (Optional[str]) – (experimental) The dedicated backend environment for the pull request previews. Default: - automatically provision a temporary backend

  • pull_request_preview (Optional[bool]) – (experimental) Whether to enable pull request preview for the branch. Default: true

  • skew_protection (Optional[bool]) – (experimental) 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. Default: None - Default setting is no skew protection.

  • stage (Optional[str]) – (experimental) Stage for the branch. Default: - no stage

Stability:

experimental

ExampleMetadata:

infused

Example:

# compute_role: iam.Role
# amplify_app: amplify.App


branch = amplify_app.add_branch("dev", compute_role=compute_role)

Attributes

asset

(experimental) 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.

Default:
  • no asset

Stability:

experimental

auto_build

(experimental) Whether to enable auto building for the branch.

Default:

true

Stability:

experimental

basic_auth

(experimental) The Basic Auth configuration.

Use this to set password protection for the branch

Default:
  • no password protection

Stability:

experimental

branch_name

(experimental) The name of the branch.

Default:
  • the construct’s id

Stability:

experimental

build_spec

(experimental) BuildSpec for the branch.

Default:
  • no build spec

See:

https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html

Stability:

experimental

compute_role

(experimental) 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.

Default:

undefined - No specific role for the branch. If the app has a compute role, it will be inherited.

Stability:

experimental

description

(experimental) A description for the branch.

Default:
  • no description

Stability:

experimental

environment_variables

(experimental) 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.

Default:
  • application environment variables

Stability:

experimental

performance_mode

(experimental) 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.

Default:

false

Stability:

experimental

pull_request_environment_name

(experimental) The dedicated backend environment for the pull request previews.

Default:
  • automatically provision a temporary backend

Stability:

experimental

pull_request_preview

(experimental) Whether to enable pull request preview for the branch.

Default:

true

Stability:

experimental

skew_protection

(experimental) 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.

Default:

None - Default setting is no skew protection.

Stability:

experimental

stage

(experimental) Stage for the branch.

Default:
  • no stage

Stability:

experimental