aws-cdk-lib.aws_rds.IDatabaseCluster

interface IDatabaseCluster

LanguageType name
.NETAmazon.CDK.AWS.RDS.IDatabaseCluster
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsrds#IDatabaseCluster
Javasoftware.amazon.awscdk.services.rds.IDatabaseCluster
Pythonaws_cdk.aws_rds.IDatabaseCluster
TypeScript (source)aws-cdk-lib » aws_rds » IDatabaseCluster

Implemented by DatabaseCluster, DatabaseClusterFromSnapshot

Obtainable from DatabaseCluster.fromDatabaseClusterAttributes()

Create a clustered database with a given number of instances.

Properties

NameTypeDescription
clusterEndpointEndpointThe endpoint to use for read/write operations.
clusterIdentifierstringIdentifier of the cluster.
clusterReadEndpointEndpointEndpoint to use for load-balanced read-only operations.
clusterResourceIdentifierstringThe immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP.
connectionsConnectionsThe network connections associated with this resource.
envResourceEnvironmentThe environment this resource belongs to.
instanceEndpointsEndpoint[]Endpoints which address each individual replica.
instanceIdentifiersstring[]Identifiers of the replicas.
nodeNodeThe tree node.
stackStackThe stack in which this resource is defined.
engine?IClusterEngineThe engine of this Cluster.

clusterEndpoint

Type: Endpoint

The endpoint to use for read/write operations.


clusterIdentifier

Type: string

Identifier of the cluster.


clusterReadEndpoint

Type: Endpoint

Endpoint to use for load-balanced read-only operations.


clusterResourceIdentifier

Type: 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

Type: Connections

The network connections associated with this resource.


env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


instanceEndpoints

Type: Endpoint[]

Endpoints which address each individual replica.


instanceIdentifiers

Type: string[]

Identifiers of the replicas.


node

Type: Node

The tree node.


stack

Type: Stack

The stack in which this resource is defined.


engine?

Type: IClusterEngine (optional)

The engine of this Cluster.

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

Methods

NameDescription
addProxy(id, options)Add a new db proxy to this cluster.
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
asSecretAttachmentTarget()Renders the target specifications.
metric(metricName, props?)Return the given named metric for this DBCluster.
metricCPUUtilization(props?)The percentage of CPU utilization.
metricDatabaseConnections(props?)The number of database connections in use.
metricDeadlocks(props?)The average number of deadlocks in the database per second.
metricEngineUptime(props?)The amount of time that the instance has been running, in seconds.
metricFreeLocalStorage(props?)The amount of local storage available, in bytes.
metricFreeableMemory(props?)The amount of available random access memory, in bytes.
metricNetworkReceiveThroughput(props?)The amount of network throughput received from clients by each instance, in bytes per second.
metricNetworkThroughput(props?)The amount of network throughput both received from and transmitted to clients by each instance, in bytes per second.
metricNetworkTransmitThroughput(props?)The amount of network throughput sent to clients by each instance, in bytes per second.
metricSnapshotStorageUsed(props?)The total amount of backup storage in bytes consumed by all Aurora snapshots outside its backup retention window.
metricTotalBackupStorageBilled(props?)The total amount of backup storage in bytes for which you are billed.
metricVolumeBytesUsed(props?)The amount of storage used by your Aurora DB instance, in bytes.
metricVolumeReadIOPs(props?)The number of billed read I/O operations from a cluster volume, reported at 5-minute intervals.
metricVolumeWriteIOPs(props?)The number of write disk I/O operations to the cluster volume, reported at 5-minute intervals.

addProxy(id, options)

public addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxy

Parameters

  • id string
  • options DatabaseProxyOptions

Returns

  • DatabaseProxy

Add a new db proxy to this cluster.


applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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()

public asSecretAttachmentTarget(): SecretAttachmentTargetProps

Returns

  • SecretAttachmentTargetProps

Renders the target specifications.


metric(metricName, props?)

public metric(metricName: string, props?: MetricOptions): Metric

Parameters

  • metricName string
  • props MetricOptions

Returns

  • Metric

Return the given named metric for this DBCluster.


metricCPUUtilization(props?)

public metricCPUUtilization(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The percentage of CPU utilization.

Average over 5 minutes


metricDatabaseConnections(props?)

public metricDatabaseConnections(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The number of database connections in use.

Average over 5 minutes


metricDeadlocks(props?)

public metricDeadlocks(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The average number of deadlocks in the database per second.

Average over 5 minutes


metricEngineUptime(props?)

public metricEngineUptime(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of time that the instance has been running, in seconds.

Average over 5 minutes


metricFreeLocalStorage(props?)

public metricFreeLocalStorage(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of local storage available, in bytes.

Average over 5 minutes


metricFreeableMemory(props?)

public metricFreeableMemory(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of available random access memory, in bytes.

Average over 5 minutes


metricNetworkReceiveThroughput(props?)

public metricNetworkReceiveThroughput(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of network throughput received from clients by each instance, in bytes per second.

Average over 5 minutes


metricNetworkThroughput(props?)

public metricNetworkThroughput(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • 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?)

public metricNetworkTransmitThroughput(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of network throughput sent to clients by each instance, in bytes per second.

Average over 5 minutes


metricSnapshotStorageUsed(props?)

public metricSnapshotStorageUsed(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • 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?)

public metricTotalBackupStorageBilled(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The total amount of backup storage in bytes for which you are billed.

Average over 5 minutes


metricVolumeBytesUsed(props?)

public metricVolumeBytesUsed(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The amount of storage used by your Aurora DB instance, in bytes.

Average over 5 minutes


metricVolumeReadIOPs(props?)

public metricVolumeReadIOPs(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The number of billed read I/O operations from a cluster volume, reported at 5-minute intervals.

Average over 5 minutes


metricVolumeWriteIOPs(props?)

public metricVolumeWriteIOPs(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

The number of write disk I/O operations to the cluster volume, reported at 5-minute intervals.

Average over 5 minutes