Class DatabaseInstanceBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.rds.DatabaseInstanceBase
- All Implemented Interfaces:
IResource
,IConnectable
,IDatabaseInstance
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
DatabaseInstance
,DatabaseInstanceFromSnapshot
,DatabaseInstanceReadReplica
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-05T03:43:50.038Z")
@Stability(Stable)
public abstract class DatabaseInstanceBase
extends Resource
implements IDatabaseInstance
A new or imported database instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; import software.amazon.awscdk.services.rds.*; IInstanceEngine instanceEngine; SecurityGroup securityGroup; IDatabaseInstance databaseInstanceBase = DatabaseInstanceBase.fromDatabaseInstanceAttributes(this, "MyDatabaseInstanceBase", DatabaseInstanceAttributes.builder() .instanceEndpointAddress("instanceEndpointAddress") .instanceIdentifier("instanceIdentifier") .port(123) .securityGroups(List.of(securityGroup)) // the properties below are optional .engine(instanceEngine) .instanceResourceId("instanceResourceId") .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IDatabaseInstance
IDatabaseInstance.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
DatabaseInstanceBase
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
DatabaseInstanceBase
(software.amazon.jsii.JsiiObjectRef objRef) protected
DatabaseInstanceBase
(software.constructs.Construct scope, String id) protected
DatabaseInstanceBase
(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddProxy
(String id, DatabaseProxyOptions options) Add a new db proxy to this instance.Renders the secret attachment target specifications.static IDatabaseInstance
fromDatabaseInstanceAttributes
(software.constructs.Construct scope, String id, DatabaseInstanceAttributes attrs) Import an existing database instance.abstract Connections
Access to network connections.abstract String
The instance endpoint address.abstract String
The instance endpoint port.protected abstract Boolean
abstract IInstanceEngine
The engine of this database Instance.The instance arn.abstract Endpoint
The instance endpoint.abstract String
The instance identifier.abstract 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.protected abstract void
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DatabaseInstanceBase
protected DatabaseInstanceBase(software.amazon.jsii.JsiiObjectRef objRef) -
DatabaseInstanceBase
protected DatabaseInstanceBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
DatabaseInstanceBase
@Stability(Stable) protected DatabaseInstanceBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
DatabaseInstanceBase
@Stability(Stable) protected DatabaseInstanceBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromDatabaseInstanceAttributes
@Stability(Stable) @NotNull public static IDatabaseInstance fromDatabaseInstanceAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseInstanceAttributes attrs) Import an existing database instance.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
addProxy
@Stability(Stable) @NotNull public DatabaseProxy addProxy(@NotNull String id, @NotNull DatabaseProxyOptions options) Add a new db proxy to this instance.- Specified by:
addProxy
in interfaceIDatabaseInstance
- Parameters:
id
- This parameter is required.options
- This parameter is required.
-
asSecretAttachmentTarget
Renders the secret attachment target specifications.- Specified by:
asSecretAttachmentTarget
in interfaceISecretAttachmentTarget
-
grantConnect
@Stability(Stable) @NotNull public Grant grantConnect(@NotNull IGrantable grantee, @Nullable String dbUser) Grant the given identity connection access to the database.- Specified by:
grantConnect
in interfaceIDatabaseInstance
- Parameters:
grantee
- This parameter is required.dbUser
-
-
grantConnect
Grant the given identity connection access to the database.- Specified by:
grantConnect
in interfaceIDatabaseInstance
- Parameters:
grantee
- This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this DBInstance.- Specified by:
metric
in interfaceIDatabaseInstance
- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this DBInstance.- Specified by:
metric
in interfaceIDatabaseInstance
- Parameters:
metricName
- This parameter is required.
-
metricCPUUtilization
The percentage of CPU utilization.Average over 5 minutes
- Specified by:
metricCPUUtilization
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricCPUUtilization
The percentage of CPU utilization.Average over 5 minutes
- Specified by:
metricCPUUtilization
in interfaceIDatabaseInstance
-
metricDatabaseConnections
The number of database connections in use.Average over 5 minutes
- Specified by:
metricDatabaseConnections
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricDatabaseConnections
The number of database connections in use.Average over 5 minutes
- Specified by:
metricDatabaseConnections
in interfaceIDatabaseInstance
-
metricFreeableMemory
The amount of available random access memory.Average over 5 minutes
- Specified by:
metricFreeableMemory
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricFreeableMemory
The amount of available random access memory.Average over 5 minutes
- Specified by:
metricFreeableMemory
in interfaceIDatabaseInstance
-
metricFreeStorageSpace
The amount of available storage space.Average over 5 minutes
- Specified by:
metricFreeStorageSpace
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricFreeStorageSpace
The amount of available storage space.Average over 5 minutes
- Specified by:
metricFreeStorageSpace
in interfaceIDatabaseInstance
-
metricReadIOPS
The average number of disk write I/O operations per second.Average over 5 minutes
- Specified by:
metricReadIOPS
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricReadIOPS
The average number of disk write I/O operations per second.Average over 5 minutes
- Specified by:
metricReadIOPS
in interfaceIDatabaseInstance
-
metricWriteIOPS
The average number of disk read I/O operations per second.Average over 5 minutes
- Specified by:
metricWriteIOPS
in interfaceIDatabaseInstance
- Parameters:
props
-
-
metricWriteIOPS
The average number of disk read I/O operations per second.Average over 5 minutes
- Specified by:
metricWriteIOPS
in interfaceIDatabaseInstance
-
onEvent
@Stability(Stable) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) Defines a CloudWatch event rule which triggers for instance events.Use
rule.addEventPattern(pattern)
to specify a filter.- Specified by:
onEvent
in interfaceIDatabaseInstance
- 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.- Specified by:
onEvent
in interfaceIDatabaseInstance
- Parameters:
id
- This parameter is required.
-
getConnections
Access to network connections.- Specified by:
getConnections
in interfaceIConnectable
-
getDbInstanceEndpointAddress
The instance endpoint address.- Specified by:
getDbInstanceEndpointAddress
in interfaceIDatabaseInstance
-
getDbInstanceEndpointPort
The instance endpoint port.- Specified by:
getDbInstanceEndpointPort
in interfaceIDatabaseInstance
-
getInstanceArn
The instance arn.- Specified by:
getInstanceArn
in interfaceIDatabaseInstance
-
getInstanceEndpoint
The instance endpoint.- Specified by:
getInstanceEndpoint
in interfaceIDatabaseInstance
-
getInstanceIdentifier
The instance identifier.- Specified by:
getInstanceIdentifier
in interfaceIDatabaseInstance
-
getEngine
The engine of this database Instance.May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
- Specified by:
getEngine
in interfaceIDatabaseInstance
-
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.
- Specified by:
getInstanceResourceId
in interfaceIDatabaseInstance
- See Also:
-
getEnableIamAuthentication
-
setEnableIamAuthentication
-