listOperationEvents method

Future<ListOperationEventsOutput> listOperationEvents({
  1. required String operationId,
  2. List<Filter>? filters,
  3. int? maxResults,
  4. String? nextToken,
})

Returns a list of operations events.

Available parameters include OperationID, as well as optional parameters MaxResults, NextToken, and Filters.

May throw InternalServerException. May throw ValidationException.

Parameter operationId : The ID of the operation.

Parameter filters : Optionally specify filters to narrow the returned operation event items.

Valid filter names include status, resourceID, and resourceType. The valid operator for all three filters is Equals.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

If you do not specify a value for MaxResults, the request returns 50 items per page by default.

Parameter nextToken : The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Implementation

Future<ListOperationEventsOutput> listOperationEvents({
  required String operationId,
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $payload = <String, dynamic>{
    'OperationId': operationId,
    if (filters != null) 'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/list-operation-events',
    exceptionFnMap: _exceptionFns,
  );
  return ListOperationEventsOutput.fromJson(response);
}