# ClusterInstanceBindOptions

Options for binding the instance to the cluster.

Used as argument in: [IClusterInstance.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.IClusterInstance.html#bind)

- Source: [`aws-rds/lib/aurora-cluster-instance.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-rds/lib/aurora-cluster-instance.ts#L26)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_rds as rds } from 'aws-cdk-lib';
import { aws_iam as interfaces_iam } from 'aws-cdk-lib/interfaces';
import { aws_rds as interfaces_rds } from 'aws-cdk-lib/interfaces';

declare const dBSubnetGroupRef: interfaces_rds.IDBSubnetGroupRef;
declare const roleRef: interfaces_iam.IRoleRef;
const clusterInstanceBindOptions: rds.ClusterInstanceBindOptions = {
  monitoringInterval: cdk.Duration.minutes(30),
  monitoringRole: roleRef,
  promotionTier: 123,
  removalPolicy: cdk.RemovalPolicy.DESTROY,
  subnetGroup: dBSubnetGroupRef,
};
```

Python:

```python
# 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_rds as rds
from aws_cdk.interfaces import aws_iam as interfaces_iam
from aws_cdk.interfaces import aws_rds as interfaces_rds

# d_b_subnet_group_ref: interfaces_rds.IDBSubnetGroupRef
# role_ref: interfaces_iam.IRoleRef

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

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.rds.*;
import software.amazon.awscdk.interfaces.iam.*;
import software.amazon.awscdk.interfaces.rds.*;

IDBSubnetGroupRef dBSubnetGroupRef;
IRoleRef roleRef;

ClusterInstanceBindOptions clusterInstanceBindOptions = ClusterInstanceBindOptions.builder()
        .monitoringInterval(Duration.minutes(30))
        .monitoringRole(roleRef)
        .promotionTier(123)
        .removalPolicy(RemovalPolicy.DESTROY)
        .subnetGroup(dBSubnetGroupRef)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.RDS;
using Amazon.CDK.Interfaces.IAM;
using Amazon.CDK.Interfaces.RDS;

IDBSubnetGroupRef dBSubnetGroupRef;
IRoleRef roleRef;

var clusterInstanceBindOptions = new ClusterInstanceBindOptions {
    MonitoringInterval = Duration.Minutes(30),
    MonitoringRole = roleRef,
    PromotionTier = 123,
    RemovalPolicy = RemovalPolicy.DESTROY,
    SubnetGroup = dBSubnetGroupRef
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var dBSubnetGroupRef IDBSubnetGroupRef
var roleRef IRoleRef

clusterInstanceBindOptions := &ClusterInstanceBindOptions{
	MonitoringInterval: cdk.Duration_Minutes(jsii.Number(30)),
	MonitoringRole: roleRef,
	PromotionTier: jsii.Number(123),
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
	SubnetGroup: dBSubnetGroupRef,
}
```

## Properties

- `monitoringInterval`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instances.

  **Default:** no enhanced monitoring

- `monitoringRole`: [IRoleRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_iam.IRoleRef.html) — Role that will be used to manage DB instances monitoring.

  **Default:** A role is automatically created for you

- `promotionTier`: number = 2 — 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

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) — The removal policy on the cluster.

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

- `subnetGroup`: [IDBSubnetGroupRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_rds.IDBSubnetGroupRef.html) — Existing subnet group for the cluster.

  **Default:** cluster subnet group is used

  This is only needed when using the isFromLegacyInstanceProps
