Class DnsBlockResponse

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.route53resolver.DnsBlockResponse
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.403Z") @Stability(Experimental) public abstract class DnsBlockResponse extends software.amazon.jsii.JsiiObject
(experimental) The way that you want DNS Firewall to block the request.

Example:

 FirewallDomainList myBlockList;
 FirewallRuleGroup ruleGroup;
 ruleGroup.addRule(FirewallRule.builder()
         .priority(10)
         .firewallDomainList(myBlockList)
         // block and reply with NXDOMAIN
         .action(FirewallRuleAction.block(DnsBlockResponse.nxDomain()))
         .build());
 ruleGroup.addRule(FirewallRule.builder()
         .priority(20)
         .firewallDomainList(myBlockList)
         // block and override DNS response with a custom domain
         .action(FirewallRuleAction.block(DnsBlockResponse.override("amazon.com")))
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    DnsBlockResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DnsBlockResponse(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract String
    (experimental) The DNS record's type.
    abstract String
    (experimental) The custom DNS record to send back in response to the query.
    abstract Duration
    (experimental) The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
    abstract String
    (experimental) The way that you want DNS Firewall to block the request.
    (experimental) Respond indicating that the query was successful, but no response is available for it.
    (experimental) Respond indicating that the domain name that's in the query doesn't exist.
    override(String domain)
    (experimental) Provides a custom override response to the query.
    override(String domain, Duration ttl)
    (experimental) Provides a custom override response to the query.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • DnsBlockResponse

      protected DnsBlockResponse(software.amazon.jsii.JsiiObjectRef objRef)
    • DnsBlockResponse

      protected DnsBlockResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • DnsBlockResponse

      @Stability(Experimental) protected DnsBlockResponse()
  • Method Details

    • noData

      @Stability(Experimental) @NotNull public static DnsBlockResponse noData()
      (experimental) Respond indicating that the query was successful, but no response is available for it.
    • nxDomain

      @Stability(Experimental) @NotNull public static DnsBlockResponse nxDomain()
      (experimental) Respond indicating that the domain name that's in the query doesn't exist.
    • override

      @Stability(Experimental) @NotNull public static DnsBlockResponse override(@NotNull String domain, @Nullable Duration ttl)
      (experimental) Provides a custom override response to the query.

      Parameters:
      domain - The custom DNS record to send back in response to the query. This parameter is required.
      ttl - The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
    • override

      @Stability(Experimental) @NotNull public static DnsBlockResponse override(@NotNull String domain)
      (experimental) Provides a custom override response to the query.

      Parameters:
      domain - The custom DNS record to send back in response to the query. This parameter is required.
    • getBlockOverrideDnsType

      @Stability(Experimental) @Nullable public abstract String getBlockOverrideDnsType()
      (experimental) The DNS record's type.
    • getBlockOverrideDomain

      @Stability(Experimental) @Nullable public abstract String getBlockOverrideDomain()
      (experimental) The custom DNS record to send back in response to the query.
    • getBlockOverrideTtl

      @Stability(Experimental) @Nullable public abstract Duration getBlockOverrideTtl()
      (experimental) The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
    • getBlockResponse

      @Stability(Experimental) @Nullable public abstract String getBlockResponse()
      (experimental) The way that you want DNS Firewall to block the request.