startNotebookExport method

Future<StartNotebookExportOutput> startNotebookExport({
  1. required String domainIdentifier,
  2. required FileFormat fileFormat,
  3. required String notebookIdentifier,
  4. required String owningProjectIdentifier,
  5. String? clientToken,
})

Starts a notebook export in Amazon SageMaker Unified Studio. This operation exports a notebook to a specified file format and stores the output in Amazon Simple Storage Service.

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 export the notebook.

Parameter fileFormat : The file format for the notebook export. Valid values are PDF and IPYNB.

Parameter notebookIdentifier : The identifier of the notebook to export.

Parameter owningProjectIdentifier : The identifier of the project that owns the notebook.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

Implementation

Future<StartNotebookExportOutput> startNotebookExport({
  required String domainIdentifier,
  required FileFormat fileFormat,
  required String notebookIdentifier,
  required String owningProjectIdentifier,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'fileFormat': fileFormat.value,
    'notebookIdentifier': notebookIdentifier,
    'owningProjectIdentifier': owningProjectIdentifier,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notebook-exports',
    exceptionFnMap: _exceptionFns,
  );
  return StartNotebookExportOutput.fromJson(response);
}