getReplicationRuns method

Future<GetReplicationRunsResponse> getReplicationRuns({
  1. required String replicationJobId,
  2. int? maxResults,
  3. String? nextToken,
})

Describes the replication runs for the specified replication job.

May throw InvalidParameterException. May throw MissingRequiredParameterException. May throw UnauthorizedOperationException.

Parameter replicationJobId : The ID of the replication job.

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

Parameter nextToken : The token for the next set of results.

Implementation

Future<GetReplicationRunsResponse> getReplicationRuns({
  required String replicationJobId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(replicationJobId, 'replicationJobId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSServerMigrationService_V2016_10_24.GetReplicationRuns'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'replicationJobId': replicationJobId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetReplicationRunsResponse.fromJson(jsonResponse.body);
}