listRotationOverrides method

Future<ListRotationOverridesResult> listRotationOverrides({
  1. required DateTime endTime,
  2. required String rotationId,
  3. required DateTime startTime,
  4. int? maxResults,
  5. String? nextToken,
})

Retrieves a list of overrides currently specified for an on-call rotation.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter endTime : The date and time for the end of a time range for listing overrides.

Parameter rotationId : The Amazon Resource Name (ARN) of the rotation to retrieve information about.

Parameter startTime : The date and time for the beginning of a time range for listing overrides.

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.

Implementation

Future<ListRotationOverridesResult> listRotationOverrides({
  required DateTime endTime,
  required String rotationId,
  required DateTime startTime,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    1024,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SSMContacts.ListRotationOverrides'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EndTime': unixTimestampToJson(endTime),
      'RotationId': rotationId,
      'StartTime': unixTimestampToJson(startTime),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListRotationOverridesResult.fromJson(jsonResponse.body);
}