interface IDatabaseCluster
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.RDS.IDatabaseCluster |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsrds#IDatabaseCluster |
Java | software.amazon.awscdk.services.rds.IDatabaseCluster |
Python | aws_cdk.aws_rds.IDatabaseCluster |
TypeScript (source) | aws-cdk-lib » aws_rds » IDatabaseCluster |
Implemented by
Database
, Database
Obtainable from
Database
.fromDatabaseClusterAttributes()
Create a clustered database with a given number of instances.
Properties
Name | Type | Description |
---|---|---|
cluster | string | The ARN of the database cluster. |
cluster | Endpoint | The endpoint to use for read/write operations. |
cluster | string | Identifier of the cluster. |
cluster | Endpoint | Endpoint to use for load-balanced read-only operations. |
cluster | string | The immutable identifier for the cluster; for example: cluster-ABCD1234EFGH5678IJKL90MNOP. |
connections | Connections | The network connections associated with this resource. |
env | Resource | The environment this resource belongs to. |
instance | Endpoint [] | Endpoints which address each individual replica. |
instance | string[] | Identifiers of the replicas. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
engine? | ICluster | The engine of this Cluster. |
clusterArn
Type:
string
The ARN of the database 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:
Resource
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:
ICluster
(optional)
The engine of this Cluster.
May be not known for imported Clusters if it wasn't provided explicitly.
Methods
Name | Description |
---|---|
add | Add a new db proxy to this cluster. |
apply | Apply the given removal policy to this resource. |
as | Renders the target specifications. |
grant | Grant the given identity connection access to the Cluster. |
grant | Grant the given identity to access to the Data API. |
metric(metricName, props?) | Return the given named metric for this DBCluster. |
metric | The percentage of CPU utilization. |
metric | The number of database connections in use. |
metric | The average number of deadlocks in the database per second. |
metric | The amount of time that the instance has been running, in seconds. |
metric | The amount of local storage available, in bytes. |
metric | The amount of available random access memory, in bytes. |
metric | The amount of network throughput received from clients by each instance, in bytes per second. |
metric | The amount of network throughput both received from and transmitted to clients by each instance, in bytes per second. |
metric | The amount of network throughput sent to clients by each instance, in bytes per second. |
metric | The total amount of backup storage in bytes consumed by all Aurora snapshots outside its backup retention window. |
metric | The total amount of backup storage in bytes for which you are billed. |
metric | The amount of storage used by your Aurora DB instance, in bytes. |
metric | The number of billed read I/O operations from a cluster volume, reported at 5-minute intervals. |
metric | The number of write disk I/O operations to the cluster volume, reported at 5-minute intervals. |
Proxy(id, options)
addpublic addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxy
Parameters
- id
string
- options
Database
Proxy Options
Returns
Add a new db proxy to this cluster.
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
).
SecretAttachmentTarget()
aspublic asSecretAttachmentTarget(): SecretAttachmentTargetProps
Returns
Renders the target specifications.
Connect(grantee, dbUser)
grantpublic grantConnect(grantee: IGrantable, dbUser: string): Grant
Parameters
- grantee
IGrantable
— the Principal to grant the permissions to. - dbUser
string
— the name of the database user to allow connecting.
Returns
Grant the given identity connection access to the Cluster.
DataApiAccess(grantee)
grantpublic grantDataApiAccess(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal to grant access to.
Returns
Grant the given identity to access to the Data API.
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string
- props
Metric
Options
Returns
Return the given named metric for this DBCluster.
CPUUtilization(props?)
metricpublic metricCPUUtilization(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The percentage of CPU utilization.
Average over 5 minutes
DatabaseConnections(props?)
metricpublic metricDatabaseConnections(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The number of database connections in use.
Average over 5 minutes
Deadlocks(props?)
metricpublic metricDeadlocks(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The average number of deadlocks in the database per second.
Average over 5 minutes
EngineUptime(props?)
metricpublic metricEngineUptime(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of time that the instance has been running, in seconds.
Average over 5 minutes
FreeLocalStorage(props?)
metricpublic metricFreeLocalStorage(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of local storage available, in bytes.
Average over 5 minutes
FreeableMemory(props?)
metricpublic metricFreeableMemory(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of available random access memory, in bytes.
Average over 5 minutes
NetworkReceiveThroughput(props?)
metricpublic metricNetworkReceiveThroughput(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of network throughput received from clients by each instance, in bytes per second.
Average over 5 minutes
NetworkThroughput(props?)
metricpublic metricNetworkThroughput(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of network throughput both received from and transmitted to clients by each instance, in bytes per second.
Average over 5 minutes
NetworkTransmitThroughput(props?)
metricpublic metricNetworkTransmitThroughput(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of network throughput sent to clients by each instance, in bytes per second.
Average over 5 minutes
SnapshotStorageUsed(props?)
metricpublic metricSnapshotStorageUsed(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The total amount of backup storage in bytes consumed by all Aurora snapshots outside its backup retention window.
Average over 5 minutes
TotalBackupStorageBilled(props?)
metricpublic metricTotalBackupStorageBilled(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The total amount of backup storage in bytes for which you are billed.
Average over 5 minutes
VolumeBytesUsed(props?)
metricpublic metricVolumeBytesUsed(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of storage used by your Aurora DB instance, in bytes.
Average over 5 minutes
VolumeReadIOPs(props?)
metricpublic metricVolumeReadIOPs(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The number of billed read I/O operations from a cluster volume, reported at 5-minute intervals.
Average over 5 minutes
VolumeWriteIOPs(props?)
metricpublic metricVolumeWriteIOPs(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The number of write disk I/O operations to the cluster volume, reported at 5-minute intervals.
Average over 5 minutes