updateNotebook method

Future<UpdateNotebookOutput> updateNotebook({
  1. required String domainIdentifier,
  2. required String identifier,
  3. List<CellInformation>? cellOrder,
  4. String? clientToken,
  5. String? description,
  6. EnvironmentConfig? environmentConfiguration,
  7. Map<String, String>? metadata,
  8. String? name,
  9. Map<String, String>? parameters,
  10. NotebookStatus? status,
})

Updates a notebook in Amazon SageMaker Unified Studio.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.

Parameter identifier : The identifier of the notebook to update.

Parameter cellOrder : The updated ordered list of cells in the notebook.

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

Parameter description : The updated description of the notebook.

Parameter environmentConfiguration : The updated environment configuration for the notebook.

Parameter metadata : The updated metadata for the notebook, specified as key-value pairs.

Parameter name : The updated name of the notebook.

Parameter parameters : The updated sensitive parameters for the notebook, specified as key-value pairs.

Parameter status : The updated status of the notebook.

Implementation

Future<UpdateNotebookOutput> updateNotebook({
  required String domainIdentifier,
  required String identifier,
  List<CellInformation>? cellOrder,
  String? clientToken,
  String? description,
  EnvironmentConfig? environmentConfiguration,
  Map<String, String>? metadata,
  String? name,
  Map<String, String>? parameters,
  NotebookStatus? status,
}) async {
  final $payload = <String, dynamic>{
    if (cellOrder != null) 'cellOrder': cellOrder,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (environmentConfiguration != null)
      'environmentConfiguration': environmentConfiguration,
    if (metadata != null) 'metadata': metadata,
    if (name != null) 'name': name,
    if (parameters != null) 'parameters': parameters,
    if (status != null) 'status': status.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notebooks/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateNotebookOutput.fromJson(response);
}