describeManagedRuleGroup method
Provides high-level information for a managed rule group, including descriptions of the rules.
May throw WAFExpiredManagedRuleGroupVersionException.
May throw WAFInternalErrorException.
May throw WAFInvalidOperationException.
May throw WAFInvalidParameterException.
May throw WAFInvalidResourceException.
May throw WAFNonexistentItemException.
Parameter name :
The name of the managed rule group. You use this, along with the vendor
name, to identify the rule group.
Parameter scope :
Specifies whether this is for a global resource type, such as a Amazon
CloudFront distribution. For an Amplify application, use
CLOUDFRONT.
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.
Parameter vendorName :
The name of the managed rule group vendor. You use this, along with the
rule group name, to identify a rule group.
Parameter 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, WAF uses the vendor's
default version.
Implementation
Future<DescribeManagedRuleGroupResponse> describeManagedRuleGroup({
required String name,
required Scope scope,
required String vendorName,
String? versionName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_20190729.DescribeManagedRuleGroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'Scope': scope.value,
'VendorName': vendorName,
if (versionName != null) 'VersionName': versionName,
},
);
return DescribeManagedRuleGroupResponse.fromJson(jsonResponse.body);
}