@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:51.241Z") 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 . |
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
ISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$Proxy
IDatabaseProxy.Jsii$Default, IDatabaseProxy.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
DatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DatabaseProxy(software.amazon.jsii.JsiiObjectRef objRef) |
|
DatabaseProxy(software.constructs.Construct scope,
java.lang.String id,
DatabaseProxyProps props) |
Modifier and Type | Method and Description |
---|---|
SecretAttachmentTargetProps |
asSecretAttachmentTarget()
Renders the secret attachment target specifications.
|
static IDatabaseProxy |
fromDatabaseProxyAttributes(software.constructs.Construct scope,
java.lang.String id,
DatabaseProxyAttributes attrs)
Import an existing database proxy.
|
Connections |
getConnections()
Access to network connections.
|
java.lang.String |
getDbProxyArn()
DB Proxy ARN.
|
java.lang.String |
getDbProxyName()
DB Proxy Name.
|
java.lang.String |
getEndpoint()
Endpoint.
|
Grant |
grantConnect(IGrantable grantee)
Grant the given identity connection access to the proxy.
|
Grant |
grantConnect(IGrantable grantee,
java.lang.String dbUser)
Grant the given identity connection access to the proxy.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected DatabaseProxy(software.amazon.jsii.JsiiObjectRef objRef)
protected DatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public DatabaseProxy(software.constructs.Construct scope, java.lang.String id, DatabaseProxyProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IDatabaseProxy fromDatabaseProxyAttributes(software.constructs.Construct scope, java.lang.String id, DatabaseProxyAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public SecretAttachmentTargetProps asSecretAttachmentTarget()
asSecretAttachmentTarget
in interface ISecretAttachmentTarget
public Grant grantConnect(IGrantable grantee, java.lang.String dbUser)
grantConnect
in interface IDatabaseProxy
grantee
- This parameter is required.dbUser
- public Grant grantConnect(IGrantable grantee)
grantConnect
in interface IDatabaseProxy
grantee
- This parameter is required.public Connections getConnections()
getConnections
in interface IConnectable
public java.lang.String getDbProxyArn()
getDbProxyArn
in interface IDatabaseProxy
public java.lang.String getDbProxyName()
getDbProxyName
in interface IDatabaseProxy
public java.lang.String getEndpoint()
getEndpoint
in interface IDatabaseProxy