listRotations method
Retrieves a list of on-call rotations.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of items to return for this call. The call also returns
a token that you can specify in a subsequent call to get the next set of
results.
Parameter nextToken :
A token to start the list. Use this token to get the next set of results.
Parameter rotationNamePrefix :
A filter to include rotations in list results based on their common
prefix. For example, entering prod returns a list of all rotation names
that begin with prod, such as production and
prod-1.
Implementation
Future<ListRotationsResult> listRotations({
int? maxResults,
String? nextToken,
String? rotationNamePrefix,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SSMContacts.ListRotations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (rotationNamePrefix != null)
'RotationNamePrefix': rotationNamePrefix,
},
);
return ListRotationsResult.fromJson(jsonResponse.body);
}