We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.
Protected
Creates a single DNS Firewall rule in the specified rule group, using the specified domain list.
Use a bare-bones client and the command you need to make an API call.
import { Route53ResolverClient, CreateFirewallRuleCommand } from "@aws-sdk/client-route53resolver"; // ES Modules import// const { Route53ResolverClient, CreateFirewallRuleCommand } = require("@aws-sdk/client-route53resolver"); // CommonJS importconst client = new Route53ResolverClient(config);const input = { // CreateFirewallRuleRequest CreatorRequestId: "STRING_VALUE", // required FirewallRuleGroupId: "STRING_VALUE", // required FirewallDomainListId: "STRING_VALUE", // required Priority: Number("int"), // required Action: "ALLOW" || "BLOCK" || "ALERT", // required BlockResponse: "NODATA" || "NXDOMAIN" || "OVERRIDE", BlockOverrideDomain: "STRING_VALUE", BlockOverrideDnsType: "CNAME", BlockOverrideTtl: Number("int"), Name: "STRING_VALUE", // required};const command = new CreateFirewallRuleCommand(input);const response = await client.send(command);// { // CreateFirewallRuleResponse// FirewallRule: { // FirewallRule// FirewallRuleGroupId: "STRING_VALUE",// FirewallDomainListId: "STRING_VALUE",// Name: "STRING_VALUE",// Priority: Number("int"),// Action: "ALLOW" || "BLOCK" || "ALERT",// BlockResponse: "NODATA" || "NXDOMAIN" || "OVERRIDE",// BlockOverrideDomain: "STRING_VALUE",// BlockOverrideDnsType: "CNAME",// BlockOverrideTtl: Number("int"),// CreatorRequestId: "STRING_VALUE",// CreationTime: "STRING_VALUE",// ModificationTime: "STRING_VALUE",// },// };
CreateFirewallRuleCommandInput
CreateFirewallRuleCommandOutput
input
response
config
AccessDeniedException (client fault)
The current account doesn't have the IAM permissions required to perform the specified Resolver operation.
InternalServiceErrorException (client fault)
We encountered an unknown error. Try again in a few minutes.
LimitExceededException (client fault)
The request caused one or more limits to be exceeded.
ResourceNotFoundException (client fault)
The specified resource doesn't exist.
ThrottlingException (client fault)
The request was throttled. Try again in a few minutes.
ValidationException (client fault)
You have provided an invalid command. Supported values are ADD, REMOVE, or REPLACE a domain.
ADD
REMOVE
REPLACE
Route53ResolverServiceException
Base exception class for all service exceptions from Route53Resolver service.
Readonly
Static
Creates a single DNS Firewall rule in the specified rule group, using the specified domain list.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateFirewallRuleCommandInput
Returns
CreateFirewallRuleCommandOutput
See
input
shape.response
shape.config
shape.Throws
AccessDeniedException (client fault)
The current account doesn't have the IAM permissions required to perform the specified Resolver operation.
Throws
InternalServiceErrorException (client fault)
We encountered an unknown error. Try again in a few minutes.
Throws
LimitExceededException (client fault)
The request caused one or more limits to be exceeded.
Throws
ResourceNotFoundException (client fault)
The specified resource doesn't exist.
Throws
ThrottlingException (client fault)
The request was throttled. Try again in a few minutes.
Throws
ValidationException (client fault)
You have provided an invalid command. Supported values are
ADD
,REMOVE
, orREPLACE
a domain.Throws
Route53ResolverServiceException
Base exception class for all service exceptions from Route53Resolver service.