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 | awscc.sagemaker.spaces |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
domain_id | string | The ID of the associated Domain. |
space_name | string | A name for the Space. |
region | string | AWS region. |
For more information, see AWS::SageMaker::Space.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | spaces | INSERT | DomainId, SpaceName, region |
delete_resource | spaces | DELETE | Identifier, region |
update_resource | spaces | UPDATE | Identifier, PatchDocument, region |
list_resources | spaces_list_only | SELECT | region |
get_resource | spaces | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.sagemaker.spaces
WHERE
region = 'us-east-1' AND
Identifier = '{{ domain_id }}|{{ space_name }}';
Lists all spaces in a region.
SELECT
region,
domain_id,
space_name
FROM awscc.sagemaker.spaces_list_only
WHERE
region = 'us-east-1';
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 awscc.sagemaker.spaces (
DomainId,
SpaceName,
region
)
SELECT
'{{ domain_id }}',
'{{ space_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.sagemaker.spaces (
DomainId,
SpaceName,
SpaceSettings,
Tags,
OwnershipSettings,
SpaceSharingSettings,
SpaceDisplayName,
region
)
SELECT
'{{ domain_id }}',
'{{ space_name }}',
'{{ space_settings }}',
'{{ tags }}',
'{{ ownership_settings }}',
'{{ space_sharing_settings }}',
'{{ space_display_name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: space
props:
- name: domain_id
value: '{{ domain_id }}'
- name: space_name
value: '{{ space_name }}'
- name: space_settings
value:
jupyter_server_app_settings:
default_resource_spec:
instance_type: '{{ instance_type }}'
sage_maker_image_arn: '{{ sage_maker_image_arn }}'
sage_maker_image_version_arn: '{{ sage_maker_image_version_arn }}'
lifecycle_config_arn: '{{ lifecycle_config_arn }}'
lifecycle_config_arns:
- '{{ lifecycle_config_arns[0] }}'
kernel_gateway_app_settings:
custom_images:
- app_image_config_name: '{{ app_image_config_name }}'
image_name: '{{ image_name }}'
image_version_number: '{{ image_version_number }}'
default_resource_spec: null
lifecycle_config_arns:
- null
jupyter_lab_app_settings:
default_resource_spec: null
app_lifecycle_management:
idle_settings:
idle_timeout_in_minutes: '{{ idle_timeout_in_minutes }}'
code_repositories:
- repository_url: '{{ repository_url }}'
code_editor_app_settings:
default_resource_spec: null
app_lifecycle_management: null
space_storage_settings:
ebs_storage_settings:
ebs_volume_size_in_gb: '{{ ebs_volume_size_in_gb }}'
space_managed_resources: '{{ space_managed_resources }}'
remote_access: '{{ remote_access }}'
app_type: '{{ app_type }}'
custom_file_systems:
- e_fs_file_system:
file_system_id: '{{ file_system_id }}'
f_sx_lustre_file_system:
file_system_id: '{{ file_system_id }}'
s3_file_system:
s3_uri: '{{ s3_uri }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: ownership_settings
value:
owner_user_profile_name: '{{ owner_user_profile_name }}'
- name: space_sharing_settings
value:
sharing_type: '{{ sharing_type }}'
- name: space_display_name
value: '{{ space_display_name }}'
UPDATE example
Use the following StackQL query and manifest file to update a space resource, using stack-deploy.
/*+ update */
UPDATE awscc.sagemaker.spaces
SET PatchDocument = string('{{ {
"SpaceSettings": space_settings,
"Tags": tags,
"SpaceDisplayName": space_display_name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ space_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.sagemaker.spaces
WHERE
Identifier = '{{ domain_id }}|{{ space_name }}' AND
region = 'us-east-1';
Permissions
To operate on the spaces resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
sagemaker:CreateSpace,
sagemaker:DescribeSpace,
sagemaker:ListTags,
sagemaker:AddTags
sagemaker:DescribeSpace,
sagemaker:ListTags
sagemaker:UpdateSpace,
sagemaker:DescribeSpace,
sagemaker:AddTags,
sagemaker:DeleteTags,
sagemaker:ListTags
sagemaker:DeleteSpace,
sagemaker:DescribeSpace,
sagemaker:DeleteTags
sagemaker:ListSpaces,
sagemaker:ListTags