Class DatabaseInstanceBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.rds.DatabaseInstanceBase
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IConnectable
,IDatabaseInstance
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
- Direct Known Subclasses:
DatabaseInstance
,DatabaseInstanceFromSnapshot
,DatabaseInstanceReadReplica
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:49.121Z")
@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) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.constructs.Construct
software.constructs.Construct.Builder
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
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.core.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.grantConnect
(IGrantable grantee) 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.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
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.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.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
Grant the given identity connection access to the database.Note: this method does not currently work, see https://github.com/aws/aws-cdk/issues/11851 for details.
- Specified by:
grantConnect
in interfaceIDatabaseInstance
- Parameters:
grantee
- This parameter is required.- See Also:
-
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
-
getEnableIamAuthentication
-
setEnableIamAuthentication
-