Class DatabaseProxyEndpointOptions
Options for a new DatabaseProxyEndpoint.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DatabaseProxyEndpointOptions : IDatabaseProxyEndpointOptions
Syntax (vb)
Public Class DatabaseProxyEndpointOptions Implements IDatabaseProxyEndpointOptions
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
Secret[] secrets;
DatabaseInstance dbInstance;
var proxy = dbInstance.AddProxy("Proxy", new DatabaseProxyOptions {
Secrets = secrets,
Vpc = vpc
});
// Add a reader endpoint
proxy.AddEndpoint("ProxyEndpoint", new DatabaseProxyEndpointOptions {
Vpc = vpc,
TargetRole = ProxyEndpointTargetRole.READ_ONLY
});
Synopsis
Constructors
| DatabaseProxyEndpointOptions() | Options for a new DatabaseProxyEndpoint. |
Properties
| DbProxyEndpointName | The name of the DB proxy endpoint. |
| SecurityGroups | The VPC security groups to associate with the new proxy endpoint. |
| TargetRole | A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations. |
| Vpc | The VPC of the DB proxy endpoint. |
| VpcSubnets | The subnets of DB proxy endpoint. |
Constructors
DatabaseProxyEndpointOptions()
Options for a new DatabaseProxyEndpoint.
public DatabaseProxyEndpointOptions()
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
Secret[] secrets;
DatabaseInstance dbInstance;
var proxy = dbInstance.AddProxy("Proxy", new DatabaseProxyOptions {
Secrets = secrets,
Vpc = vpc
});
// Add a reader endpoint
proxy.AddEndpoint("ProxyEndpoint", new DatabaseProxyEndpointOptions {
Vpc = vpc,
TargetRole = ProxyEndpointTargetRole.READ_ONLY
});
Properties
DbProxyEndpointName
The name of the DB proxy endpoint.
public string? DbProxyEndpointName { get; set; }
Property Value
Remarks
Default: - a CDK generated name
SecurityGroups
The VPC security groups to associate with the new proxy endpoint.
public ISecurityGroup[]? SecurityGroups { get; set; }
Property Value
Remarks
Default: - Default security group for the VPC
TargetRole
A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.
public ProxyEndpointTargetRole? TargetRole { get; set; }
Property Value
Remarks
Default: - ProxyEndpointTargetRole.READ_WRITE
Vpc
The VPC of the DB proxy endpoint.
public IVpc Vpc { get; set; }
Property Value
Remarks
ExampleMetadata: infused
VpcSubnets
The subnets of DB proxy endpoint.
public ISubnetSelection? VpcSubnets { get; set; }
Property Value
Remarks
Default: - the VPC default strategy if not specified.