We recommend new projects start with resources from the AWS provider.
aws-native.amplify.Branch
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::Amplify::Branch resource creates a new branch within an app.
Create Branch Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Branch(name: string, args: BranchArgs, opts?: CustomResourceOptions);
@overload
def Branch(resource_name: str,
args: BranchArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Branch(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
backend: Optional[BranchBackendArgs] = None,
basic_auth_config: Optional[BranchBasicAuthConfigArgs] = None,
branch_name: Optional[str] = None,
build_spec: Optional[str] = None,
description: Optional[str] = None,
enable_auto_build: Optional[bool] = None,
enable_performance_mode: Optional[bool] = None,
enable_pull_request_preview: Optional[bool] = None,
environment_variables: Optional[Sequence[BranchEnvironmentVariableArgs]] = None,
framework: Optional[str] = None,
pull_request_environment_name: Optional[str] = None,
stage: Optional[BranchStage] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewBranch(ctx *Context, name string, args BranchArgs, opts ...ResourceOption) (*Branch, error)
public Branch(string name, BranchArgs args, CustomResourceOptions? opts = null)
public Branch(String name, BranchArgs args)
public Branch(String name, BranchArgs args, CustomResourceOptions options)
type: aws-native:amplify:Branch
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BranchArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Branch Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Branch resource accepts the following input properties:
- App
Id string - The unique ID for an Amplify app.
- Backend
Pulumi.
Aws Native. Amplify. Inputs. Branch Backend The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- Basic
Auth Pulumi.Config Aws Native. Amplify. Inputs. Branch Basic Auth Config - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - Branch
Name string - The name for the branch.
- Build
Spec string - The build specification (build spec) for the branch.
- Description string
- The description for the branch that is part of an Amplify app.
- Enable
Auto boolBuild - Enables auto building for the branch.
- Enable
Performance boolMode 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.
- Enable
Pull boolRequest Preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- Environment
Variables List<Pulumi.Aws Native. Amplify. Inputs. Branch Environment Variable> - The environment variables for the branch.
- Framework string
- The framework for the branch.
- Pull
Request stringEnvironment Name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- Stage
Pulumi.
Aws Native. Amplify. Branch Stage - Describes the current stage for the branch.
- List<Pulumi.
Aws Native. Inputs. Tag> - The tag for the branch.
- App
Id string - The unique ID for an Amplify app.
- Backend
Branch
Backend Args The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- Basic
Auth BranchConfig Basic Auth Config Args - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - Branch
Name string - The name for the branch.
- Build
Spec string - The build specification (build spec) for the branch.
- Description string
- The description for the branch that is part of an Amplify app.
- Enable
Auto boolBuild - Enables auto building for the branch.
- Enable
Performance boolMode 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.
- Enable
Pull boolRequest Preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- Environment
Variables []BranchEnvironment Variable Args - The environment variables for the branch.
- Framework string
- The framework for the branch.
- Pull
Request stringEnvironment Name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- Stage
Branch
Stage - Describes the current stage for the branch.
- Tag
Args - The tag for the branch.
- app
Id String - The unique ID for an Amplify app.
- backend
Branch
Backend The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- basic
Auth BranchConfig Basic Auth Config - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - branch
Name String - The name for the branch.
- build
Spec String - The build specification (build spec) for the branch.
- description String
- The description for the branch that is part of an Amplify app.
- enable
Auto BooleanBuild - Enables auto building for the branch.
- enable
Performance BooleanMode 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.
- enable
Pull BooleanRequest Preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- environment
Variables List<BranchEnvironment Variable> - The environment variables for the branch.
- framework String
- The framework for the branch.
- pull
Request StringEnvironment Name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- stage
Branch
Stage - Describes the current stage for the branch.
- List<Tag>
- The tag for the branch.
- app
Id string - The unique ID for an Amplify app.
- backend
Branch
Backend The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- basic
Auth BranchConfig Basic Auth Config - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - branch
Name string - The name for the branch.
- build
Spec string - The build specification (build spec) for the branch.
- description string
- The description for the branch that is part of an Amplify app.
- enable
Auto booleanBuild - Enables auto building for the branch.
- enable
Performance booleanMode 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.
- enable
Pull booleanRequest Preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- environment
Variables BranchEnvironment Variable[] - The environment variables for the branch.
- framework string
- The framework for the branch.
- pull
Request stringEnvironment Name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- stage
Branch
Stage - Describes the current stage for the branch.
- Tag[]
- The tag for the branch.
- app_
id str - The unique ID for an Amplify app.
- backend
Branch
Backend Args The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- basic_
auth_ Branchconfig Basic Auth Config Args - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - branch_
name str - The name for the branch.
- build_
spec str - The build specification (build spec) for the branch.
- description str
- The description for the branch that is part of an Amplify app.
- enable_
auto_ boolbuild - Enables auto building for the branch.
- enable_
performance_ boolmode 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.
- enable_
pull_ boolrequest_ preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- environment_
variables Sequence[BranchEnvironment Variable Args] - The environment variables for the branch.
- framework str
- The framework for the branch.
- pull_
request_ strenvironment_ name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- stage
Branch
Stage - Describes the current stage for the branch.
- Sequence[Tag
Args] - The tag for the branch.
- app
Id String - The unique ID for an Amplify app.
- backend Property Map
The backend for a
Branch
of an Amplify app. Use for a backend created from an AWS CloudFormation stack.This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
- basic
Auth Property MapConfig - The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format
user:password
. - branch
Name String - The name for the branch.
- build
Spec String - The build specification (build spec) for the branch.
- description String
- The description for the branch that is part of an Amplify app.
- enable
Auto BooleanBuild - Enables auto building for the branch.
- enable
Performance BooleanMode 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.
- enable
Pull BooleanRequest Preview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the
PullRequestEnvironmentName
property.For more information, see Web Previews in the AWS Amplify Hosting User Guide .
- environment
Variables List<Property Map> - The environment variables for the branch.
- framework String
- The framework for the branch.
- pull
Request StringEnvironment Name If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named
prod
,test
, ordev
that you initialized with the Amplify CLI and mapped to this branch.To enable pull request previews, set the
EnablePullRequestPreview
property totrue
.If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
For more information about creating backend environments, see Feature Branch Deployments and Team Workflows in the AWS Amplify Hosting User Guide .
- stage "EXPERIMENTAL" | "BETA" | "PULL_REQUEST" | "PRODUCTION" | "DEVELOPMENT"
- Describes the current stage for the branch.
- List<Property Map>
- The tag for the branch.
Outputs
All input properties are implicitly available as output properties. Additionally, the Branch resource produces the following output properties:
Supporting Types
BranchBackend, BranchBackendArgs
- Stack
Arn string - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
- Stack
Arn string - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
- stack
Arn String - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
- stack
Arn string - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
- stack_
arn str - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
- stack
Arn String - The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
BranchBasicAuthConfig, BranchBasicAuthConfigArgs
- Password string
- The password for basic authorization.
- Username string
- Enable
Basic boolAuth - Enables basic authorization for the branch.
- Password string
- The password for basic authorization.
- Username string
- Enable
Basic boolAuth - Enables basic authorization for the branch.
- password String
- The password for basic authorization.
- username String
- enable
Basic BooleanAuth - Enables basic authorization for the branch.
- password string
- The password for basic authorization.
- username string
- enable
Basic booleanAuth - Enables basic authorization for the branch.
- password str
- The password for basic authorization.
- username str
- enable_
basic_ boolauth - Enables basic authorization for the branch.
- password String
- The password for basic authorization.
- username String
- enable
Basic BooleanAuth - Enables basic authorization for the branch.
BranchEnvironmentVariable, BranchEnvironmentVariableArgs
BranchStage, BranchStageArgs
- Experimental
- EXPERIMENTAL
- Beta
- BETA
- Pull
Request - PULL_REQUEST
- Production
- PRODUCTION
- Development
- DEVELOPMENT
- Branch
Stage Experimental - EXPERIMENTAL
- Branch
Stage Beta - BETA
- Branch
Stage Pull Request - PULL_REQUEST
- Branch
Stage Production - PRODUCTION
- Branch
Stage Development - DEVELOPMENT
- Experimental
- EXPERIMENTAL
- Beta
- BETA
- Pull
Request - PULL_REQUEST
- Production
- PRODUCTION
- Development
- DEVELOPMENT
- Experimental
- EXPERIMENTAL
- Beta
- BETA
- Pull
Request - PULL_REQUEST
- Production
- PRODUCTION
- Development
- DEVELOPMENT
- EXPERIMENTAL
- EXPERIMENTAL
- BETA
- BETA
- PULL_REQUEST
- PULL_REQUEST
- PRODUCTION
- PRODUCTION
- DEVELOPMENT
- DEVELOPMENT
- "EXPERIMENTAL"
- EXPERIMENTAL
- "BETA"
- BETA
- "PULL_REQUEST"
- PULL_REQUEST
- "PRODUCTION"
- PRODUCTION
- "DEVELOPMENT"
- DEVELOPMENT
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.