Class DatabaseProxy
RDS Database Proxy.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DatabaseProxy : Resource, IConnectable, ISecretAttachmentTarget, IDatabaseProxy, IResource, IDBProxyRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class DatabaseProxy Inherits Resource Implements IConnectable, ISecretAttachmentTarget, IDatabaseProxy, IResource, IDBProxyRef, IConstruct, IDependable, IEnvironmentAware
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
Examples
Vpc vpc;
var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps {
Version = AuroraMysqlEngineVersion.VER_3_03_0
}),
Writer = ClusterInstance.Provisioned("writer"),
Vpc = vpc
});
var proxy = new DatabaseProxy(this, "Proxy", new DatabaseProxyProps {
ProxyTarget = ProxyTarget.FromCluster(cluster),
Secrets = new [] { cluster.Secret },
Vpc = vpc,
ClientPasswordAuthType = ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD
});
Synopsis
Constructors
| DatabaseProxy(Construct, string, IDatabaseProxyProps) | RDS Database Proxy. |
Properties
| Connections | Access to network connections. |
| DbProxyArn | DB Proxy ARN. |
| DbProxyName | DB Proxy Name. |
| DbProxyRef | A reference to this database proxy. |
| Endpoint | Endpoint. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| AddEndpoint(string, IDatabaseProxyEndpointOptions?) | Add an Endpoint to this DB Proxy. |
| AsSecretAttachmentTarget() | Renders the secret attachment target specifications. |
| FromDatabaseProxyAttributes(Construct, string, IDatabaseProxyAttributes) | Import an existing database proxy. |
| GrantConnect(IGrantable, string?) | [disable-awslint:no-grants]. |
Constructors
DatabaseProxy(Construct, string, IDatabaseProxyProps)
RDS Database Proxy.
public DatabaseProxy(Construct scope, string id, IDatabaseProxyProps props)
Parameters
- scope Construct
- id string
- props IDatabaseProxyProps
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
Examples
Vpc vpc;
var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps {
Version = AuroraMysqlEngineVersion.VER_3_03_0
}),
Writer = ClusterInstance.Provisioned("writer"),
Vpc = vpc
});
var proxy = new DatabaseProxy(this, "Proxy", new DatabaseProxyProps {
ProxyTarget = ProxyTarget.FromCluster(cluster),
Secrets = new [] { cluster.Secret },
Vpc = vpc,
ClientPasswordAuthType = ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD
});
Properties
Connections
Access to network connections.
public virtual Connections_ Connections { get; }
Property Value
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
DbProxyArn
DB Proxy ARN.
public virtual string DbProxyArn { get; }
Property Value
Remarks
Attribute: true
DbProxyName
DB Proxy Name.
public virtual string DbProxyName { get; }
Property Value
Remarks
Attribute: true
DbProxyRef
A reference to this database proxy.
public virtual IDBProxyReference DbProxyRef { get; }
Property Value
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
Endpoint
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
Methods
AddEndpoint(string, IDatabaseProxyEndpointOptions?)
Add an Endpoint to this DB Proxy.
public virtual IDatabaseProxyEndpoint AddEndpoint(string id, IDatabaseProxyEndpointOptions? options = null)
Parameters
- id string
- options IDatabaseProxyEndpointOptions
Returns
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
AsSecretAttachmentTarget()
Renders the secret attachment target specifications.
public virtual ISecretAttachmentTargetProps AsSecretAttachmentTarget()
Returns
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
FromDatabaseProxyAttributes(Construct, string, IDatabaseProxyAttributes)
Import an existing database proxy.
public static IDatabaseProxy FromDatabaseProxyAttributes(Construct scope, string id, IDatabaseProxyAttributes attrs)
Parameters
- scope Construct
- id string
- attrs IDatabaseProxyAttributes
Returns
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
GrantConnect(IGrantable, string?)
[disable-awslint:no-grants].
public virtual Grant GrantConnect(IGrantable grantee, string? dbUser = null)
Parameters
- grantee IGrantable
- dbUser string
Returns
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused