ClusterInstanceBindOptions

class aws_cdk.aws_rds.ClusterInstanceBindOptions(*, monitoring_interval=None, monitoring_role=None, promotion_tier=None, removal_policy=None, subnet_group=None)

Bases: object

Options for binding the instance to the cluster.

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

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

  • promotion_tier (Union[int, float, None]) – The promotion tier of the cluster instance. This matters more for serverlessV2 instances. If a serverless instance is in tier 0-1 then it will scale with the writer. For provisioned instances this just determines the failover priority. If multiple instances have the same priority then one will be picked at random Default: 2

  • removal_policy (Optional[RemovalPolicy]) – The removal policy on the cluster. Default: - RemovalPolicy.DESTROY (cluster snapshot can restore)

  • subnet_group (Optional[ISubnetGroup]) – Existing subnet group for the cluster. This is only needed when using the isFromLegacyInstanceProps Default: - cluster subnet group is used

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_iam as iam
from aws_cdk import aws_rds as rds

# role: iam.Role
# subnet_group: rds.SubnetGroup

cluster_instance_bind_options = rds.ClusterInstanceBindOptions(
    monitoring_interval=cdk.Duration.minutes(30),
    monitoring_role=role,
    promotion_tier=123,
    removal_policy=cdk.RemovalPolicy.DESTROY,
    subnet_group=subnet_group
)

Attributes

monitoring_interval

The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.

Default:

no enhanced monitoring

monitoring_role

Role that will be used to manage DB instances monitoring.

Default:
  • A role is automatically created for you

promotion_tier

The promotion tier of the cluster instance.

This matters more for serverlessV2 instances. If a serverless instance is in tier 0-1 then it will scale with the writer.

For provisioned instances this just determines the failover priority. If multiple instances have the same priority then one will be picked at random

Default:

2

removal_policy

The removal policy on the cluster.

Default:
  • RemovalPolicy.DESTROY (cluster snapshot can restore)

subnet_group

Existing subnet group for the cluster.

This is only needed when using the isFromLegacyInstanceProps

Default:
  • cluster subnet group is used