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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.IDatabaseProxy
IDatabaseProxy.Jsii$Default, IDatabaseProxy.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
ISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDatabaseProxy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDatabaseProxy(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 IDatabaseProxyfromDatabaseProxyAttributes(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, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods 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:
asSecretAttachmentTargetin 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:
grantConnectin interfaceIDatabaseProxy- Parameters:
grantee- This parameter is required.dbUser-
-
grantConnect
Grant the given identity connection access to the proxy.- Specified by:
grantConnectin interfaceIDatabaseProxy- Parameters:
grantee- This parameter is required.
-
getConnections
Access to network connections.- Specified by:
getConnectionsin interfaceIConnectable
-
getDbProxyArn
DB Proxy ARN.- Specified by:
getDbProxyArnin interfaceIDatabaseProxy
-
getDbProxyName
DB Proxy Name.- Specified by:
getDbProxyNamein interfaceIDatabaseProxy
-
getEndpoint
Endpoint.- Specified by:
getEndpointin interfaceIDatabaseProxy
-