Interface IDatabaseInstance
- All Superinterfaces:
IConnectable
,software.constructs.IConstruct
,software.constructs.IDependable
,IResource
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IDatabaseInstance.Jsii$Default
- All Known Implementing Classes:
DatabaseInstance
,DatabaseInstanceBase
,DatabaseInstanceFromSnapshot
,DatabaseInstanceReadReplica
,IDatabaseInstance.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:38.072Z")
@Stability(Stable)
public interface IDatabaseInstance
extends software.amazon.jsii.JsiiSerializable, IResource, IConnectable, ISecretAttachmentTarget
A database instance.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forIDatabaseInstance
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionaddProxy
(String id, DatabaseProxyOptions options) Add a new db proxy to this instance.The instance endpoint address.The instance endpoint port.default IInstanceEngine
The engine of this database Instance.The instance arn.The instance endpoint.The instance identifier.default String
The AWS Region-unique, immutable identifier for the DB instance.grantConnect
(IGrantable grantee) Grant the given identity connection access to the database.grantConnect
(IGrantable grantee, String dbUser) Grant the given identity connection access to the database.Return the given named metric for this DBInstance.metric
(String metricName, MetricOptions props) Return the given named metric for this DBInstance.The percentage of CPU utilization.The percentage of CPU utilization.The number of database connections in use.The number of database connections in use.The amount of available random access memory.The amount of available random access memory.The amount of available storage space.The amount of available storage space.The average number of disk write I/O operations per second.metricReadIOPS
(MetricOptions props) The average number of disk write I/O operations per second.The average number of disk read I/O operations per second.metricWriteIOPS
(MetricOptions props) The average number of disk read I/O operations per second.Defines a CloudWatch event rule which triggers for instance events.onEvent
(String id, OnEventOptions options) Defines a CloudWatch event rule which triggers for instance events.Methods inherited from interface software.amazon.awscdk.services.ec2.IConnectable
getConnections
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
asSecretAttachmentTarget
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDbInstanceEndpointAddress
The instance endpoint address. -
getDbInstanceEndpointPort
The instance endpoint port. -
getInstanceArn
The instance arn. -
getInstanceEndpoint
The instance endpoint. -
getInstanceIdentifier
The instance identifier. -
getEngine
The engine of this database Instance.May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
-
getInstanceResourceId
The AWS Region-unique, immutable identifier for the DB instance.This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.
- See Also:
-
addProxy
@Stability(Stable) @NotNull DatabaseProxy addProxy(@NotNull String id, @NotNull DatabaseProxyOptions options) Add a new db proxy to this instance.- Parameters:
id
- This parameter is required.options
- This parameter is required.
-
grantConnect
@Stability(Stable) @NotNull Grant grantConnect(@NotNull IGrantable grantee, @Nullable String dbUser) Grant the given identity connection access to the database.- Parameters:
grantee
- the Principal to grant the permissions to. This parameter is required.dbUser
- the name of the database user to allow connecting as to the db instance.
-
grantConnect
Grant the given identity connection access to the database.- Parameters:
grantee
- the Principal to grant the permissions to. This parameter is required.
-
metric
@Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this DBInstance.- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this DBInstance.- Parameters:
metricName
- This parameter is required.
-
metricCPUUtilization
The percentage of CPU utilization.Average over 5 minutes
- Parameters:
props
-
-
metricCPUUtilization
The percentage of CPU utilization.Average over 5 minutes
-
metricDatabaseConnections
The number of database connections in use.Average over 5 minutes
- Parameters:
props
-
-
metricDatabaseConnections
The number of database connections in use.Average over 5 minutes
-
metricFreeableMemory
The amount of available random access memory.Average over 5 minutes
- Parameters:
props
-
-
metricFreeableMemory
The amount of available random access memory.Average over 5 minutes
-
metricFreeStorageSpace
The amount of available storage space.Average over 5 minutes
- Parameters:
props
-
-
metricFreeStorageSpace
The amount of available storage space.Average over 5 minutes
-
metricReadIOPS
The average number of disk write I/O operations per second.Average over 5 minutes
- Parameters:
props
-
-
metricReadIOPS
The average number of disk write I/O operations per second.Average over 5 minutes
-
metricWriteIOPS
The average number of disk read I/O operations per second.Average over 5 minutes
- Parameters:
props
-
-
metricWriteIOPS
The average number of disk read I/O operations per second.Average over 5 minutes
-
onEvent
Defines a CloudWatch event rule which triggers for instance events.Use
rule.addEventPattern(pattern)
to specify a filter.- Parameters:
id
- This parameter is required.options
-
-
onEvent
Defines a CloudWatch event rule which triggers for instance events.Use
rule.addEventPattern(pattern)
to specify a filter.- Parameters:
id
- This parameter is required.
-