describeManagedRuleGroup method

Future<DescribeManagedRuleGroupResponse> describeManagedRuleGroup({
  1. required String name,
  2. required Scope scope,
  3. required String vendorName,
})
Provides high-level information for a managed rule group, including descriptions of the rules.

May throw WAFInternalErrorException. May throw WAFInvalidParameterException. May throw WAFInvalidResourceException. May throw WAFNonexistentItemException. May throw WAFInvalidOperationException.

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 an AWS CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an 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.

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

Implementation

Future<DescribeManagedRuleGroupResponse> describeManagedRuleGroup({
  required String name,
  required Scope scope,
  required String vendorName,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(scope, 'scope');
  ArgumentError.checkNotNull(vendorName, 'vendorName');
  _s.validateStringLength(
    'vendorName',
    vendorName,
    1,
    128,
    isRequired: true,
  );
  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.toValue(),
      'VendorName': vendorName,
    },
  );

  return DescribeManagedRuleGroupResponse.fromJson(jsonResponse.body);
}