notebooks
Creates, updates, deletes, gets or lists a notebooks resource.
Overview
| Name | notebooks |
| Type | Resource |
| Id | aws.datazone.notebooks |
Fields
The following fields are returned by SELECT queries:
- list_notebooks
- get_notebook
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the notebook. |
created_at | string (date-time) | The timestamp of when the notebook was created. |
created_by | string | The identifier of the user who created the notebook. |
description | string | The description of the notebook. |
domain_id | string | The identifier of the Amazon SageMaker Unified Studio domain. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
owning_project_id | string | The identifier of the project that owns the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
status | string | The status of a notebook in Amazon SageMaker Unified Studio. (ACTIVE, ARCHIVED, SYNC_IN_PROGRESS, SYNC_FAILED) |
updated_at | string (date-time) | The timestamp of when the notebook was last updated. |
updated_by | string | The identifier of the user who last updated the notebook. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the notebook. |
cell_order | array | The ordered list of cells in the notebook. |
compute_id | string | The identifier of the compute associated with the notebook. |
created_at | string (date-time) | The timestamp of when the notebook was created. |
created_by | string | The identifier of the user who created the notebook. |
description | string | The description of the notebook. |
domain_id | string | The identifier of the Amazon SageMaker Unified Studio domain. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
environment_configuration | object | The environment configuration of the notebook. |
error | object | The error details if the notebook is in a failed state. |
git_metadata | object | The Git metadata associated with the notebook. |
lock_expires_at | string (date-time) | The timestamp of when the notebook lock expires. |
locked_at | string (date-time) | The timestamp of when the notebook was locked. |
locked_by | string | The identifier of the user who locked the notebook. |
metadata | object | The metadata of the notebook. |
owning_project_id | string | The identifier of the project that owns the notebook. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
parameters | object | The sensitive parameters of the notebook. |
status | string | The status of a notebook in Amazon SageMaker Unified Studio. (ACTIVE, ARCHIVED, SYNC_IN_PROGRESS, SYNC_FAILED) |
updated_at | string (date-time) | The timestamp of when the notebook was last updated. |
updated_by | string | The identifier of the user who last updated the notebook. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_notebooks | select | domain_identifier, owningProjectIdentifier, region | maxResults, sortOrder, sortBy, status, nextToken | Lists notebooks in Amazon SageMaker Unified Studio. |
get_notebook | select | domain_identifier, identifier, region | Gets the details of a notebook in Amazon SageMaker Unified Studio. | |
create_notebook | insert | domain_identifier, region, owningProjectIdentifier, name | Creates a notebook in Amazon SageMaker Unified Studio. A notebook is a collaborative document within a project that contains code cells for interactive computing. | |
update_notebook | update | domain_identifier, identifier, region | Updates a notebook in Amazon SageMaker Unified Studio. | |
delete_notebook | delete | domain_identifier, identifier, region | Deletes a notebook in Amazon SageMaker Unified Studio. | |
start_notebook_run | exec | domain_identifier, region, owningProjectIdentifier, notebookIdentifier | 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. | |
start_notebook_export | exec | domain_identifier, region, notebookIdentifier, owningProjectIdentifier, fileFormat | 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. | |
start_notebook_import | exec | domain_identifier, region, owningProjectIdentifier, sourceLocation, name | Starts 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_sync | exec | domain_identifier, region, owningProjectIdentifier, sourceLocation | Starts a notebook sync in Amazon SageMaker Unified Studio. This operation syncs a notebook from a Git repository into a project. | |
stop_notebook_run | exec | domain_identifier, identifier, region | Stops 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.
| Name | Datatype | Description |
|---|---|---|
domain_identifier | string | The identifier of the Amazon SageMaker Unified Studio domain in which the notebook run is stopped. |
identifier | string | The identifier of the notebook run to stop. |
owningProjectIdentifier | string | The identifier of the project that owns the notebooks. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The 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. |
nextToken | string | When 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. |
sortBy | string | The field to sort the results by. |
sortOrder | string | The sort order for the results. |
status | string | The status to filter notebooks by. |
SELECT examples
- list_notebooks
- get_notebook
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 }}'
;
Gets the details of a notebook in Amazon SageMaker Unified Studio.
SELECT
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
FROM aws.datazone.notebooks
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_notebook
- Manifest
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
;
# Description fields are for documentation purposes
- name: notebooks
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the notebooks resource.
- name: region
value: "{{ region }}"
description: Required parameter for the notebooks resource.
- name: owningProjectIdentifier
value: "{{ owningProjectIdentifier }}"
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: metadata
value: "{{ metadata }}"
- name: parameters
value: "{{ parameters }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_notebook
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
- delete_notebook
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
- start_notebook_run
- start_notebook_export
- start_notebook_import
- start_notebook_sync
- stop_notebook_run
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 }}"
}'
;
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.
EXEC aws.datazone.notebooks.start_notebook_export
@domain_identifier='{{ domain_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"notebookIdentifier": "{{ notebookIdentifier }}",
"owningProjectIdentifier": "{{ owningProjectIdentifier }}",
"fileFormat": "{{ fileFormat }}",
"clientToken": "{{ clientToken }}"
}'
;
Starts a notebook import in Amazon SageMaker Unified Studio. This operation imports a notebook from an Amazon Simple Storage Service location into a project.
EXEC aws.datazone.notebooks.start_notebook_import
@domain_identifier='{{ domain_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"owningProjectIdentifier": "{{ owningProjectIdentifier }}",
"sourceLocation": "{{ sourceLocation }}",
"name": "{{ name }}",
"description": "{{ description }}",
"clientToken": "{{ clientToken }}"
}'
;
Starts a notebook sync in Amazon SageMaker Unified Studio. This operation syncs a notebook from a Git repository into a project.
EXEC aws.datazone.notebooks.start_notebook_sync
@domain_identifier='{{ domain_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"owningProjectIdentifier": "{{ owningProjectIdentifier }}",
"sourceLocation": "{{ sourceLocation }}",
"gitMetadata": "{{ gitMetadata }}",
"notebookId": "{{ notebookId }}",
"name": "{{ name }}",
"description": "{{ description }}",
"clientToken": "{{ clientToken }}"
}'
;
Stops a running notebook run in Amazon SageMaker Unified Studio.
EXEC aws.datazone.notebooks.stop_notebook_run
@domain_identifier='{{ domain_identifier }}' --required,
@identifier='{{ identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}"
}'
;