Interface IDatabaseInstance
A database instance.
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public interface IDatabaseInstance : IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Syntax (vb)
Public Interface IDatabaseInstance
Inherits IResource, IConstruct, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Synopsis
Properties
DbInstanceEndpointAddress | The instance endpoint address. |
DbInstanceEndpointPort | The instance endpoint port. |
Engine | The engine of this database Instance. |
InstanceArn | The instance arn. |
InstanceEndpoint | The instance endpoint. |
InstanceIdentifier | The instance identifier. |
Methods
AddProxy(String, IDatabaseProxyOptions) | Add a new db proxy to this instance. |
GrantConnect(IGrantable) | Grant the given identity connection access to the database. |
Metric(String, IMetricOptions) | Return the given named metric for this DBInstance. |
MetricCPUUtilization(IMetricOptions) | The percentage of CPU utilization. |
MetricDatabaseConnections(IMetricOptions) | The number of database connections in use. |
MetricFreeableMemory(IMetricOptions) | The amount of available random access memory. |
MetricFreeStorageSpace(IMetricOptions) | The amount of available storage space. |
MetricReadIOPS(IMetricOptions) | The average number of disk write I/O operations per second. |
MetricWriteIOPS(IMetricOptions) | The average number of disk read I/O operations per second. |
OnEvent(String, IOnEventOptions) | Defines a CloudWatch event rule which triggers for instance events. |
Properties
DbInstanceEndpointAddress
The instance endpoint address.
string DbInstanceEndpointAddress { get; }
Property Value
System.String
Remarks
Attribute: EndpointAddress
DbInstanceEndpointPort
The instance endpoint port.
string DbInstanceEndpointPort { get; }
Property Value
System.String
Remarks
Attribute: EndpointPort
Engine
The engine of this database Instance.
virtual IInstanceEngine Engine { get; }
Property Value
Remarks
May be not known for imported Instances if it wasn't provided explicitly, or for read replicas.
InstanceArn
The instance arn.
string InstanceArn { get; }
Property Value
System.String
InstanceEndpoint
InstanceIdentifier
The instance identifier.
string InstanceIdentifier { get; }
Property Value
System.String
Methods
AddProxy(String, IDatabaseProxyOptions)
Add a new db proxy to this instance.
DatabaseProxy AddProxy(string id, IDatabaseProxyOptions options)
Parameters
- id System.String
- options IDatabaseProxyOptions
Returns
GrantConnect(IGrantable)
Grant the given identity connection access to the database.
Grant GrantConnect(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
Remarks
Note: this method does not currently work, see https://github.com/aws/aws-cdk/issues/11851 for details.
Metric(String, IMetricOptions)
Return the given named metric for this DBInstance.
Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
MetricCPUUtilization(IMetricOptions)
The percentage of CPU utilization.
Metric MetricCPUUtilization(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
MetricDatabaseConnections(IMetricOptions)
The number of database connections in use.
Metric MetricDatabaseConnections(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
MetricFreeableMemory(IMetricOptions)
The amount of available random access memory.
Metric MetricFreeableMemory(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
MetricFreeStorageSpace(IMetricOptions)
The amount of available storage space.
Metric MetricFreeStorageSpace(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
MetricReadIOPS(IMetricOptions)
The average number of disk write I/O operations per second.
Metric MetricReadIOPS(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
MetricWriteIOPS(IMetricOptions)
The average number of disk read I/O operations per second.
Metric MetricWriteIOPS(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Average over 5 minutes
OnEvent(String, IOnEventOptions)
Defines a CloudWatch event rule which triggers for instance events.
Rule OnEvent(string id, IOnEventOptions options = null)
Parameters
- id System.String
- options IOnEventOptions
Returns
Remarks
Use
rule.addEventPattern(pattern)
to specify a filter.