describe_managed_rule_group
(**kwargs)¶Provides high-level information for a managed rule group, including descriptions of the rules.
See also: AWS API Documentation
Request Syntax
response = client.describe_managed_rule_group(
VendorName='string',
Name='string',
Scope='CLOUDFRONT'|'REGIONAL',
VersionName='string'
)
[REQUIRED]
The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
[REQUIRED]
The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
[REQUIRED]
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, an AppSync GraphQL API, a Amazon Cognito user pool, or an App Runner service.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
--scope=CLOUDFRONT --region=us-east-1
.dict
Response Syntax
{
'VersionName': 'string',
'SnsTopicArn': 'string',
'Capacity': 123,
'Rules': [
{
'Name': 'string',
'Action': {
'Block': {
'CustomResponse': {
'ResponseCode': 123,
'CustomResponseBodyKey': 'string',
'ResponseHeaders': [
{
'Name': 'string',
'Value': 'string'
},
]
}
},
'Allow': {
'CustomRequestHandling': {
'InsertHeaders': [
{
'Name': 'string',
'Value': 'string'
},
]
}
},
'Count': {
'CustomRequestHandling': {
'InsertHeaders': [
{
'Name': 'string',
'Value': 'string'
},
]
}
},
'Captcha': {
'CustomRequestHandling': {
'InsertHeaders': [
{
'Name': 'string',
'Value': 'string'
},
]
}
},
'Challenge': {
'CustomRequestHandling': {
'InsertHeaders': [
{
'Name': 'string',
'Value': 'string'
},
]
}
}
}
},
],
'LabelNamespace': 'string',
'AvailableLabels': [
{
'Name': 'string'
},
],
'ConsumedLabels': [
{
'Name': 'string'
},
]
}
Response Structure
(dict) --
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 (integer) --
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) --
(dict) --
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 (dict) --
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 (dict) --
Instructs WAF to block the web request.
CustomResponse (dict) --
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 responses, 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.
(dict) --
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 (dict) --
Instructs WAF to allow the web request.
CustomRequestHandling (dict) --
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.
(dict) --
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 (dict) --
Instructs WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.
CustomRequestHandling (dict) --
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.
(dict) --
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 (dict) --
Instructs WAF to run a CAPTCHA
check against the web request.
CustomRequestHandling (dict) --
Defines custom handling for the web request, used when the CAPTCHA
inspection determines that the request's token is valid and unexpired.
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.
(dict) --
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.
Challenge (dict) --
Instructs WAF to run a Challenge
check against the web request.
CustomRequestHandling (dict) --
Defines custom handling for the web request, used when the challenge inspection determines that the request's token is valid and unexpired.
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.
(dict) --
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.
awswaf:managed:<vendor>:<rule group name>
:<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.
(dict) --
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.
(dict) --
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.
Exceptions
WAFV2.Client.exceptions.WAFInternalErrorException
WAFV2.Client.exceptions.WAFInvalidParameterException
WAFV2.Client.exceptions.WAFInvalidResourceException
WAFV2.Client.exceptions.WAFNonexistentItemException
WAFV2.Client.exceptions.WAFInvalidOperationException
WAFV2.Client.exceptions.WAFExpiredManagedRuleGroupVersionException