DatabaseProxyEndpointProps Struct
Construction properties for a DatabaseProxyEndpoint.
| Source | aws-rds/lib/proxy-endpoint.ts |
|---|---|
| Type last changed |
Example
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
# 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
// 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();
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
}
};
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
dbProxyIDBProxyRefdb_proxyIDBProxyRefdbProxyIDBProxyRefDbProxyIDBProxyRefDbProxyIDBProxyRef required #The DB proxy associated with the DB proxy endpoint.
dbProxyEndpointNameoptionalstringdb_proxy_endpoint_nameoptionalstrdbProxyEndpointNameoptionalStringDbProxyEndpointNameoptionalstringDbProxyEndpointNameoptional*string #The name of the DB proxy endpoint.
Default: a CDK generated name
securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #The VPC security groups to associate with the new proxy endpoint.
Default: Default security group for the VPC
targetRoleoptionalProxyEndpointTargetRoletarget_roleoptionalProxyEndpointTargetRoletargetRoleoptionalProxyEndpointTargetRoleTargetRoleoptionalProxyEndpointTargetRoleTargetRoleoptionalProxyEndpointTargetRole #A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
Default: ProxyEndpointTargetRole.READ_WRITE
vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection #The subnets of DB proxy endpoint.
Default: the VPC default strategy if not specified.