listSyncJobs method

Future<ListSyncJobsResponse> listSyncJobs({
  1. required String workspaceId,
  2. int? maxResults,
  3. String? nextToken,
})

List all SyncJobs.

May throw AccessDeniedException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter workspaceId : The ID of the workspace that contains the sync job.

Parameter maxResults : The maximum number of results to return at one time. The default is 50.

Valid Range: Minimum value of 0. Maximum value of 200.

Parameter nextToken : The string that specifies the next page of results.

Implementation

Future<ListSyncJobsResponse> listSyncJobs({
  required String workspaceId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    200,
  );
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/workspaces/${Uri.encodeComponent(workspaceId)}/sync-jobs-list',
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return ListSyncJobsResponse.fromJson(response);
}