describeRuleGroupMetadata method

Future<DescribeRuleGroupMetadataResponse> describeRuleGroupMetadata({
  1. String? ruleGroupArn,
  2. String? ruleGroupName,
  3. RuleGroupType? type,
})

High-level information about a rule group, returned by operations like create and describe. You can use the information provided in the metadata to retrieve and manage a rule group. You can retrieve all objects for a rule group by calling DescribeRuleGroup.

May throw InternalServerError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter ruleGroupArn : The descriptive name of the rule group. You can't change the name of a rule group after you create it.

You must specify the ARN or the name, and you can specify both.

Parameter ruleGroupName : The descriptive name of the rule group. You can't change the name of a rule group after you create it.

You must specify the ARN or the name, and you can specify both.

Parameter type : Indicates whether the rule group is stateless or stateful. If the rule group is stateless, it contains stateless rules. If it is stateful, it contains stateful rules.

Implementation

Future<DescribeRuleGroupMetadataResponse> describeRuleGroupMetadata({
  String? ruleGroupArn,
  String? ruleGroupName,
  RuleGroupType? type,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.DescribeRuleGroupMetadata'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (ruleGroupArn != null) 'RuleGroupArn': ruleGroupArn,
      if (ruleGroupName != null) 'RuleGroupName': ruleGroupName,
      if (type != null) 'Type': type.value,
    },
  );

  return DescribeRuleGroupMetadataResponse.fromJson(jsonResponse.body);
}