DatabaseInstanceReadReplica

class aws_cdk.aws_rds.DatabaseInstanceReadReplica(scope, id, *, instance_type, source_database_instance, storage_encrypted=None, storage_encryption_key=None, vpc, auto_minor_version_upgrade=None, availability_zone=None, backup_retention=None, cloudwatch_logs_exports=None, cloudwatch_logs_retention=None, cloudwatch_logs_retention_role=None, copy_tags_to_snapshot=None, delete_automated_backups=None, deletion_protection=None, domain=None, domain_role=None, enable_performance_insights=None, iam_authentication=None, instance_identifier=None, iops=None, max_allocated_storage=None, monitoring_interval=None, monitoring_role=None, multi_az=None, option_group=None, performance_insight_encryption_key=None, performance_insight_retention=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, processor_features=None, removal_policy=None, s3_export_buckets=None, s3_export_role=None, s3_import_buckets=None, s3_import_role=None, security_groups=None, storage_type=None, subnet_group=None, vpc_placement=None, vpc_subnets=None)

Bases: aws_cdk.aws_rds.DatabaseInstanceBase

A read replica database instance.

Resource

AWS::RDS::DBInstance

Parameters
  • scope (Construct) –

  • id (str) –

  • instance_type (InstanceType) – The name of the compute and memory capacity classes.

  • source_database_instance (IDatabaseInstance) – The source database instance. Each DB instance can have a limited number of read replicas. For more information, see https://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/USER_ReadRepl.html.

  • storage_encrypted (Optional[bool]) – Indicates whether the DB instance is encrypted. Default: - true if storageEncryptionKey has been provided, false otherwise

  • storage_encryption_key (Optional[IKey]) – The KMS key that’s used to encrypt the DB instance. Default: - default master key if storageEncrypted is true, no key otherwise

  • vpc (IVpc) – The VPC network where the DB subnet group should be created.

  • auto_minor_version_upgrade (Optional[bool]) – Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. Default: true

  • availability_zone (Optional[str]) – The name of the Availability Zone where the DB instance will be located. Default: - no preference

  • backup_retention (Optional[Duration]) – The number of days during which automatic DB snapshots are retained. Set to zero to disable backups. When creating a read replica, you must enable automatic backups on the source database instance by setting the backup retention to a value other than zero. Default: Duration.days(1)

  • cloudwatch_logs_exports (Optional[List[str]]) – The list of log types that need to be enabled for exporting to CloudWatch Logs. Default: - no log exports

  • cloudwatch_logs_retention (Optional[RetentionDays]) – The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to Infinity. Default: - logs never expire

  • cloudwatch_logs_retention_role (Optional[IRole]) – The IAM role for the Lambda function associated with the custom resource that sets the retention policy. Default: - a new role is created.

  • copy_tags_to_snapshot (Optional[bool]) – Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. Default: true

  • delete_automated_backups (Optional[bool]) – Indicates whether automated backups should be deleted or retained when you delete a DB instance. Default: false

  • deletion_protection (Optional[bool]) – Indicates whether the DB instance should have deletion protection enabled. Default: - true if removalPolicy is RETAIN, false otherwise

  • domain (Optional[str]) – The Active Directory directory ID to create the DB instance in. Default: - Do not join domain

  • domain_role (Optional[IRole]) – The IAM role to be used when making API calls to the Directory Service. The role needs the AWS-managed policy AmazonRDSDirectoryServiceAccess or equivalent. Default: - The role will be created for you if {@link DatabaseInstanceNewProps#domain} is specified

  • enable_performance_insights (Optional[bool]) – Whether to enable Performance Insights for the DB instance. Default: - false, unless performanceInsightRentention or performanceInsightEncryptionKey is set.

  • iam_authentication (Optional[bool]) – Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. Default: false

  • instance_identifier (Optional[str]) – A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase. Default: - a CloudFormation generated name

  • iops (Union[int, float, None]) – The number of I/O operations per second (IOPS) that the database provisions. The value must be equal to or greater than 1000. Default: - no provisioned iops

  • max_allocated_storage (Union[int, float, None]) – Upper limit to which RDS can scale the storage in GiB(Gibibyte). Default: - No autoscaling of RDS instance

  • monitoring_interval (Optional[Duration]) – The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance. Default: - no enhanced monitoring

  • monitoring_role (Optional[IRole]) – Role that will be used to manage DB instance monitoring. Default: - A role is automatically created for you

  • multi_az (Optional[bool]) – Specifies if the database instance is a multiple Availability Zone deployment. Default: false

  • option_group (Optional[IOptionGroup]) – The option group to associate with the instance. Default: - no option group

  • performance_insight_encryption_key (Optional[IKey]) – The AWS KMS key for encryption of Performance Insights data. Default: - default master key

  • performance_insight_retention (Optional[PerformanceInsightRetention]) – The amount of time, in days, to retain Performance Insights data. Default: 7

  • port (Union[int, float, None]) – The port for the instance. Default: - the default port for the chosen engine.

  • preferred_backup_window (Optional[str]) – The daily time range during which automated backups are performed. Constraints: - Must be in the format hh24:mi-hh24:mi. - Must be in Universal Coordinated Time (UTC). - Must not conflict with the preferred maintenance window. - Must be at least 30 minutes. Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

  • preferred_maintenance_window (Optional[str]) – The weekly time range (in UTC) during which system maintenance can occur. Format: ddd:hh24:mi-ddd:hh24:mi Constraint: Minimum 30-minute window Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

  • processor_features (Optional[ProcessorFeatures]) – The number of CPU cores and the number of threads per core. Default: - the default number of CPU cores and threads per core for the chosen instance class. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor

  • removal_policy (Optional[RemovalPolicy]) – The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. Default: - RemovalPolicy.SNAPSHOT (remove the resource, but retain a snapshot of the data)

  • s3_export_buckets (Optional[List[IBucket]]) – S3 buckets that you want to load data into. This feature is only supported by the Microsoft SQL Server and Oracle engines. This property must not be used if s3ExportRole is used. For Microsoft SQL Server: Default: - None

  • s3_export_role (Optional[IRole]) – Role that will be associated with this DB instance to enable S3 export. This feature is only supported by the Microsoft SQL Server and Oracle engines. This property must not be used if s3ExportBuckets is used. For Microsoft SQL Server: Default: - New role is created if s3ExportBuckets is set, no role is defined otherwise

  • s3_import_buckets (Optional[List[IBucket]]) – S3 buckets that you want to load data from. This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines. This property must not be used if s3ImportRole is used. For Microsoft SQL Server: Default: - None

  • s3_import_role (Optional[IRole]) – Role that will be associated with this DB instance to enable S3 import. This feature is only supported by the Microsoft SQL Server, Oracle, and PostgreSQL engines. This property must not be used if s3ImportBuckets is used. For Microsoft SQL Server: Default: - New role is created if s3ImportBuckets is set, no role is defined otherwise

  • security_groups (Optional[List[ISecurityGroup]]) – The security groups to assign to the DB instance. Default: - a new security group is created

  • storage_type (Optional[StorageType]) – The storage type. Default: GP2

  • subnet_group (Optional[ISubnetGroup]) – Existing subnet group for the instance. Default: - a new subnet group will be created.

  • vpc_placement (Optional[SubnetSelection]) – (deprecated) The type of subnets to add to the created DB subnet group. Default: - private subnets

  • vpc_subnets (Optional[SubnetSelection]) – The type of subnets to add to the created DB subnet group. Default: - private subnets

Methods

add_proxy(id, *, secrets, vpc, borrow_timeout=None, db_proxy_name=None, debug_logging=None, iam_auth=None, idle_client_timeout=None, init_query=None, max_connections_percent=None, max_idle_connections_percent=None, require_tls=None, role=None, security_groups=None, session_pinning_filters=None, vpc_subnets=None)

Add a new db proxy to this instance.

Parameters
  • id (str) –

  • secrets (List[ISecret]) – The secret that the proxy uses to authenticate to the RDS DB instance or Aurora DB cluster. These secrets are stored within Amazon Secrets Manager. One or more secrets are required.

  • vpc (IVpc) – The VPC to associate with the new proxy.

  • borrow_timeout (Optional[Duration]) – The duration for a proxy to wait for a connection to become available in the connection pool. Only applies when the proxy has opened its maximum number of connections and all connections are busy with client sessions. Value must be between 1 second and 1 hour, or Duration.seconds(0) to represent unlimited. Default: cdk.Duration.seconds(120)

  • db_proxy_name (Optional[str]) – The identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can’t end with a hyphen or contain two consecutive hyphens. Default: - Generated by CloudFormation (recommended)

  • debug_logging (Optional[bool]) – Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs. Default: false

  • iam_auth (Optional[bool]) – Whether to require or disallow AWS Identity and Access Management (IAM) authentication for connections to the proxy. Default: false

  • idle_client_timeout (Optional[Duration]) – The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. Default: cdk.Duration.minutes(30)

  • init_query (Optional[str]) – One or more SQL statements for the proxy to run when opening each new database connection. Typically used with SET statements to make sure that each connection has identical settings such as time zone and character set. For multiple statements, use semicolons as the separator. You can also include multiple variables in a single SET statement, such as SET x=1, y=2. not currently supported for PostgreSQL. Default: - no initialization query

  • max_connections_percent (Union[int, float, None]) – The maximum size of the connection pool for each target in a target group. For Aurora MySQL, it is expressed as a percentage of the max_connections setting for the RDS DB instance or Aurora DB cluster used by the target group. 1-100 Default: 100

  • max_idle_connections_percent (Union[int, float, None]) – Controls how actively the proxy closes idle database connections in the connection pool. A high value enables the proxy to leave a high percentage of idle connections open. A low value causes the proxy to close idle client connections and return the underlying database connections to the connection pool. For Aurora MySQL, it is expressed as a percentage of the max_connections setting for the RDS DB instance or Aurora DB cluster used by the target group. between 0 and MaxConnectionsPercent Default: 50

  • require_tls (Optional[bool]) – A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy. Default: true

  • role (Optional[IRole]) – IAM role that the proxy uses to access secrets in AWS Secrets Manager. Default: - A role will automatically be created

  • security_groups (Optional[List[ISecurityGroup]]) – One or more VPC security groups to associate with the new proxy. Default: - No security groups

  • session_pinning_filters (Optional[List[SessionPinningFilter]]) – Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection. Including an item in the list exempts that class of SQL operations from the pinning behavior. Default: - no session pinning filters

  • vpc_subnets (Optional[SubnetSelection]) – The subnets used by the proxy. Default: - the VPC default strategy if not specified.

Return type

DatabaseProxy

as_secret_attachment_target()

Renders the secret attachment target specifications.

Return type

SecretAttachmentTargetProps

grant_connect(grantee)

Grant the given identity connection access to the database.

Parameters

grantee (IGrantable) –

Return type

Grant

metric(metric_name, *, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

Return the given named metric for this DBInstance.

Parameters
  • metric_name (str) –

  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_cpu_utilization(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The percentage of CPU utilization.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_database_connections(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The number of database connections in use.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_free_storage_space(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The amount of available storage space.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_freeable_memory(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The amount of available random access memory.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_read_iops(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The average number of disk write I/O operations per second.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

metric_write_iops(*, account=None, color=None, dimensions=None, label=None, period=None, region=None, statistic=None, unit=None)

The average number of disk read I/O operations per second.

Average over 5 minutes

Parameters
  • account (Optional[str]) – Account which this metric comes from. Default: - Deployment account.

  • color (Optional[str]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. The Color class has a set of standard colors that can be used here. Default: - Automatic color

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard. Default: - No label

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • region (Optional[str]) – Region which this metric comes from. Default: - Deployment region.

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream

Return type

Metric

on_event(id, *, description=None, event_pattern=None, rule_name=None, target=None)

Defines a CloudWatch event rule which triggers for instance events.

Use rule.addEventPattern(pattern) to specify a filter.

Parameters
  • id (str) –

  • description (Optional[str]) – A description of the rule’s purpose. Default: - No description

  • event_pattern (Optional[EventPattern]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.

  • rule_name (Optional[str]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.

  • target (Optional[IRuleTarget]) – The target to register for the event. Default: - No target is added to the rule. Use addTarget() to add a target.

Return type

Rule

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

connections

Access to network connections.

Return type

Connections

db_instance_endpoint_address

The instance endpoint address.

Return type

str

db_instance_endpoint_port

The instance endpoint port.

Return type

str

engine

The engine of this database Instance.

May be not known for imported Instances if it wasn’t provided explicitly, or for read replicas.

Return type

Optional[IInstanceEngine]

env

The environment this resource belongs to.

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.

Return type

ResourceEnvironment

instance_arn

The instance arn.

Return type

str

instance_endpoint

The instance endpoint.

Return type

Endpoint

instance_identifier

The instance identifier.

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

vpc

The VPC where this database instance is deployed.

Return type

IVpc

Static Methods

classmethod from_database_instance_attributes(scope, id, *, instance_endpoint_address, instance_identifier, port, security_groups, engine=None)

Import an existing database instance.

Parameters
  • scope (Construct) –

  • id (str) –

  • instance_endpoint_address (str) – The endpoint address.

  • instance_identifier (str) – The instance identifier.

  • port (Union[int, float]) – The database port.

  • security_groups (List[ISecurityGroup]) – The security groups of the instance.

  • engine (Optional[IInstanceEngine]) – The engine of the existing database Instance. Default: - the imported Instance’s engine is unknown

Return type

IDatabaseInstance

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool