getRuleSet method

Future<GetRuleSetResponse> getRuleSet({
  1. required String ruleSetId,
})

Fetch attributes of a rule set.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter ruleSetId : The identifier of an existing rule set to be retrieved.

Implementation

Future<GetRuleSetResponse> getRuleSet({
  required String ruleSetId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.GetRuleSet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RuleSetId': ruleSetId,
    },
  );

  return GetRuleSetResponse.fromJson(jsonResponse.body);
}