Class DatabaseProxy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.rds.DatabaseProxy
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IConnectable
,IDatabaseProxy
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:49.165Z")
@Stability(Stable)
public class DatabaseProxy
extends Resource
implements IConnectable, ISecretAttachmentTarget, IDatabaseProxy
RDS Database Proxy.
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");
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IDatabaseProxy
IDatabaseProxy.Jsii$Default, IDatabaseProxy.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
ISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
DatabaseProxy
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
DatabaseProxy
(software.amazon.jsii.JsiiObjectRef objRef) DatabaseProxy
(software.constructs.Construct scope, String id, DatabaseProxyProps props) -
Method Summary
Modifier and TypeMethodDescriptionRenders the secret attachment target specifications.static IDatabaseProxy
fromDatabaseProxyAttributes
(software.constructs.Construct scope, String id, DatabaseProxyAttributes attrs) Import an existing database proxy.Access to network connections.DB Proxy ARN.DB Proxy Name.Endpoint.grantConnect
(IGrantable grantee) Grant the given identity connection access to the proxy.grantConnect
(IGrantable grantee, String dbUser) Grant the given identity connection access to the proxy.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DatabaseProxy
protected DatabaseProxy(software.amazon.jsii.JsiiObjectRef objRef) -
DatabaseProxy
protected DatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
DatabaseProxy
@Stability(Stable) public DatabaseProxy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseProxyProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromDatabaseProxyAttributes
@Stability(Stable) @NotNull public static IDatabaseProxy fromDatabaseProxyAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DatabaseProxyAttributes attrs) Import an existing database proxy.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
asSecretAttachmentTarget
Renders the secret attachment target specifications.- Specified by:
asSecretAttachmentTarget
in interfaceISecretAttachmentTarget
-
grantConnect
@Stability(Stable) @NotNull public Grant grantConnect(@NotNull IGrantable grantee, @Nullable String dbUser) Grant the given identity connection access to the proxy.- Specified by:
grantConnect
in interfaceIDatabaseProxy
- Parameters:
grantee
- This parameter is required.dbUser
-
-
grantConnect
Grant the given identity connection access to the proxy.- Specified by:
grantConnect
in interfaceIDatabaseProxy
- Parameters:
grantee
- This parameter is required.
-
getConnections
Access to network connections.- Specified by:
getConnections
in interfaceIConnectable
-
getDbProxyArn
DB Proxy ARN.- Specified by:
getDbProxyArn
in interfaceIDatabaseProxy
-
getDbProxyName
DB Proxy Name.- Specified by:
getDbProxyName
in interfaceIDatabaseProxy
-
getEndpoint
Endpoint.- Specified by:
getEndpoint
in interfaceIDatabaseProxy
-