Class CfnBranch
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.amplify.CfnBranch
- All Implemented Interfaces:
IInspectable,IBranchRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:27.494Z")
@Stability(Stable)
public class CfnBranch
extends CfnResource
implements IInspectable, IBranchRef, ITaggable
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
.backend(BackendProperty.builder()
.stackArn("stackArn")
.build())
.basicAuthConfig(BasicAuthConfigProperty.builder()
.password("password")
.username("username")
// the properties below are optional
.enableBasicAuth(false)
.build())
.buildSpec("buildSpec")
.computeRoleArn("computeRoleArn")
.description("description")
.enableAutoBuild(false)
.enablePerformanceMode(false)
.enablePullRequestPreview(false)
.enableSkewProtection(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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDescribes the backend associated with an AmplifyBranch.static interfaceUse the BasicAuthConfig property type to set password protection for a specific branch.static final classA fluent builder forCfnBranch.static interfaceThe EnvironmentVariable property type sets environment variables for a specific branch.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.amplify.IBranchRef
IBranchRef.Jsii$Default, IBranchRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnBranch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBranch(software.amazon.jsii.JsiiObjectRef objRef) CfnBranch(software.constructs.Construct scope, String id, CfnBranchProps props) Create a newAWS::Amplify::Branch. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForBranch(IBranchRef resource) getAppId()The unique ID for an Amplify app.ARN for a branch, part of an Amplify App.Name for a branch, part of an Amplify App.The backend for aBranchof an Amplify app.The basic authorization credentials for a branch of an Amplify app.The name for the branch.A reference to a Branch resource.The build specification (build spec) for the branch.The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app.The description for the branch that is part of an Amplify app.Enables auto building for the branch.Enables performance mode for the branch.Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.Specifies whether the skew protection feature is enabled for the branch.The environment variables for the branch.The framework for the branch.If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.getStage()Describes the current stage for the branch.getTags()Tag Manager which manages the tags for this resource.The tag for the branch.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnBranch.renderProperties(Map<String, Object> props) voidThe unique ID for an Amplify app.voidsetBackend(IResolvable value) The backend for aBranchof an Amplify app.voidThe backend for aBranchof an Amplify app.voidsetBasicAuthConfig(IResolvable value) The basic authorization credentials for a branch of an Amplify app.voidThe basic authorization credentials for a branch of an Amplify app.voidsetBranchName(String value) The name for the branch.voidsetBuildSpec(String value) The build specification (build spec) for the branch.voidsetComputeRoleArn(String value) The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app.voidsetDescription(String value) The description for the branch that is part of an Amplify app.voidsetEnableAutoBuild(Boolean value) Enables auto building for the branch.voidsetEnableAutoBuild(IResolvable value) Enables auto building for the branch.voidsetEnablePerformanceMode(Boolean value) Enables performance mode for the branch.voidEnables performance mode for the branch.voidSpecifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.voidSpecifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.voidsetEnableSkewProtection(Boolean value) Specifies whether the skew protection feature is enabled for the branch.voidSpecifies whether the skew protection feature is enabled for the branch.voidsetEnvironmentVariables(List<Object> value) The environment variables for the branch.voidThe environment variables for the branch.voidsetFramework(String value) The framework for the branch.voidIf pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews.voidDescribes the current stage for the branch.voidsetTagsRaw(List<CfnTag> value) The tag for the branch.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnBranch
protected CfnBranch(software.amazon.jsii.JsiiObjectRef objRef) -
CfnBranch
protected CfnBranch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnBranch
@Stability(Stable) public CfnBranch(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnBranchProps props) Create a newAWS::Amplify::Branch.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForBranch
- Parameters:
resource- This parameter is required.
-
isCfnBranch
Checks whether the given object is a CfnBranch.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
ARN for a branch, part of an Amplify App. -
getAttrBranchName
Name for a branch, part of an Amplify App. -
getBranchRef
A reference to a Branch resource.- Specified by:
getBranchRefin interfaceIBranchRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAppId
The unique ID for an Amplify app. -
setAppId
The unique ID for an Amplify app. -
getBranchName
The name for the branch. -
setBranchName
The name for the branch. -
getBackend
The backend for aBranchof an Amplify app.Use for a backend created from an CloudFormation stack.
Returns union: either
IResolvableorCfnBranch.BackendProperty -
setBackend
The backend for aBranchof an Amplify app.Use for a backend created from an CloudFormation stack.
-
setBackend
The backend for aBranchof an Amplify app.Use for a backend created from an CloudFormation stack.
-
getBasicAuthConfig
The basic authorization credentials for a branch of an Amplify app.Returns union: either
IResolvableorCfnBranch.BasicAuthConfigProperty -
setBasicAuthConfig
The basic authorization credentials for a branch of an Amplify app. -
setBasicAuthConfig
@Stability(Stable) public void setBasicAuthConfig(@Nullable CfnBranch.BasicAuthConfigProperty value) The basic authorization credentials for a branch of an Amplify app. -
getBuildSpec
The build specification (build spec) for the branch. -
setBuildSpec
The build specification (build spec) for the branch. -
getComputeRoleArn
The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. -
setComputeRoleArn
The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. -
getDescription
The description for the branch that is part of an Amplify app. -
setDescription
The description for the branch that is part of an Amplify app. -
getEnableAutoBuild
Enables auto building for the branch.Returns union: either
BooleanorIResolvable -
setEnableAutoBuild
Enables auto building for the branch. -
setEnableAutoBuild
Enables auto building for the branch. -
getEnablePerformanceMode
Enables performance mode for the branch.Returns union: either
BooleanorIResolvable -
setEnablePerformanceMode
Enables performance mode for the branch. -
setEnablePerformanceMode
Enables performance mode for the branch. -
getEnablePullRequestPreview
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch.Returns union: either
BooleanorIResolvable -
setEnablePullRequestPreview
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. -
setEnablePullRequestPreview
Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. -
getEnableSkewProtection
Specifies whether the skew protection feature is enabled for the branch.Returns union: either
BooleanorIResolvable -
setEnableSkewProtection
Specifies whether the skew protection feature is enabled for the branch. -
setEnableSkewProtection
Specifies whether the skew protection feature is enabled for the branch. -
getEnvironmentVariables
The environment variables for the branch.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnBranch.EnvironmentVariableProperty> -
setEnvironmentVariables
The environment variables for the branch. -
setEnvironmentVariables
The environment variables for the branch. -
getFramework
The framework for the branch. -
setFramework
The framework for the branch. -
getPullRequestEnvironmentName
If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. -
setPullRequestEnvironmentName
If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. -
getStage
Describes the current stage for the branch. -
setStage
Describes the current stage for the branch. -
getTagsRaw
The tag for the branch. -
setTagsRaw
The tag for the branch.
-