Class CfnBranchProps
Properties for defining a CfnBranch
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Amplify
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnBranchProps : Object, ICfnBranchProps
Syntax (vb)
Public Class CfnBranchProps
Inherits Object
Implements ICfnBranchProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html
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;
var cfnBranchProps = new CfnBranchProps {
AppId = "appId",
BranchName = "branchName",
// the properties below are optional
Backend = new BackendProperty {
StackArn = "stackArn"
},
BasicAuthConfig = new BasicAuthConfigProperty {
Password = "password",
Username = "username",
// the properties below are optional
EnableBasicAuth = false
},
BuildSpec = "buildSpec",
Description = "description",
EnableAutoBuild = false,
EnablePerformanceMode = false,
EnablePullRequestPreview = false,
EnvironmentVariables = new [] { new EnvironmentVariableProperty {
Name = "name",
Value = "value"
} },
Framework = "framework",
PullRequestEnvironmentName = "pullRequestEnvironmentName",
Stage = "stage",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Constructors
CfnBranchProps() |
Properties
AppId | The unique ID for an Amplify app. |
Backend | Specifies the backend for a |
BasicAuthConfig | The basic authorization credentials for a branch of an Amplify app. |
BranchName | The name for the branch. |
BuildSpec | The build specification (build spec) for the branch. |
Description | The description for the branch that is part of an Amplify app. |
EnableAutoBuild | Enables auto building for the branch. |
EnablePerformanceMode | Enables performance mode for the branch. |
EnablePullRequestPreview | Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. |
EnvironmentVariables | The environment variables for the branch. |
Framework | The framework for the branch. |
PullRequestEnvironmentName | If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. |
Stage | Describes the current stage for the branch. |
Tags | The tag for the branch. |
Constructors
CfnBranchProps()
public CfnBranchProps()
Properties
AppId
The unique ID for an Amplify app.
public string AppId { get; set; }
Property Value
System.String
Remarks
Backend
Specifies the backend for a Branch
of an Amplify app.
public object Backend { get; set; }
Property Value
System.Object
Remarks
BasicAuthConfig
The basic authorization credentials for a branch of an Amplify app.
public object BasicAuthConfig { get; set; }
Property Value
System.Object
Remarks
You must base64-encode the authorization credentials and provide them in the format user:password
.
BranchName
The name for the branch.
public string BranchName { get; set; }
Property Value
System.String
Remarks
BuildSpec
The build specification (build spec) for the branch.
public string BuildSpec { get; set; }
Property Value
System.String
Remarks
Description
The description for the branch that is part of an Amplify app.
public string Description { get; set; }
Property Value
System.String
Remarks
EnableAutoBuild
Enables auto building for the branch.
public object EnableAutoBuild { get; set; }
Property Value
System.Object
Remarks
EnablePerformanceMode
Enables performance mode for the branch.
public object EnablePerformanceMode { get; set; }
Property Value
System.Object
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.
EnablePullRequestPreview
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.
public object EnablePullRequestPreview { get; set; }
Property Value
System.Object
Remarks
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 .
EnvironmentVariables
The environment variables for the branch.
public object EnvironmentVariables { get; set; }
Property Value
System.Object
Remarks
Framework
The framework for the branch.
public string Framework { get; set; }
Property Value
System.String
Remarks
PullRequestEnvironmentName
If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.
public string PullRequestEnvironmentName { get; set; }
Property Value
System.String
Remarks
For example, you could specify an environment named prod
, test
, or dev
that you initialized with the Amplify CLI and mapped to this branch.
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 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
Describes the current stage for the branch.
public string Stage { get; set; }
Property Value
System.String