@aws-cdk_aws-route53resolver-alpha.DnsBlockResponse

class DnsBlockResponse ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Route53Resolver.Alpha.DnsBlockResponse
Gogithub.com/aws/aws-cdk-go/awscdkroute53resolveralpha/v2#DnsBlockResponse
Javasoftware.amazon.awscdk.services.route53resolver.alpha.DnsBlockResponse
Pythonaws_cdk.aws_route53resolver_alpha.DnsBlockResponse
TypeScript (source)@aws-cdk/aws-route53resolver-alpha ยป DnsBlockResponse

The way that you want DNS Firewall to block the request.

Example

declare const myBlockList: route53resolver.FirewallDomainList;
declare const ruleGroup: route53resolver.FirewallRuleGroup;

ruleGroup.addRule({
  priority: 10,
  firewallDomainList: myBlockList,
  // block and reply with NXDOMAIN
  action: route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.nxDomain()),
});

ruleGroup.addRule({
  priority: 20,
  firewallDomainList: myBlockList,
  // block and override DNS response with a custom domain
  action: route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.override('amazon.com')),
});

Initializer

new DnsBlockResponse()

Properties

NameTypeDescription
blockOverrideDnsType?๐Ÿ”นstringThe DNS record's type.
blockOverrideDomain?๐Ÿ”นstringThe custom DNS record to send back in response to the query.
blockOverrideTtl?๐Ÿ”นDurationThe recommended amount of time for the DNS resolver or web browser to cache the provided override record.
blockResponse?๐Ÿ”นstringThe way that you want DNS Firewall to block the request.

blockOverrideDnsType?๐Ÿ”น

Type: string (optional)

The DNS record's type.


blockOverrideDomain?๐Ÿ”น

Type: string (optional)

The custom DNS record to send back in response to the query.


blockOverrideTtl?๐Ÿ”น

Type: Duration (optional)

The recommended amount of time for the DNS resolver or web browser to cache the provided override record.


blockResponse?๐Ÿ”น

Type: string (optional)

The way that you want DNS Firewall to block the request.

Methods

NameDescription
static noData()๐Ÿ”นRespond indicating that the query was successful, but no response is available for it.
static nxDomain()๐Ÿ”นRespond indicating that the domain name that's in the query doesn't exist.
static override(domain, ttl?)๐Ÿ”นProvides a custom override response to the query.

static noData()๐Ÿ”น

public static noData(): DnsBlockResponse

Returns

  • DnsBlockResponse

Respond indicating that the query was successful, but no response is available for it.


static nxDomain()๐Ÿ”น

public static nxDomain(): DnsBlockResponse

Returns

  • DnsBlockResponse

Respond indicating that the domain name that's in the query doesn't exist.


static override(domain, ttl?)๐Ÿ”น

public static override(domain: string, ttl?: Duration): DnsBlockResponse

Parameters

  • domain 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

  • DnsBlockResponse

Provides a custom override response to the query.