@Generated(value="jsii-pacmak/1.62.0 (build 293ac17)", date="2022-07-30T00:01:30.889Z") @Stability(value=Experimental) public abstract class DnsBlockResponse extends software.amazon.jsii.JsiiObject
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());
| Modifier | Constructor and Description |
|---|---|
protected |
DnsBlockResponse() |
protected |
DnsBlockResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DnsBlockResponse(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getBlockOverrideDnsType()
(experimental) The DNS record's type.
|
abstract String |
getBlockOverrideDomain()
(experimental) The custom DNS record to send back in response to the query.
|
abstract Duration |
getBlockOverrideTtl()
(experimental) The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
|
abstract String |
getBlockResponse()
(experimental) The way that you want DNS Firewall to block the request.
|
static DnsBlockResponse |
noData()
(experimental) Respond indicating that the query was successful, but no response is available for it.
|
static DnsBlockResponse |
nxDomain()
(experimental) Respond indicating that the domain name that's in the query doesn't exist.
|
static DnsBlockResponse |
override(String domain)
(experimental) Provides a custom override response to the query.
|
static DnsBlockResponse |
override(String domain,
Duration ttl)
(experimental) Provides a custom override response to the query.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected DnsBlockResponse(software.amazon.jsii.JsiiObjectRef objRef)
protected DnsBlockResponse(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) protected DnsBlockResponse()
@Stability(value=Experimental) @NotNull public static DnsBlockResponse noData()
@Stability(value=Experimental) @NotNull public static DnsBlockResponse nxDomain()
@Stability(value=Experimental) @NotNull public static DnsBlockResponse override(@NotNull String domain, @Nullable Duration ttl)
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.@Stability(value=Experimental) @NotNull public static DnsBlockResponse override(@NotNull String domain)
domain - The custom DNS record to send back in response to the query. This parameter is required.@Stability(value=Experimental) @Nullable public abstract String getBlockOverrideDnsType()
@Stability(value=Experimental) @Nullable public abstract String getBlockOverrideDomain()
@Stability(value=Experimental) @Nullable public abstract Duration getBlockOverrideTtl()
@Stability(value=Experimental) @Nullable public abstract String getBlockResponse()
Copyright © 2022. All rights reserved.