Class DnsBlockResponse
(experimental) The way that you want DNS Firewall to block the request.
Inheritance
Namespace: Amazon.CDK.AWS.Route53Resolver
Assembly: Amazon.CDK.AWS.Route53Resolver.dll
Syntax (csharp)
public abstract class DnsBlockResponse : DeputyBase
Syntax (vb)
Public MustInherit Class DnsBlockResponse
Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
FirewallDomainList myBlockList;
FirewallRuleGroup ruleGroup;
ruleGroup.AddRule(new FirewallRule {
Priority = 10,
FirewallDomainList = myBlockList,
// block and reply with NXDOMAIN
Action = FirewallRuleAction.Block(DnsBlockResponse.NxDomain())
});
ruleGroup.AddRule(new FirewallRule {
Priority = 20,
FirewallDomainList = myBlockList,
// block and override DNS response with a custom domain
Action = FirewallRuleAction.Block(DnsBlockResponse.Override("amazon.com"))
});
Synopsis
Constructors
DnsBlockResponse() | |
DnsBlockResponse(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DnsBlockResponse(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
BlockOverrideDnsType | (experimental) The DNS record's type. |
BlockOverrideDomain | (experimental) The custom DNS record to send back in response to the query. |
BlockOverrideTtl | (experimental) The recommended amount of time for the DNS resolver or web browser to cache the provided override record. |
BlockResponse | (experimental) The way that you want DNS Firewall to block the request. |
Methods
NoData() | (experimental) Respond indicating that the query was successful, but no response is available for it. |
NxDomain() | (experimental) Respond indicating that the domain name that's in the query doesn't exist. |
Override(String, Duration) | (experimental) Provides a custom override response to the query. |
Constructors
DnsBlockResponse()
protected DnsBlockResponse()
Remarks
Stability: Experimental
DnsBlockResponse(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DnsBlockResponse(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DnsBlockResponse(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DnsBlockResponse(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
BlockOverrideDnsType
(experimental) The DNS record's type.
public abstract string BlockOverrideDnsType { get; }
Property Value
System.String
Remarks
Stability: Experimental
BlockOverrideDomain
(experimental) The custom DNS record to send back in response to the query.
public abstract string BlockOverrideDomain { get; }
Property Value
System.String
Remarks
Stability: Experimental
BlockOverrideTtl
(experimental) The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
public abstract Duration BlockOverrideTtl { get; }
Property Value
Remarks
Stability: Experimental
BlockResponse
(experimental) The way that you want DNS Firewall to block the request.
public abstract string BlockResponse { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
NoData()
(experimental) Respond indicating that the query was successful, but no response is available for it.
public static DnsBlockResponse NoData()
Returns
Remarks
Stability: Experimental
NxDomain()
(experimental) Respond indicating that the domain name that's in the query doesn't exist.
public static DnsBlockResponse NxDomain()
Returns
Remarks
Stability: Experimental
Override(String, Duration)
(experimental) Provides a custom override response to the query.
public static DnsBlockResponse Override(string domain, Duration ttl = null)
Parameters
- domain System.String
The custom DNS record to send back in response to the query.
- ttl Duration
The recommended amount of time for the DNS resolver or web browser to cache the provided override record.
Returns
Remarks
Stability: Experimental