Class ChangeGuardrail

java.lang.Object
software.amazon.awssdk.services.route53.model.ChangeGuardrail
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ChangeGuardrail.Builder,ChangeGuardrail>

@Generated("software.amazon.awssdk:codegen") public final class ChangeGuardrail extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ChangeGuardrail.Builder,ChangeGuardrail>

A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.

When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.

For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.

See Also:
  • Method Details

    • name

      public final ChangeGuardrailName name()

      The name of the guardrail. Valid values are the following:

      NS_FORMAT_CHECK

      This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.

      NS_DELEGATION_AUTHORITY_CHECK

      This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.

      This guardrail applies only to public hosted zones.

      NS_OCCLUSION_CHECK

      This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.

      ALIAS_TARGET_CHECK

      This guardrail rejects deleting a record that an alias record in the same hosted zone points to.

      ACTIVE_RECORD_CHECK

      This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.

      ACTIVE_DELEGATION_CHECK

      This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.

      The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.

      If the service returns an enum value that is not available in the current SDK version, name will return ChangeGuardrailName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from nameAsString().

      Returns:
      The name of the guardrail. Valid values are the following:

      NS_FORMAT_CHECK

      This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.

      NS_DELEGATION_AUTHORITY_CHECK

      This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.

      This guardrail applies only to public hosted zones.

      NS_OCCLUSION_CHECK

      This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.

      ALIAS_TARGET_CHECK

      This guardrail rejects deleting a record that an alias record in the same hosted zone points to.

      ACTIVE_RECORD_CHECK

      This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.

      ACTIVE_DELEGATION_CHECK

      This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.

      The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.

      See Also:
    • nameAsString

      public final String nameAsString()

      The name of the guardrail. Valid values are the following:

      NS_FORMAT_CHECK

      This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.

      NS_DELEGATION_AUTHORITY_CHECK

      This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.

      This guardrail applies only to public hosted zones.

      NS_OCCLUSION_CHECK

      This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.

      ALIAS_TARGET_CHECK

      This guardrail rejects deleting a record that an alias record in the same hosted zone points to.

      ACTIVE_RECORD_CHECK

      This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.

      ACTIVE_DELEGATION_CHECK

      This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.

      The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.

      If the service returns an enum value that is not available in the current SDK version, name will return ChangeGuardrailName.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from nameAsString().

      Returns:
      The name of the guardrail. Valid values are the following:

      NS_FORMAT_CHECK

      This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.

      NS_DELEGATION_AUTHORITY_CHECK

      This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.

      This guardrail applies only to public hosted zones.

      NS_OCCLUSION_CHECK

      This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.

      ALIAS_TARGET_CHECK

      This guardrail rejects deleting a record that an alias record in the same hosted zone points to.

      ACTIVE_RECORD_CHECK

      This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.

      ACTIVE_DELEGATION_CHECK

      This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.

      The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.

      See Also:
    • status

      public final ChangeGuardrailStatus status()

      The status of the guardrail. Valid values are the following:

      ENABLED

      ENABLED means that the guardrail is turned on.

      DISABLED

      DISABLED means that the guardrail is turned off.

      If the service returns an enum value that is not available in the current SDK version, status will return ChangeGuardrailStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the guardrail. Valid values are the following:

      ENABLED

      ENABLED means that the guardrail is turned on.

      DISABLED

      DISABLED means that the guardrail is turned off.

      See Also:
    • statusAsString

      public final String statusAsString()

      The status of the guardrail. Valid values are the following:

      ENABLED

      ENABLED means that the guardrail is turned on.

      DISABLED

      DISABLED means that the guardrail is turned off.

      If the service returns an enum value that is not available in the current SDK version, status will return ChangeGuardrailStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the guardrail. Valid values are the following:

      ENABLED

      ENABLED means that the guardrail is turned on.

      DISABLED

      DISABLED means that the guardrail is turned off.

      See Also:
    • toBuilder

      public ChangeGuardrail.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ChangeGuardrail.Builder,ChangeGuardrail>
      Returns:
      a builder for type T
    • builder

      public static ChangeGuardrail.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ChangeGuardrail.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.