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

@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)", date="2025-12-18T18:20:16.872Z") @Stability(Stable) public enum Failover extends Enum<Failover>
The failover policy.

Example:

 HostedZone myZone;
 HealthCheck healthCheck = HealthCheck.Builder.create(this, "HealthCheck")
         .type(HealthCheckType.HTTP)
         .fqdn("example.com")
         .port(80)
         .resourcePath("/health")
         .failureThreshold(3)
         .requestInterval(Duration.seconds(30))
         .build();
 ARecord.Builder.create(this, "ARecordFailoverPrimary")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.4"))
         .failover(Failover.PRIMARY)
         .healthCheck(healthCheck)
         .setIdentifier("failover-primary")
         .build();
 ARecord.Builder.create(this, "ARecordFailoverSecondary")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("5.6.7.8"))
         .failover(Failover.SECONDARY)
         .setIdentifier("failover-secondary")
         .build();
 

See Also:
  • Enum Constant Details

    • PRIMARY

      @Stability(Stable) public static final Failover PRIMARY
      The primary resource record set determines how Route 53 responds to DNS queries when the primary resource is healthy.
    • SECONDARY

      @Stability(Stable) public static final Failover SECONDARY
      The secondary resource record set determines how Route 53 responds to DNS queries when the primary resource is unhealthy.
  • Method Details

    • values

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