Skip to main content

spaces

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

Overview

Namespaces
TypeResource
Idaws.sagemaker.spaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The creation time.
domain_idstringThe ID of the associated domain. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>)
failure_reasonstringThe failure reason.
home_efs_file_system_uidstringThe ID of the space's profile in the Amazon EFS volume. (pattern: <code>\d+</code>)
last_modified_timestring (date-time)The last modified time.
ownership_settingsobjectThe collection of ownership settings for a space.
space_arnstringThe space's Amazon Resource Name (ARN). (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:space/.*</code>)
space_display_namestringThe name of the space that appears in the Amazon SageMaker Studio UI. (pattern: <code>(?!\s*$).+</code>)
space_namestringThe name of the space. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
space_settingsobjectA collection of space settings.
space_sharing_settingsobjectThe collection of space sharing settings for a space.
statusstringThe status. (Deleting, Failed, InService, Pending, Updating, Update_Failed, Delete_Failed)
urlstringReturns the URL of the space. If the space is created with Amazon Web Services IAM Identity Center (Successor to Amazon Web Services Single Sign-On) authentication, users can navigate to the URL after appending the respective redirect parameter for the application type to be federated through Amazon Web Services IAM Identity Center. The following application types are supported: Studio Classic: &redirect=JupyterServer JupyterLab: &redirect=JupyterLab Code Editor, based on Code-OSS, Visual Studio Code - Open Source: &redirect=CodeEditor

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_spaceselectregionDescribes the space.
list_spacesselectregionLists spaces.
create_spaceinsertregion, DomainId, SpaceNameCreates a private space or a space used for real time collaboration in a domain.
update_spaceupdateregion, DomainId, SpaceNameUpdates the settings of a space. You can't edit the app type of a space in the SpaceSettings.
delete_spacedeleteregionUsed to delete a space.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the space.

SELECT
creation_time,
domain_id,
failure_reason,
home_efs_file_system_uid,
last_modified_time,
ownership_settings,
space_arn,
space_display_name,
space_name,
space_settings,
space_sharing_settings,
status,
url
FROM aws.sagemaker.spaces
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a private space or a space used for real time collaboration in a domain.

INSERT INTO aws.sagemaker.spaces (
DomainId,
SpaceName,
Tags,
SpaceSettings,
OwnershipSettings,
SpaceSharingSettings,
SpaceDisplayName,
region
)
SELECT
'{{ DomainId }}' /* required */,
'{{ SpaceName }}' /* required */,
'{{ Tags }}',
'{{ SpaceSettings }}',
'{{ OwnershipSettings }}',
'{{ SpaceSharingSettings }}',
'{{ SpaceDisplayName }}',
'{{ region }}'
RETURNING
space_arn
;

UPDATE examples

Updates the settings of a space. You can't edit the app type of a space in the SpaceSettings.

UPDATE aws.sagemaker.spaces
SET
DomainId = '{{ DomainId }}',
SpaceName = '{{ SpaceName }}',
SpaceSettings = '{{ SpaceSettings }}',
SpaceDisplayName = '{{ SpaceDisplayName }}'
WHERE
region = '{{ region }}' --required
AND DomainId = '{{ DomainId }}' --required
AND SpaceName = '{{ SpaceName }}' --required
RETURNING
space_arn;

DELETE examples

Used to delete a space.

DELETE FROM aws.sagemaker.spaces
WHERE region = '{{ region }}' --required
;