@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.019Z") @Stability(value=Stable) public class CfnBranch extends CfnResource implements IInspectable
The AWS::Amplify::Branch resource creates 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()))
.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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnBranch(software.constructs.Construct scope,
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 |
|---|---|
String |
getAppId()
The unique ID for an Amplify app.
|
String |
getAttrArn()
ARN for a branch, part of an Amplify App.
|
String |
getAttrBranchName()
Name for a branch, part of an Amplify App.
|
Object |
getBasicAuthConfig()
The basic authorization credentials for a branch of an Amplify app.
|
String |
getBranchName()
The name for the branch.
|
String |
getBuildSpec()
The build specification (build spec) for the branch.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
The description for the branch that is part of an Amplify app.
|
Object |
getEnableAutoBuild()
Enables auto building for the branch.
|
Object |
getEnablePerformanceMode()
Enables performance mode for the branch.
|
Object |
getEnablePullRequestPreview()
Sets whether the Amplify Console creates a preview for each pull request that is made for this branch.
|
Object |
getEnvironmentVariables()
The environment variables for the branch.
|
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.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAppId(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(String value)
The name for the branch.
|
void |
setBuildSpec(String value)
The build specification (build spec) for the branch.
|
void |
setDescription(String value)
The description for the branch that is part of an Amplify app.
|
void |
setEnableAutoBuild(Boolean value)
Enables auto building for the branch.
|
void |
setEnableAutoBuild(IResolvable value)
Enables auto building for the branch.
|
void |
setEnablePerformanceMode(Boolean value)
Enables performance mode for the branch.
|
void |
setEnablePerformanceMode(IResolvable value)
Enables performance mode for the branch.
|
void |
setEnablePullRequestPreview(Boolean value)
Sets whether the Amplify Console creates a preview for each pull request that is made for this branch.
|
void |
setEnablePullRequestPreview(IResolvable value)
Sets whether the Amplify Console 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(List<Object> value)
The environment variables for the branch.
|
void |
setPullRequestEnvironmentName(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(String value)
Describes the current stage for the branch.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnBranch(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBranch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnBranch(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrBranchName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getAppId()
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern: d[a-z0-9]+
@Stability(value=Stable)
public void setAppId(@NotNull
String value)
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern: d[a-z0-9]+
@Stability(value=Stable) @NotNull public String getBranchName()
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
@Stability(value=Stable)
public void setBranchName(@NotNull
String value)
Length Constraints: Minimum length of 1. Maximum length of 255.
Pattern: (?s).+
@Stability(value=Stable) @Nullable public Object getBasicAuthConfig()
You must base64-encode the authorization credentials and provide them in the format user:password .
@Stability(value=Stable)
public void setBasicAuthConfig(@Nullable
CfnBranch.BasicAuthConfigProperty value)
You must base64-encode the authorization credentials and provide them in the format user:password .
@Stability(value=Stable)
public void setBasicAuthConfig(@Nullable
IResolvable value)
You must base64-encode the authorization credentials and provide them in the format user:password .
@Stability(value=Stable) @Nullable public String getBuildSpec()
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
@Stability(value=Stable)
public void setBuildSpec(@Nullable
String value)
Length Constraints: Minimum length of 1. Maximum length of 25000.
Pattern: (?s).+
@Stability(value=Stable) @Nullable public String getDescription()
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
Length Constraints: Maximum length of 1000.
Pattern: (?s).*
@Stability(value=Stable) @Nullable public Object getEnableAutoBuild()
@Stability(value=Stable)
public void setEnableAutoBuild(@Nullable
Boolean value)
@Stability(value=Stable)
public void setEnableAutoBuild(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setEnablePerformanceMode(@Nullable
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.
@Stability(value=Stable)
public void setEnablePerformanceMode(@Nullable
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.
@Stability(value=Stable) @Nullable public Object getEnablePullRequestPreview()
If this property is enabled, the Amplify Console 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, the Amplify Console 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 .
@Stability(value=Stable)
public void setEnablePullRequestPreview(@Nullable
Boolean value)
If this property is enabled, the Amplify Console 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, the Amplify Console 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 .
@Stability(value=Stable)
public void setEnablePullRequestPreview(@Nullable
IResolvable value)
If this property is enabled, the Amplify Console 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, the Amplify Console 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 .
@Stability(value=Stable) @Nullable public Object getEnvironmentVariables()
@Stability(value=Stable)
public void setEnvironmentVariables(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEnvironmentVariables(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public 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, the Amplify Console provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Console 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).*
@Stability(value=Stable)
public void setPullRequestEnvironmentName(@Nullable
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, the Amplify Console provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Console 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).*
@Stability(value=Stable) @Nullable public String getStage()
Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
@Stability(value=Stable)
public void setStage(@Nullable
String value)
Valid Values: PRODUCTION | BETA | DEVELOPMENT | EXPERIMENTAL | PULL_REQUEST
Copyright © 2022. All rights reserved.