Class BranchProps
(experimental) Properties for a Branch.
Inherited Members
Namespace: Amazon.CDK.AWS.Amplify.Alpha
Assembly: Amazon.CDK.AWS.Amplify.Alpha.dll
Syntax (csharp)
public class BranchProps : IBranchProps, IBranchOptions
Syntax (vb)
Public Class BranchProps Implements IBranchProps, IBranchOptions
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Amplify.Alpha;
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3.Assets;
App app;
Asset asset;
BasicAuth basicAuth;
BuildSpec buildSpec;
Role role;
var branchProps = new BranchProps {
App = app,
// the properties below are optional
Asset = asset,
AutoBuild = false,
BasicAuth = basicAuth,
BranchName = "branchName",
BuildSpec = buildSpec,
ComputeRole = role,
Description = "description",
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
PerformanceMode = false,
PullRequestEnvironmentName = "pullRequestEnvironmentName",
PullRequestPreview = false,
SkewProtection = false,
Stage = "stage"
};
Synopsis
Constructors
BranchProps() | (experimental) Properties for a Branch. |
Properties
App | (experimental) The application within which the branch must be created. |
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. |
ComputeRole | (experimental) The IAM role to assign to a branch of an SSR app. |
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. |
SkewProtection | (experimental) Specifies whether the skew protection feature is enabled for the branch. |
Stage | (experimental) Stage for the branch. |
Constructors
BranchProps()
(experimental) Properties for a Branch.
public BranchProps()
Remarks
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Amplify.Alpha;
using Amazon.CDK.AWS.CodeBuild;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.S3.Assets;
App app;
Asset asset;
BasicAuth basicAuth;
BuildSpec buildSpec;
Role role;
var branchProps = new BranchProps {
App = app,
// the properties below are optional
Asset = asset,
AutoBuild = false,
BasicAuth = basicAuth,
BranchName = "branchName",
BuildSpec = buildSpec,
ComputeRole = role,
Description = "description",
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
PerformanceMode = false,
PullRequestEnvironmentName = "pullRequestEnvironmentName",
PullRequestPreview = false,
SkewProtection = false,
Stage = "stage"
};
Properties
App
(experimental) The application within which the branch must be created.
public IApp App { get; set; }
Property Value
Remarks
Stability: Experimental
Asset
(experimental) Asset for deployment.
public Asset? Asset { get; set; }
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.
public bool? AutoBuild { get; set; }
Property Value
bool?
Remarks
Default: true
Stability: Experimental
BasicAuth
(experimental) The Basic Auth configuration.
public BasicAuth? BasicAuth { get; set; }
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.
public string? BranchName { get; set; }
Property Value
Remarks
Default: - the construct's id
Stability: Experimental
BuildSpec
(experimental) BuildSpec for the branch.
public BuildSpec? BuildSpec { get; set; }
Property Value
Remarks
Default: - no build spec
Stability: Experimental
See: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html
ComputeRole
(experimental) The IAM role to assign to a branch of an SSR app.
public IRole? ComputeRole { get; set; }
Property Value
Remarks
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.
public string? Description { get; set; }
Property Value
Remarks
Default: - no description
Stability: Experimental
EnvironmentVariables
(experimental) Environment variables for the branch.
public IDictionary<string, string>? EnvironmentVariables { get; set; }
Property Value
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.
public bool? PerformanceMode { get; set; }
Property Value
bool?
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.
public string? PullRequestEnvironmentName { get; set; }
Property Value
Remarks
Default: - automatically provision a temporary backend
Stability: Experimental
PullRequestPreview
(experimental) Whether to enable pull request preview for the branch.
public bool? PullRequestPreview { get; set; }
Property Value
bool?
Remarks
Default: true
Stability: Experimental
SkewProtection
(experimental) Specifies whether the skew protection feature is enabled for the branch.
public bool? SkewProtection { get; set; }
Property Value
bool?
Remarks
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.
public string? Stage { get; set; }
Property Value
Remarks
Default: - no stage
Stability: Experimental