Enum ProxyEndpointTargetRole

java.lang.Object
java.lang.Enum<ProxyEndpointTargetRole>
software.amazon.awscdk.services.rds.ProxyEndpointTargetRole
All Implemented Interfaces:
Serializable, Comparable<ProxyEndpointTargetRole>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-15T14:52:05.596Z") @Stability(Stable) public enum ProxyEndpointTargetRole extends Enum<ProxyEndpointTargetRole>
A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.

Example:

 Vpc vpc;
 Secret[] secrets;
 DatabaseInstance dbInstance;
 DatabaseProxy proxy = dbInstance.addProxy("Proxy", DatabaseProxyOptions.builder()
         .secrets(secrets)
         .vpc(vpc)
         .build());
 // Add a reader endpoint
 proxy.addEndpoint("ProxyEndpoint", DatabaseProxyEndpointOptions.builder()
         .vpc(vpc)
         .targetRole(ProxyEndpointTargetRole.READ_ONLY)
         .build());
 
  • Enum Constant Details

    • READ_WRITE

      @Stability(Stable) public static final ProxyEndpointTargetRole READ_WRITE
      The proxy endpoint can be used for both read and write operations.
    • READ_ONLY

      @Stability(Stable) public static final ProxyEndpointTargetRole READ_ONLY
      The proxy endpoint can be used only for read operations.
  • Method Details

    • values

      public static ProxyEndpointTargetRole[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ProxyEndpointTargetRole valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null