Class DatabaseProxy
RDS Database Proxy.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public class DatabaseProxy : Resource, IConnectable, ISecretAttachmentTarget, IDatabaseProxy, IResource, IConstruct, IDependable
Syntax (vb)
Public Class DatabaseProxy
Inherits Resource
Implements IConnectable, ISecretAttachmentTarget, IDatabaseProxy, IResource, IConstruct, IDependable
Remarks
Resource: AWS::RDS::DBProxy
ExampleMetadata: infused
Examples
Vpc vpc;
var cluster = new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AURORA,
InstanceProps = new InstanceProps { Vpc = vpc }
});
var proxy = new DatabaseProxy(this, "Proxy", new DatabaseProxyProps {
ProxyTarget = ProxyTarget.FromCluster(cluster),
Secrets = new [] { cluster.Secret },
Vpc = vpc
});
var role = new Role(this, "DBProxyRole", new RoleProps { AssumedBy = new AccountPrincipal(Account) });
proxy.GrantConnect(role, "admin");
Synopsis
Constructors
DatabaseProxy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DatabaseProxy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
DatabaseProxy(Construct, String, IDatabaseProxyProps) |
Properties
Connections | Access to network connections. |
DbProxyArn | DB Proxy ARN. |
DbProxyName | DB Proxy Name. |
Endpoint | Endpoint. |
Methods
AsSecretAttachmentTarget() | Renders the secret attachment target specifications. |
FromDatabaseProxyAttributes(Construct, String, IDatabaseProxyAttributes) | Import an existing database proxy. |
GrantConnect(IGrantable, String) | Grant the given identity connection access to the proxy. |
Constructors
DatabaseProxy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DatabaseProxy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DatabaseProxy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DatabaseProxy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
DatabaseProxy(Construct, String, IDatabaseProxyProps)
public DatabaseProxy(Construct scope, string id, IDatabaseProxyProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IDatabaseProxyProps
Properties
Connections
Access to network connections.
public virtual Connections_ Connections { get; }
Property Value
DbProxyArn
DB Proxy ARN.
public virtual string DbProxyArn { get; }
Property Value
System.String
Remarks
Attribute: true
DbProxyName
DB Proxy Name.
public virtual string DbProxyName { get; }
Property Value
System.String
Remarks
Attribute: true
Endpoint
Endpoint.
public virtual string Endpoint { get; }
Property Value
System.String
Remarks
Attribute: true
Methods
AsSecretAttachmentTarget()
Renders the secret attachment target specifications.
public virtual ISecretAttachmentTargetProps AsSecretAttachmentTarget()
Returns
FromDatabaseProxyAttributes(Construct, String, IDatabaseProxyAttributes)
Import an existing database proxy.
public static IDatabaseProxy FromDatabaseProxyAttributes(Construct scope, string id, IDatabaseProxyAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IDatabaseProxyAttributes
Returns
GrantConnect(IGrantable, String)
Grant the given identity connection access to the proxy.
public virtual Grant GrantConnect(IGrantable grantee, string dbUser = null)
Parameters
- grantee IGrantable
- dbUser System.String
Returns