@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.467Z") @Stability(value=Stable) public class DatabaseProxy extends Resource implements IConnectable, ISecretAttachmentTarget, IDatabaseProxy
Example:
Vpc vpc;
DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.AURORA)
.instanceProps(InstanceProps.builder().vpc(vpc).build())
.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");
| Modifier and Type | Class and Description |
|---|---|
static class |
DatabaseProxy.Builder
A fluent builder for
DatabaseProxy. |
software.amazon.jsii.JsiiObject.InitializationModeIConnectable.Jsii$Default, IConnectable.Jsii$ProxyISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$ProxyIDatabaseProxy.Jsii$Default, IDatabaseProxy.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
DatabaseProxy(software.constructs.Construct scope,
String id,
DatabaseProxyProps props) |
protected |
DatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DatabaseProxy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
SecretAttachmentTargetProps |
asSecretAttachmentTarget()
Renders the secret attachment target specifications.
|
static IDatabaseProxy |
fromDatabaseProxyAttributes(software.constructs.Construct scope,
String id,
DatabaseProxyAttributes attrs)
Import an existing database proxy.
|
Connections |
getConnections()
Access to network connections.
|
String |
getDbProxyArn()
DB Proxy ARN.
|
String |
getDbProxyName()
DB Proxy Name.
|
String |
getEndpoint()
Endpoint.
|
Grant |
grantConnect(IGrantable grantee)
Grant the given identity connection access to the proxy.
|
Grant |
grantConnect(IGrantable grantee,
String dbUser)
Grant the given identity connection access to the proxy.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected DatabaseProxy(software.amazon.jsii.JsiiObjectRef objRef)
protected DatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public DatabaseProxy(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
DatabaseProxyProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IDatabaseProxy fromDatabaseProxyAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseProxyAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public SecretAttachmentTargetProps asSecretAttachmentTarget()
asSecretAttachmentTarget in interface ISecretAttachmentTarget@Stability(value=Stable) @NotNull public Grant grantConnect(@NotNull IGrantable grantee, @Nullable String dbUser)
grantConnect in interface IDatabaseProxygrantee - This parameter is required.dbUser - @Stability(value=Stable) @NotNull public Grant grantConnect(@NotNull IGrantable grantee)
grantConnect in interface IDatabaseProxygrantee - This parameter is required.@Stability(value=Stable) @NotNull public Connections getConnections()
getConnections in interface IConnectable@Stability(value=Stable) @NotNull public String getDbProxyArn()
getDbProxyArn in interface IDatabaseProxy@Stability(value=Stable) @NotNull public String getDbProxyName()
getDbProxyName in interface IDatabaseProxy@Stability(value=Stable) @NotNull public String getEndpoint()
getEndpoint in interface IDatabaseProxyCopyright © 2022. All rights reserved.