Class CfnBranch
A CloudFormation AWS::Amplify::Branch
.
Inherited Members
Namespace: Amazon.CDK.AWS.Amplify
Assembly: Amazon.CDK.AWS.Amplify.dll
Syntax (csharp)
public class CfnBranch : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnBranch
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::Amplify::Branch resource specifies a new branch within an app.
CloudformationResource: AWS::Amplify::Branch
Link: 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 cfnBranch = new CfnBranch(this, "MyCfnBranch", new CfnBranchProps {
AppId = "appId",
BranchName = "branchName",
// the properties below are optional
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
CfnBranch(Construct, String, ICfnBranchProps) | Create a new |
CfnBranch(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnBranch(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AppId | The unique ID for an Amplify app. |
AttrArn | ARN for a branch, part of an Amplify App. |
AttrBranchName | Name for a branch, part of an Amplify App. |
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. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnBranch(Construct, String, ICfnBranchProps)
Create a new AWS::Amplify::Branch
.
public CfnBranch(Construct scope, string id, ICfnBranchProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnBranchProps
- resource properties.
CfnBranch(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnBranch(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnBranch(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnBranch(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AppId
The unique ID for an Amplify app.
public virtual string AppId { get; set; }
Property Value
System.String
Remarks
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern: d[a-z0-9]+
AttrArn
ARN for a branch, part of an Amplify App.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrBranchName
Name for a branch, part of an Amplify App.
public virtual string AttrBranchName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: BranchName
BasicAuthConfig
The basic authorization credentials for a branch of an Amplify app.
public virtual 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 virtual string BranchName { get; set; }
Property Value
System.String
Remarks
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
BuildSpec
The build specification (build spec) for the branch.
public virtual string BuildSpec { get; set; }
Property Value
System.String
Remarks
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description for the branch that is part of an Amplify app.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
EnableAutoBuild
Enables auto building for the branch.
public virtual object EnableAutoBuild { get; set; }
Property Value
System.Object
Remarks
EnablePerformanceMode
Enables performance mode for the branch.
public virtual 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 virtual 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 virtual object EnvironmentVariables { get; set; }
Property Value
System.Object
Remarks
Framework
The framework for the branch.
public virtual 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 virtual 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 .
Length Constraints: Maximum length of 20.
Pattern: (?s).*
Stage
Describes the current stage for the branch.
public virtual string Stage { get; set; }
Property Value
System.String
Remarks
Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
Tags
The tag for the branch.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>