Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . wafv2 ]

describe-managed-rule-group

Description

Provides high-level information for a managed rule group, including descriptions of the rules.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  describe-managed-rule-group
--vendor-name <value>
--name <value>
--scope <value>
[--version-name <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--vendor-name (string)

The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.

--name (string)

The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.

--scope (string)

Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1 .
  • API and SDKs - For all calls, use the Region endpoint us-east-1.

Possible values:

  • CLOUDFRONT
  • REGIONAL

--version-name (string)

The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To retrieve the description for a managed rule group

The following describe-managed-rule-group retrieves the description for an AWS managed rule group.

aws wafv2 describe-managed-rule-group \
    --vendor-name AWS \
    --name AWSManagedRulesCommonRuleSet \
    --scope REGIONAL

Output:

{
    "Capacity": 700,
    "Rules": [
        {
            "Name": "NoUserAgent_HEADER",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "UserAgent_BadBots_HEADER",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "SizeRestrictions_QUERYSTRING",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "SizeRestrictions_Cookie_HEADER",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "SizeRestrictions_BODY",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "SizeRestrictions_URIPATH",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "EC2MetaDataSSRF_BODY",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "EC2MetaDataSSRF_COOKIE",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "EC2MetaDataSSRF_URIPATH",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "EC2MetaDataSSRF_QUERYARGUMENTS",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "GenericLFI_QUERYARGUMENTS",
            "Action": {
                "Block": {}
            }
        },
        {
            }
            "Name": "GenericLFI_URIPATH",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "GenericLFI_BODY",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "RestrictedExtensions_URIPATH",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "RestrictedExtensions_QUERYARGUMENTS",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "GenericRFI_QUERYARGUMENTS",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "GenericRFI_BODY",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "GenericRFI_URIPATH",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "CrossSiteScripting_COOKIE",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "CrossSiteScripting_QUERYARGUMENTS",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "CrossSiteScripting_BODY",
            "Action": {
                "Block": {}
            }
        },
        {
            "Name": "CrossSiteScripting_URIPATH",
            "Action": {
                "Block": {}
            }
        }
    ]
}

For more information, see Managed Rule Groups in the AWS WAF, AWS Firewall Manager, and AWS Shield Advanced Developer Guide.

Output

VersionName -> (string)

The managed rule group's version.

SnsTopicArn -> (string)

The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to record changes to the managed rule group. You can subscribe to the SNS topic to receive notifications when the managed rule group is modified, such as for new versions and for version expiration. For more information, see the Amazon Simple Notification Service Developer Guide .

Capacity -> (long)

The web ACL capacity units (WCUs) required for this rule group. WAF uses web ACL capacity units (WCU) to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect each rule's relative cost. Rule group capacity is fixed at creation, so users can plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

Rules -> (list)

(structure)

High-level information about a Rule , returned by operations like DescribeManagedRuleGroup . This provides information like the ID, that you can use to retrieve and manage a RuleGroup , and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule .

Name -> (string)

The name of the rule.

Action -> (structure)

The action that WAF should take on a web request when it matches a rule's statement. Settings at the web ACL level can override the rule action setting.

Block -> (structure)

Instructs WAF to block the web request.

CustomResponse -> (structure)

Defines a custom response for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide .

ResponseCode -> (integer)

The HTTP status code to return to the client.

For a list of status codes that you can use in your custom reqponses, see Supported status codes for custom response in the WAF Developer Guide .

CustomResponseBodyKey -> (string)

References the response body that you want WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first define the response body key and value in the CustomResponseBodies setting for the WebACL or RuleGroup where you want to use it. Then, in the rule action or web ACL default action BlockAction setting, you reference the response body using this key.

ResponseHeaders -> (list)

The HTTP headers to use in the response. Duplicate header names are not allowed.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide .

(structure)

A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling .

Name -> (string)

The name of the custom header.

For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , WAF inserts the header x-amzn-waf-sample .

Value -> (string)

The value of the custom header.

Allow -> (structure)

Instructs WAF to allow the web request.

CustomRequestHandling -> (structure)

Defines custom handling for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide .

InsertHeaders -> (list)

The HTTP headers to insert into the request. Duplicate header names are not allowed.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide .

(structure)

A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling .

Name -> (string)

The name of the custom header.

For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , WAF inserts the header x-amzn-waf-sample .

Value -> (string)

The value of the custom header.

Count -> (structure)

Instructs WAF to count the web request and allow it.

CustomRequestHandling -> (structure)

Defines custom handling for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide .

InsertHeaders -> (list)

The HTTP headers to insert into the request. Duplicate header names are not allowed.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide .

(structure)

A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling .

Name -> (string)

The name of the custom header.

For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , WAF inserts the header x-amzn-waf-sample .

Value -> (string)

The value of the custom header.

Captcha -> (structure)

Instructs WAF to run a CAPTCHA check against the web request.

CustomRequestHandling -> (structure)

Defines custom handling for the web request.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide .

InsertHeaders -> (list)

The HTTP headers to insert into the request. Duplicate header names are not allowed.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide .

(structure)

A custom header for custom request and response handling. This is used in CustomResponse and CustomRequestHandling .

Name -> (string)

The name of the custom header.

For custom request header insertion, when WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , WAF inserts the header x-amzn-waf-sample .

Value -> (string)

The value of the custom header.

LabelNamespace -> (string)

The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.

  • The syntax for the label namespace prefix for a managed rule group is the following: awswaf:managed:<vendor>:<rule group name> :
  • When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon: <label namespace>:<label from rule>

AvailableLabels -> (list)

The labels that one or more rules in this rule group add to matching web requests. These labels are defined in the RuleLabels for a Rule .

(structure)

List of labels used by one or more of the rules of a RuleGroup . This summary object is used for the following rule group lists:

  • AvailableLabels - Labels that rules add to matching requests. These labels are defined in the RuleLabels for a Rule .
  • ConsumedLabels - Labels that rules match against. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

Name -> (string)

An individual label specification.

ConsumedLabels -> (list)

The labels that one or more rules in this rule group match against in label match statements. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

(structure)

List of labels used by one or more of the rules of a RuleGroup . This summary object is used for the following rule group lists:

  • AvailableLabels - Labels that rules add to matching requests. These labels are defined in the RuleLabels for a Rule .
  • ConsumedLabels - Labels that rules match against. These labels are defined in a LabelMatchStatement specification, in the Statement definition of a rule.

Name -> (string)

An individual label specification.