DescribeManagedRuleGroup
Provides high-level information for a managed rule group, including descriptions of the rules.
Request Syntax
{
"Name": "string
",
"Scope": "string
",
"VendorName": "string
",
"VersionName": "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.
- Name
-
The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
^[\w\-]+$
Required: Yes
- Scope
-
Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution.
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.
Type: String
Valid Values:
CLOUDFRONT | REGIONAL
Required: Yes
-
- VendorName
-
The name of the managed rule group vendor. You use this, along with the rule group name, to identify a rule group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
.*\S.*
Required: Yes
- VersionName
-
The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, AWS WAF uses the vendor's default version.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[\w#:\.\-/]+$
Required: No
Response Syntax
{
"AvailableLabels": [
{
"Name": "string"
}
],
"Capacity": number,
"ConsumedLabels": [
{
"Name": "string"
}
],
"LabelNamespace": "string",
"Rules": [
{
"Action": {
"Allow": {
"CustomRequestHandling": {
"InsertHeaders": [
{
"Name": "string",
"Value": "string"
}
]
}
},
"Block": {
"CustomResponse": {
"CustomResponseBodyKey": "string",
"ResponseCode": number,
"ResponseHeaders": [
{
"Name": "string",
"Value": "string"
}
]
}
},
"Captcha": {
"CustomRequestHandling": {
"InsertHeaders": [
{
"Name": "string",
"Value": "string"
}
]
}
},
"Challenge": {
"CustomRequestHandling": {
"InsertHeaders": [
{
"Name": "string",
"Value": "string"
}
]
}
},
"Count": {
"CustomRequestHandling": {
"InsertHeaders": [
{
"Name": "string",
"Value": "string"
}
]
}
}
},
"Name": "string"
}
],
"SnsTopicArn": "string",
"VersionName": "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.
- AvailableLabels
-
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.Type: Array of LabelSummary objects
- Capacity
-
The web ACL capacity units (WCUs) required for this rule group.
AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. For more information, see AWS WAF web ACL capacity units (WCU) in the AWS WAF Developer Guide.
Type: Long
Valid Range: Minimum value of 1.
- ConsumedLabels
-
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.Type: Array of LabelSummary objects
- LabelNamespace
-
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, AWS 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>
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
Pattern:
^[0-9A-Za-z_\-:]+$
-
- Rules
-
Type: Array of RuleSummary objects
- SnsTopicArn
-
The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to provide notification of 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.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
.*\S.*
- VersionName
-
The managed rule group's version.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[\w#:\.\-/]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- WAFExpiredManagedRuleGroupVersionException
-
The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.
HTTP Status Code: 400
- WAFInternalErrorException
-
Your request is valid, but AWS WAF couldn’t perform the operation because of a system problem. Retry your request.
HTTP Status Code: 500
- WAFInvalidOperationException
-
The operation isn't valid.
HTTP Status Code: 400
- WAFInvalidParameterException
-
The operation failed because AWS WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
HTTP Status Code: 400
-
- WAFInvalidResourceException
-
AWS WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.
HTTP Status Code: 400
- WAFNonexistentItemException
-
AWS WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: