public static interface IDatabaseInstance.Jsii$Default extends IDatabaseInstance, IResource.Jsii$Default, IConnectable.Jsii$Default, ISecretAttachmentTarget.Jsii$Default
IDatabaseInstance
.IDatabaseInstance.Jsii$Default, IDatabaseInstance.Jsii$Proxy
Modifier and Type | Method and Description |
---|---|
default DatabaseProxy |
addProxy(java.lang.String id,
DatabaseProxyOptions options)
Add a new db proxy to this instance.
|
default void |
applyRemovalPolicy(RemovalPolicy policy)
Apply the given removal policy to this resource.
|
default SecretAttachmentTargetProps |
asSecretAttachmentTarget()
Renders the target specifications.
|
default Connections |
getConnections()
The network connections associated with this resource.
|
default java.lang.String |
getDbInstanceEndpointAddress()
The instance endpoint address.
|
default java.lang.String |
getDbInstanceEndpointPort()
The instance endpoint port.
|
default IInstanceEngine |
getEngine()
The engine of this database Instance.
|
default ResourceEnvironment |
getEnv()
The environment this resource belongs to.
|
default java.lang.String |
getInstanceArn()
The instance arn.
|
default Endpoint |
getInstanceEndpoint()
The instance endpoint.
|
default java.lang.String |
getInstanceIdentifier()
The instance identifier.
|
default ConstructNode |
getNode()
The construct tree node for this construct.
|
default Stack |
getStack()
The stack in which this resource is defined.
|
default Grant |
grantConnect(IGrantable grantee)
Grant the given identity connection access to the database.
|
default Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this DBInstance.
|
default Metric |
metricCPUUtilization(MetricOptions props)
The percentage of CPU utilization.
|
default Metric |
metricDatabaseConnections(MetricOptions props)
The number of database connections in use.
|
default Metric |
metricFreeableMemory(MetricOptions props)
The amount of available random access memory.
|
default Metric |
metricFreeStorageSpace(MetricOptions props)
The amount of available storage space.
|
default Metric |
metricReadIOPS(MetricOptions props)
The average number of disk write I/O operations per second.
|
default Metric |
metricWriteIOPS(MetricOptions props)
The average number of disk read I/O operations per second.
|
default Rule |
onEvent(java.lang.String id,
OnEventOptions options)
Defines a CloudWatch event rule which triggers for instance events.
|
metric, metricCPUUtilization, metricDatabaseConnections, metricFreeableMemory, metricFreeStorageSpace, metricReadIOPS, metricWriteIOPS, onEvent
default ConstructNode getNode()
getNode
in interface IConstruct
getNode
in interface IConstruct.Jsii$Default
getNode
in interface IResource.Jsii$Default
default ResourceEnvironment getEnv()
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.
getEnv
in interface IResource
getEnv
in interface IResource.Jsii$Default
default Stack getStack()
getStack
in interface IResource
getStack
in interface IResource.Jsii$Default
default Connections getConnections()
getConnections
in interface IConnectable
getConnections
in interface IConnectable.Jsii$Default
default java.lang.String getDbInstanceEndpointAddress()
getDbInstanceEndpointAddress
in interface IDatabaseInstance
default java.lang.String getDbInstanceEndpointPort()
getDbInstanceEndpointPort
in interface IDatabaseInstance
default java.lang.String getInstanceArn()
getInstanceArn
in interface IDatabaseInstance
default Endpoint getInstanceEndpoint()
getInstanceEndpoint
in interface IDatabaseInstance
default java.lang.String getInstanceIdentifier()
getInstanceIdentifier
in interface IDatabaseInstance
default IInstanceEngine getEngine()
May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
getEngine
in interface IDatabaseInstance
default void applyRemovalPolicy(RemovalPolicy policy)
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
).
applyRemovalPolicy
in interface IResource
applyRemovalPolicy
in interface IResource.Jsii$Default
policy
- This parameter is required.default SecretAttachmentTargetProps asSecretAttachmentTarget()
asSecretAttachmentTarget
in interface ISecretAttachmentTarget
asSecretAttachmentTarget
in interface ISecretAttachmentTarget.Jsii$Default
default DatabaseProxy addProxy(java.lang.String id, DatabaseProxyOptions options)
addProxy
in interface IDatabaseInstance
id
- This parameter is required.options
- This parameter is required.default Grant grantConnect(IGrantable grantee)
Note: this method does not currently work, see https://github.com/aws/aws-cdk/issues/11851 for details.
grantConnect
in interface IDatabaseInstance
grantee
- This parameter is required.default Metric metric(java.lang.String metricName, MetricOptions props)
metric
in interface IDatabaseInstance
metricName
- This parameter is required.props
- default Metric metricCPUUtilization(MetricOptions props)
Average over 5 minutes
metricCPUUtilization
in interface IDatabaseInstance
props
- default Metric metricDatabaseConnections(MetricOptions props)
Average over 5 minutes
metricDatabaseConnections
in interface IDatabaseInstance
props
- default Metric metricFreeableMemory(MetricOptions props)
Average over 5 minutes
metricFreeableMemory
in interface IDatabaseInstance
props
- default Metric metricFreeStorageSpace(MetricOptions props)
Average over 5 minutes
metricFreeStorageSpace
in interface IDatabaseInstance
props
- default Metric metricReadIOPS(MetricOptions props)
Average over 5 minutes
metricReadIOPS
in interface IDatabaseInstance
props
- default Metric metricWriteIOPS(MetricOptions props)
Average over 5 minutes
metricWriteIOPS
in interface IDatabaseInstance
props
- default Rule onEvent(java.lang.String id, OnEventOptions options)
Use
rule.addEventPattern(pattern)
to specify a filter.
onEvent
in interface IDatabaseInstance
id
- This parameter is required.options
-