Class ProxyTarget

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.rds.ProxyTarget
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.254Z") @Stability(Stable) public class ProxyTarget extends software.amazon.jsii.JsiiObject
Proxy target: Instance or Cluster.

A target group is a collection of databases that the proxy can connect to. Currently, you can specify only one RDS DB instance or Aurora DB cluster.

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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ProxyTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ProxyTarget(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Bind this target to the specified database proxy.
    From cluster.
    From instance.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ProxyTarget

      protected ProxyTarget(software.amazon.jsii.JsiiObjectRef objRef)
    • ProxyTarget

      protected ProxyTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • fromCluster

      @Stability(Stable) @NotNull public static ProxyTarget fromCluster(@NotNull IDatabaseCluster cluster)
      From cluster.

      Parameters:
      cluster - RDS database cluster. This parameter is required.
    • fromInstance

      @Stability(Stable) @NotNull public static ProxyTarget fromInstance(@NotNull IDatabaseInstance instance)
      From instance.

      Parameters:
      instance - RDS database instance. This parameter is required.
    • bind

      @Stability(Stable) @NotNull public ProxyTargetConfig bind(@NotNull DatabaseProxy proxy)
      Bind this target to the specified database proxy.

      Parameters:
      proxy - This parameter is required.