Interface DatabaseProxyProps

All Superinterfaces:
DatabaseProxyOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
DatabaseProxyProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:32.283Z") @Stability(Stable) public interface DatabaseProxyProps extends software.amazon.jsii.JsiiSerializable, DatabaseProxyOptions
Construction properties for a DatabaseProxy.

Example:

 Vpc vpc;
 DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
         .engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder()
                 .version(AuroraMysqlEngineVersion.VER_3_03_0)
                 .build()))
         .writer(ClusterInstance.provisioned("writer"))
         .vpc(vpc)
         .build();
 DatabaseProxy proxy = DatabaseProxy.Builder.create(this, "Proxy")
         .proxyTarget(ProxyTarget.fromCluster(cluster))
         .secrets(List.of(cluster.getSecret()))
         .vpc(vpc)
         .build();
 Role role = Role.Builder.create(this, "DBProxyRole").assumedBy(new AccountPrincipal(this.account)).build();
 proxy.grantConnect(role, "admin");