# ProxyEndpointTargetRole

A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.

- Source: [`aws-rds/lib/proxy-endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-rds/lib/proxy-endpoint.ts#L108)
- Type last changed: v2.215.0 · 15 Sep 2025

## Example

```ts
declare const vpc: ec2.Vpc;
declare const secrets: secretsmanager.Secret[];
declare const dbInstance: rds.DatabaseInstance;

const proxy = dbInstance.addProxy('Proxy', {
  secrets,
  vpc,
});

// Add a reader endpoint
proxy.addEndpoint('ProxyEndpoint', {
  vpc,
  targetRole: rds.ProxyEndpointTargetRole.READ_ONLY,
});
```

## Members

| Member | Description |
| --- | --- |
| `READ_WRITE` | The proxy endpoint can be used for both read and write operations. |
| `READ_ONLY` | The proxy endpoint can be used only for read operations. |

## Referenced by

- [`DatabaseProxyEndpointOptions`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseProxyEndpointOptions).targetRole
