@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:30.946Z") public class CfnBranch extends CfnResource implements IInspectable
The AWS::Amplify::Branch resource specifies a new branch within an app.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.amplify.*; CfnBranch cfnBranch = CfnBranch.Builder.create(this, "MyCfnBranch") .appId("appId") .branchName("branchName") // the properties below are optional .basicAuthConfig(BasicAuthConfigProperty.builder() .password("password") .username("username") // the properties below are optional .enableBasicAuth(false) .build()) .buildSpec("buildSpec") .description("description") .enableAutoBuild(false) .enablePerformanceMode(false) .enablePullRequestPreview(false) .environmentVariables(List.of(EnvironmentVariableProperty.builder() .name("name") .value("value") .build())) .framework("framework") .pullRequestEnvironmentName("pullRequestEnvironmentName") .stage("stage") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnBranch.BasicAuthConfigProperty
Use the BasicAuthConfig property type to set password protection for a specific branch.
|
static class |
CfnBranch.Builder
A fluent builder for
CfnBranch . |
static interface |
CfnBranch.EnvironmentVariableProperty
The EnvironmentVariable property type sets environment variables for a specific branch.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBranch(Construct scope,
java.lang.String id,
CfnBranchProps props)
Create a new `AWS::Amplify::Branch`.
|
protected |
CfnBranch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBranch(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppId()
The unique ID for an Amplify app.
|
java.lang.String |
getAttrArn()
ARN for a branch, part of an Amplify App.
|
java.lang.String |
getAttrBranchName()
Name for a branch, part of an Amplify App.
|
java.lang.Object |
getBasicAuthConfig()
The basic authorization credentials for a branch of an Amplify app.
|
java.lang.String |
getBranchName()
The name for the branch.
|
java.lang.String |
getBuildSpec()
The build specification (build spec) for the branch.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description for the branch that is part of an Amplify app.
|
java.lang.Object |
getEnableAutoBuild()
Enables auto building for the branch.
|
java.lang.Object |
getEnablePerformanceMode()
Enables performance mode for the branch.
|
java.lang.Object |
getEnablePullRequestPreview()
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.
|
java.lang.Object |
getEnvironmentVariables()
The environment variables for the branch.
|
java.lang.String |
getFramework()
The framework for the branch.
|
java.lang.String |
getPullRequestEnvironmentName()
If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.
|
java.lang.String |
getStage()
Describes the current stage for the branch.
|
TagManager |
getTags()
The tag for the branch.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAppId(java.lang.String value)
The unique ID for an Amplify app.
|
void |
setBasicAuthConfig(CfnBranch.BasicAuthConfigProperty value)
The basic authorization credentials for a branch of an Amplify app.
|
void |
setBasicAuthConfig(IResolvable value)
The basic authorization credentials for a branch of an Amplify app.
|
void |
setBranchName(java.lang.String value)
The name for the branch.
|
void |
setBuildSpec(java.lang.String value)
The build specification (build spec) for the branch.
|
void |
setDescription(java.lang.String value)
The description for the branch that is part of an Amplify app.
|
void |
setEnableAutoBuild(java.lang.Boolean value)
Enables auto building for the branch.
|
void |
setEnableAutoBuild(IResolvable value)
Enables auto building for the branch.
|
void |
setEnablePerformanceMode(java.lang.Boolean value)
Enables performance mode for the branch.
|
void |
setEnablePerformanceMode(IResolvable value)
Enables performance mode for the branch.
|
void |
setEnablePullRequestPreview(java.lang.Boolean value)
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.
|
void |
setEnablePullRequestPreview(IResolvable value)
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.
|
void |
setEnvironmentVariables(IResolvable value)
The environment variables for the branch.
|
void |
setEnvironmentVariables(java.util.List<java.lang.Object> value)
The environment variables for the branch.
|
void |
setFramework(java.lang.String value)
The framework for the branch.
|
void |
setPullRequestEnvironmentName(java.lang.String value)
If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.
|
void |
setStage(java.lang.String value)
Describes the current stage for the branch.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBranch(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBranch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBranch(Construct scope, java.lang.String id, CfnBranchProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrBranchName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getAppId()
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern: d[a-z0-9]+
public void setAppId(java.lang.String value)
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern: d[a-z0-9]+
public java.lang.String getBranchName()
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
public void setBranchName(java.lang.String value)
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
public java.lang.Object getBasicAuthConfig()
You must base64-encode the authorization credentials and provide them in the format user:password
.
public void setBasicAuthConfig(IResolvable value)
You must base64-encode the authorization credentials and provide them in the format user:password
.
public void setBasicAuthConfig(CfnBranch.BasicAuthConfigProperty value)
You must base64-encode the authorization credentials and provide them in the format user:password
.
public java.lang.String getBuildSpec()
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
public void setBuildSpec(java.lang.String value)
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
public java.lang.String getDescription()
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
public void setDescription(java.lang.String value)
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
public java.lang.Object getEnableAutoBuild()
public void setEnableAutoBuild(java.lang.Boolean value)
public void setEnableAutoBuild(IResolvable value)
public java.lang.Object getEnablePerformanceMode()
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.
public void setEnablePerformanceMode(java.lang.Boolean value)
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.
public void setEnablePerformanceMode(IResolvable value)
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.
public java.lang.Object getEnablePullRequestPreview()
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 .
public void setEnablePullRequestPreview(java.lang.Boolean value)
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 .
public void setEnablePullRequestPreview(IResolvable value)
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 .
public java.lang.Object getEnvironmentVariables()
public void setEnvironmentVariables(IResolvable value)
public void setEnvironmentVariables(java.util.List<java.lang.Object> value)
public java.lang.String getFramework()
public void setFramework(java.lang.String value)
public java.lang.String getPullRequestEnvironmentName()
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).*
public void setPullRequestEnvironmentName(java.lang.String value)
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).*
public java.lang.String getStage()
Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
public void setStage(java.lang.String value)
Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST