AutoBranchCreationConfigProperty Struct
Use the AutoBranchCreationConfig property type to automatically create branches that match a certain pattern.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_amplify as amplify } from 'aws-cdk-lib';
const autoBranchCreationConfigProperty: amplify.CfnApp.AutoBranchCreationConfigProperty = {
autoBranchCreationPatterns: ['autoBranchCreationPatterns'],
basicAuthConfig: {
enableBasicAuth: false,
password: 'password',
username: 'username',
},
buildSpec: 'buildSpec',
enableAutoBranchCreation: false,
enableAutoBuild: false,
enablePerformanceMode: false,
enablePullRequestPreview: false,
environmentVariables: [{
name: 'name',
value: 'value',
}],
framework: 'framework',
pullRequestEnvironmentName: 'pullRequestEnvironmentName',
stage: 'stage',
};
Properties
autoBranchCreationPatternsstring[]auto_branch_creation_patternstyping.List[str]autoBranchCreationPatternsList<String>AutoBranchCreationPatternsstring[]AutoBranchCreationPatterns*[]*string#basicAuthConfigIResolvable | CfnApp.BasicAuthConfigPropertybasic_auth_configtyping.Union[IResolvable, BasicAuthConfigProperty]basicAuthConfigIResolvableBasicAuthConfigIResolvableBasicAuthConfiginterface{}#enableAutoBranchCreationboolean | IResolvableenable_auto_branch_creationtyping.Union[bool, IResolvable]enableAutoBranchCreationBooleanEnableAutoBranchCreationboolEnableAutoBranchCreationinterface{}#enableAutoBuildboolean | IResolvableenable_auto_buildtyping.Union[bool, IResolvable]enableAutoBuildBooleanEnableAutoBuildboolEnableAutoBuildinterface{}#enablePerformanceModeboolean | IResolvableenable_performance_modetyping.Union[bool, IResolvable]enablePerformanceModeBooleanEnablePerformanceModeboolEnablePerformanceModeinterface{}#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.
enablePullRequestPreviewboolean | IResolvableenable_pull_request_previewtyping.Union[bool, IResolvable]enablePullRequestPreviewBooleanEnablePullRequestPreviewboolEnablePullRequestPreviewinterface{}#notes
Amplify creates previews by deploying your app to a unique URL whenever a pull request is opened for the branch. 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 Hosting 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 .
environmentVariablesIResolvable | IResolvable | CfnApp.EnvironmentVariableProperty[]environment_variablestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EnvironmentVariableProperty]]]environmentVariablesIResolvableEnvironmentVariablesIResolvableEnvironmentVariablesinterface{}#pullRequestEnvironmentNamestringpull_request_environment_namestrpullRequestEnvironmentNameStringPullRequestEnvironmentNamestringPullRequestEnvironmentName*string#notes
For example, you could specify an environment named prod , test , or dev that you initialized with the Amplify CLI.
To enable pull request previews, set the EnablePullRequestPreview property to true .
If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify 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 .