Skip to main content

domains

Creates, updates, deletes or gets a domain resource or lists domains in a region

Overview

Namedomains
TypeResource
DescriptionResource Type definition for AWS::SageMaker::Domain
Idawscc.sagemaker.domains

Fields

NameDatatypeDescription
domain_arnstringThe Amazon Resource Name (ARN) of the created domain.
urlstringThe URL to the created domain.
app_network_access_typestringSpecifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly.
auth_modestringThe mode of authentication that members use to access the domain.
default_user_settingsobjectThe default user settings.
default_space_settingsobjectThe default space settings.
domain_namestringA name for the domain.
kms_key_idstringSageMaker uses AWS KMS to encrypt the EFS volume attached to the domain with an AWS managed customer master key (CMK) by default.
subnet_idsarrayThe VPC subnets that Studio uses for communication.
tagsarrayA list of tags to apply to the user profile.
vpc_idstringThe ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.
domain_idstringThe domain name.
home_efs_file_system_idstringThe ID of the Amazon Elastic File System (EFS) managed by this Domain.
single_sign_on_managed_application_instance_idstringThe SSO managed application instance ID.
single_sign_on_application_arnstringThe ARN of the application managed by SageMaker in IAM Identity Center. This value is only returned for domains created after October 1, 2023.
domain_settingsobjectA collection of Domain settings.
app_security_group_managementstringThe entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided.
security_group_id_for_domain_boundarystringThe ID of the security group that authorizes traffic between the RSessionGateway apps and the RStudioServerPro app.
tag_propagationstringIndicates whether the tags added to Domain, User Profile and Space entity is propagated to all SageMaker resources.
regionstringAWS region.

For more information, see AWS::SageMaker::Domain.

Methods

NameResourceAccessible byRequired Params
create_resourcedomainsINSERTAuthMode, DefaultUserSettings, DomainName, region
delete_resourcedomainsDELETEIdentifier, region
update_resourcedomainsUPDATEIdentifier, PatchDocument, region
list_resourcesdomains_list_onlySELECTregion
get_resourcedomainsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual domain.

SELECT
region,
domain_arn,
url,
app_network_access_type,
auth_mode,
default_user_settings,
default_space_settings,
domain_name,
kms_key_id,
subnet_ids,
tags,
vpc_id,
domain_id,
home_efs_file_system_id,
single_sign_on_managed_application_instance_id,
single_sign_on_application_arn,
domain_settings,
app_security_group_management,
security_group_id_for_domain_boundary,
tag_propagation
FROM awscc.sagemaker.domains
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.sagemaker.domains (
AuthMode,
DefaultUserSettings,
DomainName,
region
)
SELECT
'{{ auth_mode }}',
'{{ default_user_settings }}',
'{{ domain_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a domain resource, using stack-deploy.

/*+ update */
UPDATE awscc.sagemaker.domains
SET PatchDocument = string('{{ {
"AppNetworkAccessType": app_network_access_type,
"DefaultUserSettings": default_user_settings,
"DefaultSpaceSettings": default_space_settings,
"SubnetIds": subnet_ids,
"AppSecurityGroupManagement": app_security_group_management,
"TagPropagation": tag_propagation
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.sagemaker.domains
WHERE
Identifier = '{{ domain_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

sagemaker:CreateApp,
sagemaker:CreateDomain,
sagemaker:DescribeDomain,
sagemaker:DescribeImage,
sagemaker:DescribeImageVersion,
iam:CreateServiceLinkedRole,
iam:PassRole,
efs:CreateFileSystem,
kms:CreateGrant,
kms:Decrypt,
kms:DescribeKey,
kms:GenerateDataKeyWithoutPlainText