Class CfnCluster
- All Implemented Interfaces:
IInspectable,IClusterRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
AWS::DSQL::Cluster resource specifies an cluster. You can use this resource to create, modify, and manage clusters.
This resource supports both single-Region clusters and multi-Region clusters through the MultiRegionProperties parameter.
Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters. > - The witness Region specified in
multiRegionProperties.witnessRegioncannot be the same as the cluster's Region.
Required permissions
- dsql:CreateCluster - Required to create a cluster.
Resources: arn:aws:dsql:region:account-id:cluster/*
- dsql:TagResource - Permission to add tags to a resource.
Resources: arn:aws:dsql:region:account-id:cluster/*
- dsql:PutMultiRegionProperties - Permission to configure multi-Region properties for a cluster.
Resources: arn:aws:dsql:region:account-id:cluster/*
- dsql:AddPeerCluster - When specifying
multiRegionProperties.clusters, permission to add peer clusters.
Resources:
- Local cluster:
arn:aws:dsql:region:account-id:cluster/* - Each peer cluster: exact ARN of each specified peer cluster
- dsql:PutWitnessRegion - When specifying
multiRegionProperties.witnessRegion, permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region.
Resources: arn:aws:dsql:region:account-id:cluster/*
Condition Keys: dsql:WitnessRegion (matching the specified witness region)
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.dsql.*;
CfnCluster cfnCluster = CfnCluster.Builder.create(this, "MyCfnCluster")
.deletionProtectionEnabled(false)
.kmsEncryptionKey("kmsEncryptionKey")
.multiRegionProperties(MultiRegionPropertiesProperty.builder()
.clusters(List.of("clusters"))
.witnessRegion("witnessRegion")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnCluster.static interfaceConfiguration details about encryption for the cluster including the AWS KMS key ARN, encryption type, and encryption status.static interfaceDefines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.dsql.IClusterRef
IClusterRef.Jsii$Default, IClusterRef.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.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCluster(software.amazon.jsii.JsiiObjectRef objRef) CfnCluster(software.constructs.Construct scope, String id) Create a newAWS::DSQL::Cluster.CfnCluster(software.constructs.Construct scope, String id, CfnClusterProps props) Create a newAWS::DSQL::Cluster. -
Method Summary
Modifier and TypeMethodDescriptionstatic IClusterReffromIdentifier(software.constructs.Construct scope, String id, String identifier) Creates a new IClusterRef from a identifier.The timestamp when the cluster was created, in ISO 8601 format.The encryption configuration details for the cluster.The unique identifier assigned to the cluster upon creation.The Amazon Resource Name (ARN) of the cluster.The current status of the cluster.The VPC Endpoint Service name for the cluster.Tag Manager which manages the tags for this resource.A reference to a Cluster resource.Whether deletion protection is enabled on this cluster.The KMS key that encrypts data on the cluster.Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.getTags()A map of key and value pairs this cluster is tagged with.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidWhether deletion protection is enabled on this cluster.voidWhether deletion protection is enabled on this cluster.voidsetKmsEncryptionKey(String value) The KMS key that encrypts data on the cluster.voidDefines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.voidDefines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.voidA map of key and value pairs this cluster is tagged with.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
-
CfnCluster
protected CfnCluster(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCluster
protected CfnCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCluster
@Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnClusterProps props) Create a newAWS::DSQL::Cluster.- 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.
-
CfnCluster
@Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id) Create a newAWS::DSQL::Cluster.- 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.
-
-
Method Details
-
fromIdentifier
@Stability(Stable) @NotNull public static IClusterRef fromIdentifier(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String identifier) Creates a new IClusterRef from a identifier.- Parameters:
scope- This parameter is required.id- This parameter is required.identifier- 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.
-
getAttrCreationTime
The timestamp when the cluster was created, in ISO 8601 format. -
getAttrEncryptionDetails
The encryption configuration details for the cluster. -
getAttrIdentifier
The unique identifier assigned to the cluster upon creation. -
getAttrResourceArn
The Amazon Resource Name (ARN) of the cluster.Used for IAM permissions and resource identification.
-
getAttrStatus
The current status of the cluster. Possible values include: CREATING, ACTIVE, DELETING, FAILED.The cluster can have two additional status values when working with multi-Region clusters:
PENDING_SETUP—Indicates the cluster is being configuredPENDING_DELETE—Indicates the cluster is being deletedNote: These status values only appear for multi-Region cluster operations.
-
getAttrVpcEndpointServiceName
The VPC Endpoint Service name for the cluster.This can be used to create a VPC endpoint to connect to the cluster from within a VPC.
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getClusterRef
A reference to a Cluster resource.- Specified by:
getClusterRefin interfaceIClusterRef
-
getDeletionProtectionEnabled
Whether deletion protection is enabled on this cluster.Returns union: either
BooleanorIResolvable -
setDeletionProtectionEnabled
Whether deletion protection is enabled on this cluster. -
setDeletionProtectionEnabled
Whether deletion protection is enabled on this cluster. -
getKmsEncryptionKey
The KMS key that encrypts data on the cluster. -
setKmsEncryptionKey
The KMS key that encrypts data on the cluster. -
getMultiRegionProperties
Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.Returns union: either
IResolvableorCfnCluster.MultiRegionPropertiesProperty -
setMultiRegionProperties
Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings. -
setMultiRegionProperties
@Stability(Stable) public void setMultiRegionProperties(@Nullable CfnCluster.MultiRegionPropertiesProperty value) Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings. -
getTags
A map of key and value pairs this cluster is tagged with. -
setTags
A map of key and value pairs this cluster is tagged with.
-