listSyncResources method
Lists the sync resources.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter syncSource :
The sync source.
Parameter workspaceId :
The ID of the workspace that contains the sync job.
Parameter filters :
A list of objects that filter the request.
The following filter combinations are supported:
- Filter with state
- Filter with ResourceType and ResourceId
- Filter with ResourceType and ExternalId
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<ListSyncResourcesResponse> listSyncResources({
required String syncSource,
required String workspaceId,
List<SyncResourceFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
200,
);
final $payload = <String, dynamic>{
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:
'/workspaces/${Uri.encodeComponent(workspaceId)}/sync-jobs/${Uri.encodeComponent(syncSource)}/resources-list',
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return ListSyncResourcesResponse.fromJson(response);
}