# DatabaseProxyEndpointProps

Construction properties for a DatabaseProxyEndpoint.

Extends: [DatabaseProxyEndpointOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseProxyEndpointOptions.html)
Used as props by: [DatabaseProxyEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.DatabaseProxyEndpoint.html)

- Source: [`aws-rds/lib/proxy-endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-rds/lib/proxy-endpoint.ts#L78)
- 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 { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_rds as rds } from 'aws-cdk-lib';
import { aws_rds as interfaces_rds } from 'aws-cdk-lib/interfaces';

declare const dBProxyRef: interfaces_rds.IDBProxyRef;
declare const securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const databaseProxyEndpointProps: rds.DatabaseProxyEndpointProps = {
  dbProxy: dBProxyRef,
  vpc: vpc,

  // the properties below are optional
  dbProxyEndpointName: 'dbProxyEndpointName',
  securityGroups: [securityGroup],
  targetRole: rds.ProxyEndpointTargetRole.READ_WRITE,
  vpcSubnets: {
    availabilityZones: ['availabilityZones'],
    onePerAz: false,
    subnetFilters: [subnetFilter],
    subnetGroupName: 'subnetGroupName',
    subnets: [subnet],
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_rds as rds
from aws_cdk.interfaces import aws_rds as interfaces_rds

# d_b_proxy_ref: interfaces_rds.IDBProxyRef
# security_group: ec2.SecurityGroup
# subnet: ec2.Subnet
# subnet_filter: ec2.SubnetFilter
# vpc: ec2.Vpc

database_proxy_endpoint_props = rds.DatabaseProxyEndpointProps(
    db_proxy=d_b_proxy_ref,
    vpc=vpc,

    # the properties below are optional
    db_proxy_endpoint_name="dbProxyEndpointName",
    security_groups=[security_group],
    target_role=rds.ProxyEndpointTargetRole.READ_WRITE,
    vpc_subnets=ec2.SubnetSelection(
        availability_zones=["availabilityZones"],
        one_per_az=False,
        subnet_filters=[subnet_filter],
        subnet_group_name="subnetGroupName",
        subnets=[subnet],
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
    )
)
```

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.services.ec2.*;
import software.amazon.awscdk.services.rds.*;
import software.amazon.awscdk.interfaces.rds.*;

IDBProxyRef dBProxyRef;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;

DatabaseProxyEndpointProps databaseProxyEndpointProps = DatabaseProxyEndpointProps.builder()
        .dbProxy(dBProxyRef)
        .vpc(vpc)

        // the properties below are optional
        .dbProxyEndpointName("dbProxyEndpointName")
        .securityGroups(List.of(securityGroup))
        .targetRole(ProxyEndpointTargetRole.READ_WRITE)
        .vpcSubnets(SubnetSelection.builder()
                .availabilityZones(List.of("availabilityZones"))
                .onePerAz(false)
                .subnetFilters(List.of(subnetFilter))
                .subnetGroupName("subnetGroupName")
                .subnets(List.of(subnet))
                .subnetType(SubnetType.PRIVATE_ISOLATED)
                .build())
        .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.AWS.EC2;
using Amazon.CDK.AWS.RDS;
using Amazon.CDK.Interfaces.RDS;

IDBProxyRef dBProxyRef;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;

var databaseProxyEndpointProps = new DatabaseProxyEndpointProps {
    DbProxy = dBProxyRef,
    Vpc = vpc,

    // the properties below are optional
    DbProxyEndpointName = "dbProxyEndpointName",
    SecurityGroups = new [] { securityGroup },
    TargetRole = ProxyEndpointTargetRole.READ_WRITE,
    VpcSubnets = new SubnetSelection {
        AvailabilityZones = new [] { "availabilityZones" },
        OnePerAz = false,
        SubnetFilters = new [] { subnetFilter },
        SubnetGroupName = "subnetGroupName",
        Subnets = new [] { subnet },
        SubnetType = SubnetType.PRIVATE_ISOLATED
    }
};
```

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"

var dBProxyRef IDBProxyRef
var securityGroup SecurityGroup
var subnet Subnet
var subnetFilter SubnetFilter
var vpc Vpc

databaseProxyEndpointProps := &DatabaseProxyEndpointProps{
	DbProxy: dBProxyRef,
	Vpc: vpc,

	// the properties below are optional
	DbProxyEndpointName: jsii.String("dbProxyEndpointName"),
	SecurityGroups: []ISecurityGroup{
		securityGroup,
	},
	TargetRole: awscdk.Aws_rds.ProxyEndpointTargetRole_READ_WRITE,
	VpcSubnets: &SubnetSelection{
		AvailabilityZones: []*string{
			jsii.String("availabilityZones"),
		},
		OnePerAz: jsii.Boolean(false),
		SubnetFilters: []SubnetFilter{
			subnetFilter,
		},
		SubnetGroupName: jsii.String("subnetGroupName"),
		Subnets: []ISubnet{
			subnet,
		},
		SubnetType: awscdk.Aws_ec2.SubnetType_PRIVATE_ISOLATED,
	},
}
```

## Properties

- `dbProxy`: [IDBProxyRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_rds.IDBProxyRef.html) (required) — The DB proxy associated with the DB proxy endpoint.

- `dbProxyEndpointName`: string — The name of the DB proxy endpoint.

  **Default:** a CDK generated name

- `securityGroups`: [ISecurityGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — The VPC security groups to associate with the new proxy endpoint.

  **Default:** Default security group for the VPC

- `targetRole`: [ProxyEndpointTargetRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.ProxyEndpointTargetRole.html) — A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.

  **Default:** ProxyEndpointTargetRole.READ_WRITE

- `vpc`: [IVpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC of the DB proxy endpoint.

- `vpcSubnets`: [SubnetSelection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — The subnets of DB proxy endpoint.

  **Default:** the VPC default strategy if not specified.
