listTrafficPolicies method
List traffic policy resources.
May throw ValidationException.
Parameter nextToken :
If you received a pagination token from a previous call to this API, you
can provide it here to continue paginating through the next page of
results.
Parameter pageSize :
The maximum number of traffic policy resources that are returned per call.
You can use NextToken to obtain further traffic policies.
Implementation
Future<ListTrafficPoliciesResponse> listTrafficPolicies({
String? nextToken,
int? pageSize,
}) async {
_s.validateNumRange(
'pageSize',
pageSize,
1,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'MailManagerSvc.ListTrafficPolicies'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (nextToken != null) 'NextToken': nextToken,
if (pageSize != null) 'PageSize': pageSize,
},
);
return ListTrafficPoliciesResponse.fromJson(jsonResponse.body);
}