Interface DatabaseClusterAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DatabaseClusterAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:37.994Z")
@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
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDatabaseClusterAttributes
static final class
An implementation forDatabaseClusterAttributes
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
Cluster endpoint address.Identifier for the cluster.default String
The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.default Boolean
Whether the Data API for the cluster is enabled.default IClusterEngine
The engine of the existing Cluster.Endpoint addresses of individual instances.Identifier for the instances.default Number
getPort()
The database port.default String
Reader endpoint address.default ISecret
The 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.Builder
ofDatabaseClusterAttributes
-