class DatabaseClusterBase
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.RDS.DatabaseClusterBase |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsrds#DatabaseClusterBase |
Java | software.amazon.awscdk.services.rds.DatabaseClusterBase |
Python | aws_cdk.aws_rds.DatabaseClusterBase |
TypeScript (source) | aws-cdk-lib » aws_rds » DatabaseClusterBase |
Implements
IConstruct
, IDependable
, IResource
, IDatabase
, IConnectable
, ISecret
Extends
Resource
Implemented by
Database
, Database
A new or imported clustered database.
Initializer
new DatabaseClusterBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
cluster | string | The ARN of the 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 | Access to the network connections. |
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. |
enable | boolean | |
engine? | ICluster | The engine of this Cluster. |
secret? | ISecret | The secret attached to this cluster. |
clusterArn
Type:
string
The ARN of the 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
Access to the network connections.
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.
enableDataApi?
Type:
boolean
(optional)
engine?
Type:
ICluster
(optional)
The engine of this Cluster.
May be not known for imported Clusters if it wasn't provided explicitly.
secret?
Type:
ISecret
(optional)
The secret attached to this cluster.
Methods
Name | Description |
---|---|
add | Add a new db proxy to this cluster. |
apply | Apply the given removal policy to this resource. |
as | Renders the secret attachment target specifications. |
grant | Grant the given identity connection access to the Cluster. |
grant | Grant the given identity to access 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. |
to | Returns a string representation of this construct. |
addProxy(id, options)
public addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxy
Parameters
- id
string
- options
Database
Proxy Options
Returns
Add a new db proxy to this cluster.
applyRemovalPolicy(policy)
public 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
).
asSecretAttachmentTarget()
public asSecretAttachmentTarget(): SecretAttachmentTargetProps
Returns
Renders the secret attachment target specifications.
grantConnect(grantee, dbUser)
public grantConnect(grantee: IGrantable, dbUser: string): Grant
Parameters
- grantee
IGrantable
- dbUser
string
Returns
Grant the given identity connection access to the Cluster.
grantDataApiAccess(grantee)
public grantDataApiAccess(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity to access 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.
metricCPUUtilization(props?)
public metricCPUUtilization(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The percentage of CPU utilization.
Average over 5 minutes
metricDatabaseConnections(props?)
public metricDatabaseConnections(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The number of database connections in use.
Average over 5 minutes
metricDeadlocks(props?)
public metricDeadlocks(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The average number of deadlocks in the database per second.
Average over 5 minutes
metricEngineUptime(props?)
public 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
metricFreeLocalStorage(props?)
public metricFreeLocalStorage(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of local storage available, in bytes.
Average over 5 minutes
metricFreeableMemory(props?)
public metricFreeableMemory(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
The amount of available random access memory, in bytes.
Average over 5 minutes
metricNetworkReceiveThroughput(props?)
public 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
metricNetworkThroughput(props?)
public 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
metricNetworkTransmitThroughput(props?)
public 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
metricSnapshotStorageUsed(props?)
public 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
metricTotalBackupStorageBilled(props?)
public 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
metricVolumeBytesUsed(props?)
public 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
metricVolumeReadIOPs(props?)
public 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
metricVolumeWriteIOPs(props?)
public 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
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.