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:
IResource
,IConnectable
,IDatabaseProxy
,ISecretAttachmentTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-08-29T22:54:24.595Z")
@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.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.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.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.secretsmanager.ISecretAttachmentTarget
ISecretAttachmentTarget.Jsii$Default, ISecretAttachmentTarget.Jsii$Proxy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.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
-