createSyncJob method
This action creates a SyncJob.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter syncRole :
The SyncJob IAM role. This IAM role is used by the SyncJob to read from
the syncSource, and create, update, or delete the corresponding resources.
Parameter syncSource :
The sync source.
Parameter workspaceId :
The workspace ID.
Parameter tags :
The SyncJob tags.
Implementation
Future<CreateSyncJobResponse> createSyncJob({
required String syncRole,
required String syncSource,
required String workspaceId,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'syncRole': syncRole,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/sync-jobs/${Uri.encodeComponent(syncSource)}',
exceptionFnMap: _exceptionFns,
);
return CreateSyncJobResponse.fromJson(response);
}