Skip to main content

notebooks

Creates, updates, deletes, gets or lists a notebooks resource.

Overview

Namenotebooks
TypeResource
Idaws.datazone.notebooks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
namestringThe name of the notebook.
created_atstring (date-time)The timestamp of when the notebook was created.
created_bystringThe identifier of the user who created the notebook.
descriptionstringThe description of the notebook.
domain_idstringThe identifier of the Amazon SageMaker Unified Studio domain. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
owning_project_idstringThe identifier of the project that owns the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
statusstringThe status of a notebook in Amazon SageMaker Unified Studio. (ACTIVE, ARCHIVED, SYNC_IN_PROGRESS, SYNC_FAILED)
updated_atstring (date-time)The timestamp of when the notebook was last updated.
updated_bystringThe identifier of the user who last updated the notebook.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_notebooksselectdomain_identifier, owningProjectIdentifier, regionmaxResults, sortOrder, sortBy, status, nextTokenLists notebooks in Amazon SageMaker Unified Studio.
get_notebookselectdomain_identifier, identifier, regionGets the details of a notebook in Amazon SageMaker Unified Studio.
create_notebookinsertdomain_identifier, region, owningProjectIdentifier, nameCreates a notebook in Amazon SageMaker Unified Studio. A notebook is a collaborative document within a project that contains code cells for interactive computing.
update_notebookupdatedomain_identifier, identifier, regionUpdates a notebook in Amazon SageMaker Unified Studio.
delete_notebookdeletedomain_identifier, identifier, regionDeletes a notebook in Amazon SageMaker Unified Studio.
start_notebook_runexecdomain_identifier, region, owningProjectIdentifier, notebookIdentifierStarts 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.
start_notebook_exportexecdomain_identifier, region, notebookIdentifier, owningProjectIdentifier, fileFormatStarts 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.
start_notebook_importexecdomain_identifier, region, owningProjectIdentifier, sourceLocation, nameStarts a notebook import in Amazon SageMaker Unified Studio. This operation imports a notebook from an Amazon Simple Storage Service location into a project.
start_notebook_syncexecdomain_identifier, region, owningProjectIdentifier, sourceLocationStarts a notebook sync in Amazon SageMaker Unified Studio. This operation syncs a notebook from a Git repository into a project.
stop_notebook_runexecdomain_identifier, identifier, regionStops a running notebook run in Amazon SageMaker Unified Studio.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_identifierstringThe identifier of the Amazon SageMaker Unified Studio domain in which the notebook run is stopped.
identifierstringThe identifier of the notebook run to stop.
owningProjectIdentifierstringThe identifier of the project that owns the notebooks.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of notebooks to return in a single call. When the number of notebooks exceeds the value of MaxResults, the response contains a NextToken value.
nextTokenstringWhen the number of notebooks is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of notebooks, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListNotebooks to list the next set of notebooks.
sortBystringThe field to sort the results by.
sortOrderstringThe sort order for the results.
statusstringThe status to filter notebooks by.

SELECT examples

Lists notebooks in Amazon SageMaker Unified Studio.

SELECT
id,
name,
created_at,
created_by,
description,
domain_id,
owning_project_id,
status,
updated_at,
updated_by
FROM aws.datazone.notebooks
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND owningProjectIdentifier = '{{ owningProjectIdentifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND sortOrder = '{{ sortOrder }}'
AND sortBy = '{{ sortBy }}'
AND status = '{{ status }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Creates a notebook in Amazon SageMaker Unified Studio. A notebook is a collaborative document within a project that contains code cells for interactive computing.

INSERT INTO aws.datazone.notebooks (
owningProjectIdentifier,
name,
description,
metadata,
parameters,
clientToken,
domain_identifier,
region
)
SELECT
'{{ owningProjectIdentifier }}' /* required */,
'{{ name }}' /* required */,
'{{ description }}',
'{{ metadata }}',
'{{ parameters }}',
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
name,
cell_order,
compute_id,
created_at,
created_by,
description,
domain_id,
environment_configuration,
error,
git_metadata,
lock_expires_at,
locked_at,
locked_by,
metadata,
owning_project_id,
parameters,
status,
updated_at,
updated_by
;

UPDATE examples

Updates a notebook in Amazon SageMaker Unified Studio.

UPDATE aws.datazone.notebooks
SET
description = '{{ description }}',
status = '{{ status }}',
name = '{{ name }}',
cellOrder = '{{ cellOrder }}',
metadata = '{{ metadata }}',
parameters = '{{ parameters }}',
environmentConfiguration = '{{ environmentConfiguration }}',
clientToken = '{{ clientToken }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
cell_order,
compute_id,
created_at,
created_by,
description,
domain_id,
environment_configuration,
error,
git_metadata,
lock_expires_at,
locked_at,
locked_by,
metadata,
owning_project_id,
parameters,
status,
updated_at,
updated_by;

DELETE examples

Deletes a notebook in Amazon SageMaker Unified Studio.

DELETE FROM aws.datazone.notebooks
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

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.

EXEC aws.datazone.notebooks.start_notebook_run
@domain_identifier='{{ domain_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"owningProjectIdentifier": "{{ owningProjectIdentifier }}",
"notebookIdentifier": "{{ notebookIdentifier }}",
"scheduleIdentifier": "{{ scheduleIdentifier }}",
"computeConfiguration": "{{ computeConfiguration }}",
"networkConfiguration": "{{ networkConfiguration }}",
"timeoutConfiguration": "{{ timeoutConfiguration }}",
"triggerSource": "{{ triggerSource }}",
"metadata": "{{ metadata }}",
"parameters": "{{ parameters }}",
"clientToken": "{{ clientToken }}"
}'
;