Class DatabaseProxy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.rds.DatabaseProxy
- All Implemented Interfaces:
IEnvironmentAware,IResource,IConnectable,IDatabaseProxy,ISecretAttachmentTarget,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:28.638Z")
@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.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)
.clientPasswordAuthType(ClientPasswordAuthType.MYSQL_NATIVE_PASSWORD)
.build();
-
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.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.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
ISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$Proxy -
Field Summary
Fields -
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 TypeMethodDescriptionaddEndpoint(String id) Add an Endpoint to this DB Proxy.addEndpoint(String id, DatabaseProxyEndpointOptions options) Add an Endpoint to this DB Proxy.Renders 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.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
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.
-
addEndpoint
@Stability(Stable) @NotNull public IDatabaseProxyEndpoint addEndpoint(@NotNull String id, @Nullable DatabaseProxyEndpointOptions options) Add an Endpoint to this DB Proxy.- Parameters:
id- This parameter is required.options-
-
addEndpoint
Add an Endpoint to this DB Proxy.- Parameters:
id- 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
-