startNotebookSync method
Starts a notebook sync in Amazon SageMaker Unified Studio. This operation syncs a notebook from a Git repository into a project.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon SageMaker Unified Studio domain in which to
sync the notebook.
Parameter owningProjectIdentifier :
The identifier of the project that will own the synced notebook.
Parameter sourceLocation :
The source location of the notebook to sync. This specifies the Amazon
Simple Storage Service URI of the notebook file.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is automatically populated if not provided.
Parameter description :
The description of the notebook.
Parameter gitMetadata :
The Git metadata for the notebook sync, including repository, branch, and
commit information.
Parameter name :
The name of the notebook. The name must be between 1 and 256 characters.
Parameter notebookId :
The identifier of an existing notebook to sync. If not specified, a new
notebook is created.
Implementation
Future<StartNotebookSyncOutput> startNotebookSync({
required String domainIdentifier,
required String owningProjectIdentifier,
required SourceLocation sourceLocation,
String? clientToken,
String? description,
GitMetadata? gitMetadata,
String? name,
String? notebookId,
}) async {
final $payload = <String, dynamic>{
'owningProjectIdentifier': owningProjectIdentifier,
'sourceLocation': sourceLocation,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (gitMetadata != null) 'gitMetadata': gitMetadata,
if (name != null) 'name': name,
if (notebookId != null) 'notebookId': notebookId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notebook-syncs',
exceptionFnMap: _exceptionFns,
);
return StartNotebookSyncOutput.fromJson(response);
}