DeleteRuleGroupCommand

Deletes the specified RuleGroup.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { NetworkFirewallClient, DeleteRuleGroupCommand } from "@aws-sdk/client-network-firewall"; // ES Modules import
// const { NetworkFirewallClient, DeleteRuleGroupCommand } = require("@aws-sdk/client-network-firewall"); // CommonJS import
const client = new NetworkFirewallClient(config);
const input = { // DeleteRuleGroupRequest
  RuleGroupName: "STRING_VALUE",
  RuleGroupArn: "STRING_VALUE",
  Type: "STATELESS" || "STATEFUL",
};
const command = new DeleteRuleGroupCommand(input);
const response = await client.send(command);
// { // DeleteRuleGroupResponse
//   RuleGroupResponse: { // RuleGroupResponse
//     RuleGroupArn: "STRING_VALUE", // required
//     RuleGroupName: "STRING_VALUE", // required
//     RuleGroupId: "STRING_VALUE", // required
//     Description: "STRING_VALUE",
//     Type: "STATELESS" || "STATEFUL",
//     Capacity: Number("int"),
//     RuleGroupStatus: "ACTIVE" || "DELETING" || "ERROR",
//     Tags: [ // TagList
//       { // Tag
//         Key: "STRING_VALUE", // required
//         Value: "STRING_VALUE", // required
//       },
//     ],
//     ConsumedCapacity: Number("int"),
//     NumberOfAssociations: Number("int"),
//     EncryptionConfiguration: { // EncryptionConfiguration
//       KeyId: "STRING_VALUE",
//       Type: "CUSTOMER_KMS" || "AWS_OWNED_KMS_KEY", // required
//     },
//     SourceMetadata: { // SourceMetadata
//       SourceArn: "STRING_VALUE",
//       SourceUpdateToken: "STRING_VALUE",
//     },
//     SnsTopic: "STRING_VALUE",
//     LastModifiedTime: new Date("TIMESTAMP"),
//     AnalysisResults: [ // AnalysisResultList
//       { // AnalysisResult
//         IdentifiedRuleIds: [ // RuleIdList
//           "STRING_VALUE",
//         ],
//         IdentifiedType: "STATELESS_RULE_FORWARDING_ASYMMETRICALLY" || "STATELESS_RULE_CONTAINS_TCP_FLAGS",
//         AnalysisDetail: "STRING_VALUE",
//       },
//     ],
//   },
// };

DeleteRuleGroupCommand Input

See DeleteRuleGroupCommandInput for more details

Parameter
Type
Description
RuleGroupArn
string | undefined

The Amazon Resource Name (ARN) of the rule group.

You must specify the ARN or the name, and you can specify both.

RuleGroupName
string | undefined

The descriptive name of the rule group. You can't change the name of a rule group after you create it.

You must specify the ARN or the name, and you can specify both.

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.

This setting is required for requests that do not include the RuleGroupARN.

DeleteRuleGroupCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
RuleGroupResponse
Required
RuleGroupResponse | undefined

The high-level properties of a rule group. This, along with the RuleGroup, define the rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup.

Throws

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.

InvalidOperationException
client

The operation failed because it's not valid. For example, you might have tried to delete a rule group or firewall policy that's in use.

InvalidRequestException
client

The operation failed because of a problem with your request. Examples include:

  • You specified an unsupported parameter name or value.

  • You tried to update a property with a value that isn't among the available types.

  • Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.

ResourceNotFoundException
client

Unable to locate a resource using the parameters that you provided.

ThrottlingException
client

Unable to process the request due to throttling limitations.

UnsupportedOperationException
client

The operation you requested isn't supported by Network Firewall.

NetworkFirewallServiceException
Base exception class for all service exceptions from NetworkFirewall service.