ListFirewallRuleDomains
Retrieves the domains of an AutoAllowlist firewall rule. Only the owner of the rule group can call this operation. Results are paginated. Use MaxResults and NextToken to retrieve additional domains.
Identify the rule by FirewallThreatProtectionId to get the domains that DNS Firewall observed in the VPCs that use the rule group, through a rule group association or through a Route 53 Profile that includes the rule group, including VPCs in other accounts. Each domain is returned with its DomainStatus and request counts. Use QueryOptions to filter and sort the results.
Identify the rule's managed domain list by FirewallDomainListId to get the domains that the rule currently allows. For any other domain list, use ListFirewallDomains.
Request Syntax
{
"FirewallDomainListId": "string",
"FirewallRuleGroupId": "string",
"FirewallThreatProtectionId": "string",
"MaxResults": number,
"NextToken": "string",
"QueryOptions": {
"DomainNameFilter": "string",
"DomainStatus": "string",
"SortBy": "string",
"SortOrder": "string"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- FirewallDomainListId
-
The ID of the AutoAllowlist rule's managed domain list. Provide this to list the domains that the rule currently allows.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: No
- FirewallRuleGroupId
-
The unique identifier of the firewall rule group that contains the rule.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: Yes
- FirewallThreatProtectionId
-
The threat protection ID that identifies an AutoAllowlist rule. Provide this to list an AutoAllowlist rule's domains.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: No
- MaxResults
-
The maximum number of domains that you want to return in a single call. If more domains remain than can be returned, the response includes a
NextTokenvalue that you can use in a subsequent call to get the next batch. The default is 100.Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No
- NextToken
-
For the first call to this operation, omit this value. If more domains remain than can be returned in a single call, the response includes a
NextTokenvalue. In your next call, specify that value to get the next batch of domains.Type: String
Required: No
- QueryOptions
-
Optional filters and sort order for the returned domains. If you don't specify this, the operation returns the
OBSERVEDdomains sorted byTIME_ADDEDin descending order. See ListFirewallRuleDomainsQueryOptions.Type: ListFirewallRuleDomainsQueryOptions object
Required: No
Response Syntax
{
"Domains": [
{
"AddedTime": "string",
"DomainName": "string",
"DomainStatus": "string",
"Last24HourRequests": number,
"TotalRequests": number
}
],
"NextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- Domains
-
The domains for the rule. See FirewallRuleDomain.
Type: Array of FirewallRuleDomain objects
- NextToken
-
If more domains remain than were returned in this response, DNS Firewall provides a
NextTokenvalue that you can use in a subsequent call to get the next batch of domains.Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
The current account doesn't have the IAM permissions required to perform the specified Resolver operation.
This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.
HTTP Status Code: 400
- InternalServiceErrorException
-
We encountered an unknown error. Try again in a few minutes.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource doesn't exist.
- ResourceType
-
For a
ResourceNotFoundExceptionerror, the type of resource that doesn't exist.
HTTP Status Code: 400
- ThrottlingException
-
The request was throttled. Try again in a few minutes.
HTTP Status Code: 400
- ValidationException
-
You have provided an invalid command. If you ran the
UpdateFirewallDomainsrequest. supported values areADD,REMOVE, orREPLACEa domain.HTTP Status Code: 400
Examples
ListFirewallRuleDomains Example
This example illustrates one usage of ListFirewallRuleDomains.
Sample Request
POST / HTTP/1.1
Host: route53resolver.us-east-2.amazonaws.com
X-Amz-Target: Route53Resolver.ListFirewallRuleDomains
Content-Type: application/x-amz-json-1.1
{
"FirewallRuleGroupId": "rslvr-frg-abc123",
"FirewallThreatProtectionId": "rslvr-ftp-def456",
"QueryOptions": {
"DomainStatus": "OBSERVED",
"SortBy": "TIME_ADDED",
"SortOrder": "DESC",
"DomainNameFilter": "amazon"
},
"MaxResults": 100
}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.1
{
"Domains": [
{
"DomainName": "photos.s3.us-east-1.amazonaws.com",
"DomainStatus": "OBSERVED",
"Last24HourRequests": 2000,
"TotalRequests": 48000,
"AddedTime": "2026-06-09T14:00:00Z"
}
]
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: