Enum IpPreference

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-17T21:37:26.256Z") @Stability(Stable) public enum IpPreference extends Enum<IpPreference>
Enum of supported IP preferences.

Used to dictate the IP version for mesh wide and virtual node service discovery. Also used to specify the IP version that a sidecar Envoy uses when sending traffic to a local application.

Example:

 Mesh mesh = Mesh.Builder.create(this, "AppMesh")
         .meshName("myAwsMesh")
         .serviceDiscovery(MeshServiceDiscovery.builder()
                 .ipPreference(IpPreference.IPV4_ONLY)
                 .build())
         .build();
 
  • Enum Constant Details

    • IPV4_ONLY

      @Stability(Stable) public static final IpPreference IPV4_ONLY
      Use IPv4 when sending traffic to a local application.

      Only use IPv4 for service discovery.

    • IPV4_PREFERRED

      @Stability(Stable) public static final IpPreference IPV4_PREFERRED
      Use IPv4 when sending traffic to a local application.

      First attempt to use IPv4 and fall back to IPv6 for service discovery.

    • IPV6_ONLY

      @Stability(Stable) public static final IpPreference IPV6_ONLY
      Use IPv6 when sending traffic to a local application.

      Only use IPv6 for service discovery.

    • IPV6_PREFERRED

      @Stability(Stable) public static final IpPreference IPV6_PREFERRED
      Use IPv6 when sending traffic to a local application.

      First attempt to use IPv6 and fall back to IPv4 for service discovery.

  • Method Details

    • values

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