- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListRuleGroupsCommand
Retrieves the metadata for the rule groups that you have defined. Depending on your setting for max results and the number of rule groups, a single call might not return the full list.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { NetworkFirewallClient, ListRuleGroupsCommand } from "@aws-sdk/client-network-firewall"; // ES Modules import
// const { NetworkFirewallClient, ListRuleGroupsCommand } = require("@aws-sdk/client-network-firewall"); // CommonJS import
const client = new NetworkFirewallClient(config);
const input = { // ListRuleGroupsRequest
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
Scope: "MANAGED" || "ACCOUNT",
ManagedType: "AWS_MANAGED_THREAT_SIGNATURES" || "AWS_MANAGED_DOMAIN_LISTS",
Type: "STATELESS" || "STATEFUL",
};
const command = new ListRuleGroupsCommand(input);
const response = await client.send(command);
// { // ListRuleGroupsResponse
// NextToken: "STRING_VALUE",
// RuleGroups: [ // RuleGroups
// { // RuleGroupMetadata
// Name: "STRING_VALUE",
// Arn: "STRING_VALUE",
// },
// ],
// };
ListRuleGroupsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ManagedType | ResourceManagedType | undefined | Indicates the general category of the Amazon Web Services managed rule group. |
MaxResults | number | undefined | The maximum number of objects that you want Network Firewall to return for this request. If more objects are available, in the response, Network Firewall provides a |
NextToken | string | undefined | When you request a list of objects with a |
Scope | ResourceManagedStatus | undefined | The scope of the request. The default setting of |
Type | RuleGroupType | undefined | Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless rules. If it is stateful, it contains stateful rules. |
ListRuleGroupsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | When you request a list of objects with a |
RuleGroups | RuleGroupMetadata[] | undefined | The rule group metadata objects that you've defined. Depending on your setting for max results and the number of rule groups, this might not be the full list. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request. |
InvalidRequestException | client | The operation failed because of a problem with your request. Examples include:
|
ThrottlingException | client | Unable to process the request due to throttling limitations. |
NetworkFirewallServiceException | Base exception class for all service exceptions from NetworkFirewall service. |