startNotebookRun method
- required String domainIdentifier,
- required String notebookIdentifier,
- required String owningProjectIdentifier,
- String? clientToken,
- ComputeConfig? computeConfiguration,
- Map<
String, String> ? metadata, - NetworkConfig? networkConfiguration,
- Map<
String, String> ? parameters, - String? scheduleIdentifier,
- TimeoutConfig? timeoutConfiguration,
- TriggerSource? triggerSource,
Starts a notebook run in Amazon SageMaker Unified Studio. A notebook run represents the execution of an Amazon SageMaker notebook within a project. You can configure compute, network, timeout, and environment settings for the run.
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 the
notebook run is started.
Parameter notebookIdentifier :
The identifier of the notebook to run.
Parameter owningProjectIdentifier :
The identifier of the project that owns the notebook run.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is automatically populated if not provided.
Parameter computeConfiguration :
The compute configuration for the notebook run, including instance type
and environment version.
Parameter metadata :
The metadata for the notebook run, specified as key-value pairs. You can
specify up to 50 entries, with keys up to 128 characters and values up to
1024 characters.
Parameter networkConfiguration :
The network configuration for the notebook run, including network access
type and optional VPC settings.
Parameter parameters :
The sensitive parameters for the notebook run, specified as key-value
pairs. You can specify up to 50 entries, with keys up to 128 characters
and values up to 1024 characters.
Parameter scheduleIdentifier :
The identifier of the schedule associated with the notebook run.
Parameter timeoutConfiguration :
The timeout configuration for the notebook run. The default timeout is 720
minutes (12 hours) and the maximum is 1440 minutes (24 hours).
Parameter triggerSource :
The source that triggered the notebook run.
Implementation
Future<StartNotebookRunOutput> startNotebookRun({
required String domainIdentifier,
required String notebookIdentifier,
required String owningProjectIdentifier,
String? clientToken,
ComputeConfig? computeConfiguration,
Map<String, String>? metadata,
NetworkConfig? networkConfiguration,
Map<String, String>? parameters,
String? scheduleIdentifier,
TimeoutConfig? timeoutConfiguration,
TriggerSource? triggerSource,
}) async {
final $payload = <String, dynamic>{
'notebookIdentifier': notebookIdentifier,
'owningProjectIdentifier': owningProjectIdentifier,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (computeConfiguration != null)
'computeConfiguration': computeConfiguration,
if (metadata != null) 'metadata': metadata,
if (networkConfiguration != null)
'networkConfiguration': networkConfiguration,
if (parameters != null) 'parameters': parameters,
if (scheduleIdentifier != null) 'scheduleIdentifier': scheduleIdentifier,
if (timeoutConfiguration != null)
'timeoutConfiguration': timeoutConfiguration,
if (triggerSource != null) 'triggerSource': triggerSource,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notebook-runs',
exceptionFnMap: _exceptionFns,
);
return StartNotebookRunOutput.fromJson(response);
}