Interface IDatabaseProxyProps
Construction properties for a DatabaseProxy.
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDatabaseProxyProps : IDatabaseProxyOptions
Syntax (vb)
Public Interface IDatabaseProxyProps
Inherits IDatabaseProxyOptions
Remarks
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
});
var role = new Role(this, "DBProxyRole", new RoleProps { AssumedBy = new AccountPrincipal(Account) });
proxy.GrantConnect(role, "admin");
Synopsis
Properties
ProxyTarget | DB proxy target: Instance or Cluster. |