Skip to content

aws.wafv2.describe_managed_rule_group

Example SQL Queries

SELECT * FROM
aws.wafv2.describe_managed_rule_group
WHERE
"vendor_name" = 'VALUE'
AND "name" = 'VALUE'
AND "scope" = 'VALUE';

Description

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

Table Definition

Column NameColumn Data Type
name Required Input Column

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

VARCHAR
scope Required Input Column

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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.

VARCHAR
vendor_name Required Input Column

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

VARCHAR
version_name Input Column

The managed rule group's version.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
available_labels

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.

STRUCT(
"name" VARCHAR
)[]
Show child fields
available_labels[]
Show child fields
available_labels[].name

An individual label specification.

capacity

The web ACL capacity units (WCUs) required for this rule group.

WAF uses WCUs 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 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 WAF web ACL capacity units (WCU) in the WAF Developer Guide.

BIGINT
consumed_labels

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.

STRUCT(
"name" VARCHAR
)[]
Show child fields
consumed_labels[]
Show child fields
consumed_labels[].name

An individual label specification.

label_namespace

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>

VARCHAR
rules

STRUCT(
"name" VARCHAR,
"action" STRUCT(
"block" STRUCT(
"custom_response" STRUCT(
"response_code" BIGINT,
"custom_response_body_key" VARCHAR,
"response_headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
)
),
"allow" STRUCT(
"custom_request_handling" STRUCT(
"insert_headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
)
),
"count" STRUCT(
"custom_request_handling" STRUCT(
"insert_headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
)
),
"captcha" STRUCT(
"custom_request_handling" STRUCT(
"insert_headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
)
),
"challenge" STRUCT(
"custom_request_handling" STRUCT(
"insert_headers" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
)
)
)
)[]
Show child fields
rules[]
Show child fields
rules[].action

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.

Show child fields
rules[].action.allow

Instructs WAF to allow the web request.

Show child fields
rules[].action.allow.custom_request_handling

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.

Show child fields
rules[].action.allow.custom_request_handling.insert_headers[]
Show child fields
rules[].action.allow.custom_request_handling.insert_headers[].name

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.

rules[].action.allow.custom_request_handling.insert_headers[].value

The value of the custom header.

rules[].action.block

Instructs WAF to block the web request.

Show child fields
rules[].action.block.custom_response

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.

Show child fields
rules[].action.block.custom_response.custom_response_body_key

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.

rules[].action.block.custom_response.response_code

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.

rules[].action.block.custom_response.response_headers[]
Show child fields
rules[].action.block.custom_response.response_headers[].name

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.

rules[].action.block.custom_response.response_headers[].value

The value of the custom header.

rules[].action.captcha

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

Show child fields
rules[].action.captcha.custom_request_handling

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.

Show child fields
rules[].action.captcha.custom_request_handling.insert_headers[]
Show child fields
rules[].action.captcha.custom_request_handling.insert_headers[].name

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.

rules[].action.captcha.custom_request_handling.insert_headers[].value

The value of the custom header.

rules[].action.challenge

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

Show child fields
rules[].action.challenge.custom_request_handling

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.

Show child fields
rules[].action.challenge.custom_request_handling.insert_headers[]
Show child fields
rules[].action.challenge.custom_request_handling.insert_headers[].name

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.

rules[].action.challenge.custom_request_handling.insert_headers[].value

The value of the custom header.

rules[].action.count

Instructs WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

Show child fields
rules[].action.count.custom_request_handling

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.

Show child fields
rules[].action.count.custom_request_handling.insert_headers[]
Show child fields
rules[].action.count.custom_request_handling.insert_headers[].name

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.

rules[].action.count.custom_request_handling.insert_headers[].value

The value of the custom header.

rules[].name

The name of the rule.

sns_topic_arn

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.

VARCHAR