Class CfnCluster
- All Implemented Interfaces:
IInspectable
,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.witnessRegion
cannot 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 class
A fluent builder forCfnCluster
.static interface
Configuration details about encryption for the cluster including the AWS KMS key ARN, encryption type, and encryption status.static interface
Defines 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.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnCluster
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnCluster
(software.amazon.jsii.JsiiObjectRef objRef) CfnCluster
(software.constructs.Construct scope, String id) CfnCluster
(software.constructs.Construct scope, String id, CfnClusterProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe 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.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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
Whether deletion protection is enabled on this cluster.void
Whether deletion protection is enabled on this cluster.void
setKmsEncryptionKey
(String value) The KMS key that encrypts data on the cluster.void
Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.void
Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings.void
A 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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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) - 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) - 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in 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:
getCdkTagManager
in interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getDeletionProtectionEnabled
Whether deletion protection is enabled on this cluster. -
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. -
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.
-