Interface IBranchOptions
(experimental) Options to add a branch to an application.
Namespace: Amazon.CDK.AWS.Amplify.Alpha
Assembly: Amazon.CDK.AWS.Amplify.Alpha.dll
Syntax (csharp)
public interface IBranchOptions
Syntax (vb)
Public Interface IBranchOptions
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
App amplifyApp;
var main = amplifyApp.AddBranch("main"); // `id` will be used as repo branch name
var dev = amplifyApp.AddBranch("dev", new BranchOptions {
PerformanceMode = true
});
dev.AddEnvironment("STAGE", "dev");
Synopsis
Properties
Asset | (experimental) Asset for deployment. |
AutoBuild | (experimental) Whether to enable auto building for the branch. |
BasicAuth | (experimental) The Basic Auth configuration. |
BranchName | (experimental) The name of the branch. |
BuildSpec | (experimental) BuildSpec for the branch. |
Description | (experimental) A description for the branch. |
EnvironmentVariables | (experimental) Environment variables for the branch. |
PerformanceMode | (experimental) Enables performance mode for the branch. |
PullRequestEnvironmentName | (experimental) The dedicated backend environment for the pull request previews. |
PullRequestPreview | (experimental) Whether to enable pull request preview for the branch. |
Stage | (experimental) Stage for the branch. |
Properties
Asset
(experimental) Asset for deployment.
virtual Asset Asset { get; }
Property Value
Remarks
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
AutoBuild
(experimental) Whether to enable auto building for the branch.
virtual Nullable<bool> AutoBuild { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Stability: Experimental
BasicAuth
(experimental) The Basic Auth configuration.
virtual BasicAuth BasicAuth { get; }
Property Value
Remarks
Use this to set password protection for the branch
Default: - no password protection
Stability: Experimental
BranchName
(experimental) The name of the branch.
virtual string BranchName { get; }
Property Value
System.String
Remarks
Default: - the construct's id
Stability: Experimental
BuildSpec
(experimental) BuildSpec for the branch.
virtual BuildSpec BuildSpec { get; }
Property Value
Remarks
Default: - no build spec
Stability: Experimental
See: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html
Description
(experimental) A description for the branch.
virtual string Description { get; }
Property Value
System.String
Remarks
Default: - no description
Stability: Experimental
EnvironmentVariables
(experimental) Environment variables for the branch.
virtual IDictionary<string, string> EnvironmentVariables { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
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
PerformanceMode
(experimental) Enables performance mode for the branch.
virtual Nullable<bool> PerformanceMode { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
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
PullRequestEnvironmentName
(experimental) The dedicated backend environment for the pull request previews.
virtual string PullRequestEnvironmentName { get; }
Property Value
System.String
Remarks
Default: - automatically provision a temporary backend
Stability: Experimental
PullRequestPreview
(experimental) Whether to enable pull request preview for the branch.
virtual Nullable<bool> PullRequestPreview { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
Stability: Experimental
Stage
(experimental) Stage for the branch.
virtual string Stage { get; }
Property Value
System.String
Remarks
Default: - no stage
Stability: Experimental