Skip to main content

spaces

Creates, updates, deletes or gets a space resource or lists spaces in a region

Overview

Namespaces
TypeResource
DescriptionResource Type definition for AWS::SageMaker::Space
Idaws.sagemaker.spaces

Fields

NameDatatypeDescription
space_arnstringThe space Amazon Resource Name (ARN).
domain_idstringThe ID of the associated Domain.
space_namestringA name for the Space.
space_settingsobjectA collection of settings.
tagsarrayA list of tags to apply to the space.
ownership_settingsobject
space_sharing_settingsobject
space_display_namestring
urlstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTDomainId, SpaceName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourceSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

List all spaces in a region.

SELECT
region,
domain_id,
space_name
FROM aws.sagemaker.spaces
WHERE region = 'us-east-1';

Gets all properties from a space.

SELECT
region,
space_arn,
domain_id,
space_name,
space_settings,
tags,
ownership_settings,
space_sharing_settings,
space_display_name,
url
FROM aws.sagemaker.spaces
WHERE region = 'us-east-1' AND data__Identifier = '<DomainId>|<SpaceName>';

INSERT example

Use the following StackQL query and manifest file to create a new space resource, using stack-deploy.

/*+ create */
INSERT INTO aws.sagemaker.spaces (
DomainId,
SpaceName,
region
)
SELECT
'{{ DomainId }}',
'{{ SpaceName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.sagemaker.spaces
WHERE data__Identifier = '<DomainId|SpaceName>'
AND region = 'us-east-1';

Permissions

To operate on the spaces resource, the following permissions are required:

Create

sagemaker:CreateSpace,
sagemaker:DescribeSpace

Read

sagemaker:DescribeSpace

Update

sagemaker:UpdateSpace,
sagemaker:DescribeSpace

Delete

sagemaker:DeleteSpace,
sagemaker:DescribeSpace

List

sagemaker:ListSpaces