Interface DatabaseClusterAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseClusterAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:12.600Z")
@Stability(Stable)
public interface DatabaseClusterAttributes
extends software.amazon.jsii.JsiiSerializable
Properties that describe an existing cluster instance.
Example:
Vpc vpc;
Function fn;
Secret secret;
// Create a serverless V1 cluster
ServerlessCluster serverlessV1Cluster = ServerlessCluster.Builder.create(this, "AnotherCluster")
.engine(DatabaseClusterEngine.AURORA_MYSQL)
.vpc(vpc) // this parameter is optional for serverless Clusters
.enableDataApi(true)
.build();
serverlessV1Cluster.grantDataApiAccess(fn);
// Create an Aurora cluster
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Cluster")
.engine(DatabaseClusterEngine.AURORA_MYSQL)
.vpc(vpc)
.enableDataApi(true)
.build();
cluster.grantDataApiAccess(fn);
// Import an Aurora cluster
IDatabaseCluster importedCluster = DatabaseCluster.fromDatabaseClusterAttributes(this, "ImportedCluster", DatabaseClusterAttributes.builder()
.clusterIdentifier("clusterIdentifier")
.secret(secret)
.dataApiEnabled(true)
.build());
importedCluster.grantDataApiAccess(fn);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDatabaseClusterAttributesstatic final classAn implementation forDatabaseClusterAttributes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringCluster endpoint address.Identifier for the cluster.default StringThe immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.default BooleanWhether the Data API for the cluster is enabled.default IClusterEngineThe engine of the existing Cluster.Endpoint addresses of individual instances.Identifier for the instances.default NumbergetPort()The database port.default StringReader endpoint address.default ISecretThe secret attached to the database cluster.default List<ISecurityGroup> The security groups of the database cluster.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getClusterIdentifier
Identifier for the cluster. -
getClusterEndpointAddress
Cluster endpoint address.Default: - no endpoint address
-
getClusterResourceIdentifier
The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.This AWS Region-unique identifier is used to grant access to the cluster.
Default: none
-
getDataApiEnabled
Whether the Data API for the cluster is enabled.Default: false
-
getEngine
The engine of the existing Cluster.Default: - the imported Cluster's engine is unknown
-
getInstanceEndpointAddresses
Endpoint addresses of individual instances.Default: - no instance endpoints
-
getInstanceIdentifiers
Identifier for the instances.Default: - no instance identifiers
-
getPort
The database port.Default: - none
-
getReaderEndpointAddress
Reader endpoint address.Default: - no reader address
-
getSecret
The secret attached to the database cluster.Default: - the imported Cluster's secret is unknown
-
getSecurityGroups
The security groups of the database cluster.Default: - no security groups
-
builder
- Returns:
- a
DatabaseClusterAttributes.BuilderofDatabaseClusterAttributes
-