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);
 
  • Method Details

    • getClusterIdentifier

      @Stability(Stable) @NotNull String getClusterIdentifier()
      Identifier for the cluster.
    • getClusterEndpointAddress

      @Stability(Stable) @Nullable default String getClusterEndpointAddress()
      Cluster endpoint address.

      Default: - no endpoint address

    • getClusterResourceIdentifier

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default Boolean getDataApiEnabled()
      Whether the Data API for the cluster is enabled.

      Default: false

    • getEngine

      @Stability(Stable) @Nullable default IClusterEngine getEngine()
      The engine of the existing Cluster.

      Default: - the imported Cluster's engine is unknown

    • getInstanceEndpointAddresses

      @Stability(Stable) @Nullable default List<String> getInstanceEndpointAddresses()
      Endpoint addresses of individual instances.

      Default: - no instance endpoints

    • getInstanceIdentifiers

      @Stability(Stable) @Nullable default List<String> getInstanceIdentifiers()
      Identifier for the instances.

      Default: - no instance identifiers

    • getPort

      @Stability(Stable) @Nullable default Number getPort()
      The database port.

      Default: - none

    • getReaderEndpointAddress

      @Stability(Stable) @Nullable default String getReaderEndpointAddress()
      Reader endpoint address.

      Default: - no reader address

    • getSecret

      @Stability(Stable) @Nullable default ISecret getSecret()
      The secret attached to the database cluster.

      Default: - the imported Cluster's secret is unknown

    • getSecurityGroups

      @Stability(Stable) @Nullable default List<ISecurityGroup> getSecurityGroups()
      The security groups of the database cluster.

      Default: - no security groups

    • builder

      @Stability(Stable) static DatabaseClusterAttributes.Builder builder()
      Returns:
      a DatabaseClusterAttributes.Builder of DatabaseClusterAttributes