Enum DnsResponseType

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:12.542Z") @Stability(Stable) public enum DnsResponseType extends Enum<DnsResponseType>
Enum of DNS service discovery response type.

Example:

 // A Virtual Node with a gRPC listener with a connection pool set
 Mesh mesh;
 VirtualNode node = VirtualNode.Builder.create(this, "node")
         .mesh(mesh)
         // DNS service discovery can optionally specify the DNS response type as either LOAD_BALANCER or ENDPOINTS.
         // LOAD_BALANCER means that the DNS resolver returns a loadbalanced set of endpoints,
         // whereas ENDPOINTS means that the DNS resolver is returning all the endpoints.
         // By default, the response type is assumed to be LOAD_BALANCER
         .serviceDiscovery(ServiceDiscovery.dns("node", DnsResponseType.ENDPOINTS))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .port(80)
                 .connectionPool(HttpConnectionPool.builder()
                         .maxConnections(100)
                         .maxPendingRequests(10)
                         .build())
                 .build())))
         .build();
 // A Virtual Gateway with a gRPC listener with a connection pool set
 VirtualGateway gateway = VirtualGateway.Builder.create(this, "gateway")
         .mesh(mesh)
         .listeners(List.of(VirtualGatewayListener.grpc(GrpcGatewayListenerOptions.builder()
                 .port(8080)
                 .connectionPool(GrpcConnectionPool.builder()
                         .maxRequests(10)
                         .build())
                 .build())))
         .virtualGatewayName("gateway")
         .build();
 
  • Enum Constant Details

    • LOAD_BALANCER

      @Stability(Stable) public static final DnsResponseType LOAD_BALANCER
      DNS resolver returns a loadbalanced set of endpoints and the traffic would be sent to the given endpoints.

      It would not drain existing connections to other endpoints that are not part of this list.

    • ENDPOINTS

      @Stability(Stable) public static final DnsResponseType ENDPOINTS
      DNS resolver is returning all the endpoints.

      This also means that if an endpoint is missing, it would drain the current connections to the missing endpoint.

  • Method Details

    • values

      public static DnsResponseType[] 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 DnsResponseType 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