spaces
Creates, updates, deletes or gets a space
resource or lists spaces
in a region
Overview
Name | spaces |
Type | Resource |
Description | Resource Type definition for AWS::SageMaker::Space |
Id | aws.sagemaker.spaces |
Fields
Name | Datatype | Description |
---|---|---|
space_arn | string | The space Amazon Resource Name (ARN). |
domain_id | string | The ID of the associated Domain. |
space_name | string | A name for the Space. |
space_settings | object | A collection of settings. |
tags | array | A list of tags to apply to the space. |
ownership_settings | object | |
space_sharing_settings | object | |
space_display_name | string | |
url | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DomainId, SpaceName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all spaces
in a region.
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';
Gets all properties from an individual 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.spaces (
DomainId,
SpaceName,
region
)
SELECT
'{{ DomainId }}',
'{{ SpaceName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.spaces (
DomainId,
SpaceName,
SpaceSettings,
Tags,
OwnershipSettings,
SpaceSharingSettings,
SpaceDisplayName,
region
)
SELECT
'{{ DomainId }}',
'{{ SpaceName }}',
'{{ SpaceSettings }}',
'{{ Tags }}',
'{{ OwnershipSettings }}',
'{{ SpaceSharingSettings }}',
'{{ SpaceDisplayName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: space
props:
- name: DomainId
value: '{{ DomainId }}'
- name: SpaceName
value: '{{ SpaceName }}'
- name: SpaceSettings
value:
JupyterServerAppSettings:
DefaultResourceSpec:
InstanceType: '{{ InstanceType }}'
SageMakerImageArn: '{{ SageMakerImageArn }}'
SageMakerImageVersionArn: '{{ SageMakerImageVersionArn }}'
KernelGatewayAppSettings:
CustomImages:
- AppImageConfigName: '{{ AppImageConfigName }}'
ImageName: '{{ ImageName }}'
ImageVersionNumber: '{{ ImageVersionNumber }}'
DefaultResourceSpec: null
JupyterLabAppSettings:
DefaultResourceSpec: null
CodeRepositories:
- RepositoryUrl: '{{ RepositoryUrl }}'
CodeEditorAppSettings:
DefaultResourceSpec: null
SpaceStorageSettings:
EbsStorageSettings:
EbsVolumeSizeInGb: '{{ EbsVolumeSizeInGb }}'
AppType: '{{ AppType }}'
CustomFileSystems:
- EFSFileSystem:
FileSystemId: '{{ FileSystemId }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: OwnershipSettings
value:
OwnerUserProfileName: '{{ OwnerUserProfileName }}'
- name: SpaceSharingSettings
value:
SharingType: '{{ SharingType }}'
- name: SpaceDisplayName
value: '{{ SpaceDisplayName }}'
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