# IDatabaseCluster

Create a clustered database with a given number of instances.

Extends: [IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResource.html), [IConnectable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IConnectable.html), [ISecretAttachmentTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecretAttachmentTarget.html), [IDBClusterRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_rds.IDBClusterRef.html)
Implemented by: [DatabaseCluster](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseCluster.html), [DatabaseClusterBase](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterBase.html), [DatabaseClusterFromSnapshot](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshot.html)
Obtainable from: [DatabaseCluster.fromDatabaseClusterAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseCluster.html#fromdatabaseclusterattributes), [DatabaseCluster.fromLookup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseCluster.html#fromlookup)
Used as argument in: [IClusterInstance.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.IClusterInstance.html#bind), [IEventApi.addRdsDataSource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.IEventApi.html#addrdsdatasource), IGraphqlApi.addRdsDataSourceV2, ProxyTarget.fromCluster

- Source: [`aws-rds/lib/cluster-ref.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-rds/lib/cluster-ref.ts#L13)
- Type last changed: v2.235.0 · 15 Jan 2026

## Properties

- `clusterArn`: string — The ARN of the database cluster.

- `clusterEndpoint`: [Endpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.Endpoint.html) — The endpoint to use for read/write operations.

- `clusterIdentifier`: string — Identifier of the cluster.

- `clusterReadEndpoint`: [Endpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.Endpoint.html) — Endpoint to use for load-balanced read-only operations.

- `clusterResourceIdentifier`: string — The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.

  This AWS Region-unique identifier is used in things like IAM authentication policies.

- `connections`: [Connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) — The network connections associated with this resource.

- `dbClusterRef`: [DBClusterReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_rds.DBClusterReference.html) — A reference to a DBCluster resource.

- `engine`: [IClusterEngine](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.IClusterEngine.html) — The engine of this Cluster.

  May be not known for imported Clusters if it wasn't provided explicitly.

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `instanceEndpoints`: [Endpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.Endpoint.html)[] — Endpoints which address each individual replica.

- `instanceIdentifiers`: string[] — Identifiers of the replicas.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxy` — Add a new db proxy to this cluster.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `asSecretAttachmentTarget(): SecretAttachmentTargetProps` — Renders the target specifications.

- `grantConnect(grantee: IGrantable, dbUser: string): Grant` — Grant the given identity connection access to the Cluster.

  **Parameters**

  - `grantee` — the Principal to grant the permissions to.
  - `dbUser` — the name of the database user to allow connecting.

- `grantDataApiAccess(grantee: IGrantable): Grant` — Grant the given identity to access to the Data API.

  **Parameters**

  - `grantee` — The principal to grant access to.

- `metric(metricName: string, props?: MetricOptions): Metric` — Return the given named metric for this DBCluster.

- `metricCPUUtilization(props?: MetricOptions): Metric` — The percentage of CPU utilization.

  Average over 5 minutes

- `metricDatabaseConnections(props?: MetricOptions): Metric` — The number of database connections in use.

  Average over 5 minutes

- `metricDeadlocks(props?: MetricOptions): Metric` — The average number of deadlocks in the database per second.

  Average over 5 minutes

- `metricEngineUptime(props?: MetricOptions): Metric` — The amount of time that the instance has been running, in seconds.

  Average over 5 minutes

- `metricFreeableMemory(props?: MetricOptions): Metric` — The amount of available random access memory, in bytes.

  Average over 5 minutes

- `metricFreeLocalStorage(props?: MetricOptions): Metric` — The amount of local storage available, in bytes.

  Average over 5 minutes

- `metricNetworkReceiveThroughput(props?: MetricOptions): Metric` — The amount of network throughput received from clients by each instance, in bytes per second.

  Average over 5 minutes

- `metricNetworkThroughput(props?: MetricOptions): Metric` — The amount of network throughput both received from and transmitted to clients by each instance, in bytes per second.

  Average over 5 minutes

- `metricNetworkTransmitThroughput(props?: MetricOptions): Metric` — The amount of network throughput sent to clients by each instance, in bytes per second.

  Average over 5 minutes

- `metricSnapshotStorageUsed(props?: MetricOptions): Metric` — The total amount of backup storage in bytes consumed by all Aurora snapshots outside its backup retention window.

  Average over 5 minutes

- `metricTotalBackupStorageBilled(props?: MetricOptions): Metric` — The total amount of backup storage in bytes for which you are billed.

  Average over 5 minutes

- `metricVolumeBytesUsed(props?: MetricOptions): Metric` — The amount of storage used by your Aurora DB instance, in bytes.

  Average over 5 minutes

- `metricVolumeReadIOPs(props?: MetricOptions): Metric` — The number of billed read I/O operations from a cluster volume, reported at 5-minute intervals.

  Average over 5 minutes

- `metricVolumeWriteIOPs(props?: MetricOptions): Metric` — The number of write disk I/O operations to the cluster volume, reported at 5-minute intervals.

  Average over 5 minutes

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
