user_profiles
Creates, updates, deletes, gets or lists a user_profiles resource.
Overview
| Name | user_profiles |
| Type | Resource |
| Id | aws.sagemaker.user_profiles |
Fields
The following fields are returned by SELECT queries:
- describe_user_profile
- list_user_profiles
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The creation time. |
domain_id | string | The ID of the domain that contains the profile. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>) |
failure_reason | string | The failure reason. |
home_efs_file_system_uid | string | The ID of the user's profile in the Amazon Elastic File System volume. (pattern: <code>\d+</code>) |
last_modified_time | string (date-time) | The last modified time. |
single_sign_on_user_identifier | string | The IAM Identity Center user identifier. (pattern: <code>UserName</code>) |
single_sign_on_user_value | string | The IAM Identity Center user value. |
status | string | The status. (Deleting, Failed, InService, Pending, Updating, Update_Failed, Delete_Failed) |
user_profile_arn | string | The user profile Amazon Resource Name (ARN). (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:user-profile/.*</code>) |
user_profile_name | string | The user profile name. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
user_settings | object | A collection of settings. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The creation time. |
domain_id | string | The domain ID. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>) |
last_modified_time | string (date-time) | The last modified time. |
status | string | The status. (Deleting, Failed, InService, Pending, Updating, Update_Failed, Delete_Failed) |
user_profile_name | string | The user profile name. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_user_profile | select | region | Describes a user profile. For more information, see CreateUserProfile. | |
list_user_profiles | select | region | Lists user profiles. | |
create_user_profile | insert | region, DomainId, UserProfileName | Creates a user profile. A user profile represents a single user within a domain, and is the main way to reference a "person" for the purposes of sharing, reporting, and other user-oriented features. This entity is created when a user onboards to a domain. If an administrator invites a person by email or imports them from IAM Identity Center, a user profile is automatically created. A user profile is the primary holder of settings for an individual user and has a reference to the user's private Amazon Elastic File System home directory. | |
update_user_profile | update | region, DomainId, UserProfileName | Updates a user profile. | |
delete_user_profile | delete | region | Deletes a user profile. When a user profile is deleted, the user loses access to their EFS volume, including data, notebooks, and other artifacts. | |
create_presigned_domain_url | exec | region, DomainId, UserProfileName | Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to the domain, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System volume. This operation can only be called when the authentication mode equals IAM. The IAM role or user passed to this API defines the permissions to access the app. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the app. You can restrict access to this API and to the URL that it returns to a list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, see Connect to Amazon SageMaker AI Studio Through an Interface VPC Endpoint . The URL that you get from a call to CreatePresignedDomainUrl has a default timeout of 5 minutes. You can configure this value using ExpiresInSeconds. If you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page. The JupyterLab session default expiration time is 12 hours. You can configure this value using SessionExpirationDurationInSeconds. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_user_profile
- list_user_profiles
Describes a user profile. For more information, see CreateUserProfile.
SELECT
creation_time,
domain_id,
failure_reason,
home_efs_file_system_uid,
last_modified_time,
single_sign_on_user_identifier,
single_sign_on_user_value,
status,
user_profile_arn,
user_profile_name,
user_settings
FROM aws.sagemaker.user_profiles
WHERE region = '{{ region }}' -- required
;
Lists user profiles.
SELECT
creation_time,
domain_id,
last_modified_time,
status,
user_profile_name
FROM aws.sagemaker.user_profiles
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_user_profile
- Manifest
Creates a user profile. A user profile represents a single user within a domain, and is the main way to reference a "person" for the purposes of sharing, reporting, and other user-oriented features. This entity is created when a user onboards to a domain. If an administrator invites a person by email or imports them from IAM Identity Center, a user profile is automatically created. A user profile is the primary holder of settings for an individual user and has a reference to the user's private Amazon Elastic File System home directory.
INSERT INTO aws.sagemaker.user_profiles (
DomainId,
UserProfileName,
SingleSignOnUserIdentifier,
SingleSignOnUserValue,
Tags,
UserSettings,
region
)
SELECT
'{{ DomainId }}' /* required */,
'{{ UserProfileName }}' /* required */,
'{{ SingleSignOnUserIdentifier }}',
'{{ SingleSignOnUserValue }}',
'{{ Tags }}',
'{{ UserSettings }}',
'{{ region }}'
RETURNING
user_profile_arn
;
# Description fields are for documentation purposes
- name: user_profiles
props:
- name: region
value: "{{ region }}"
description: Required parameter for the user_profiles resource.
- name: DomainId
value: "{{ DomainId }}"
description: |
The ID of the associated Domain.
- name: UserProfileName
value: "{{ UserProfileName }}"
description: |
A name for the UserProfile. This value is not case sensitive.
- name: SingleSignOnUserIdentifier
value: "{{ SingleSignOnUserIdentifier }}"
description: |
A specifier for the type of value specified in SingleSignOnUserValue. Currently, the only supported value is "UserName". If the Domain's AuthMode is IAM Identity Center, this field is required. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified.
- name: SingleSignOnUserValue
value: "{{ SingleSignOnUserValue }}"
description: |
The username of the associated Amazon Web Services Single Sign-On User for this UserProfile. If the Domain's AuthMode is IAM Identity Center, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified.
- name: Tags
description: |
Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags that you specify for the User Profile are also added to all Apps that the User Profile launches.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: UserSettings
description: |
A collection of settings.
value:
ExecutionRole: "{{ ExecutionRole }}"
SecurityGroups:
- "{{ SecurityGroups }}"
SharingSettings:
NotebookOutputOption: "{{ NotebookOutputOption }}"
S3OutputPath: "{{ S3OutputPath }}"
S3KmsKeyId: "{{ S3KmsKeyId }}"
JupyterServerAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
LifecycleConfigArns:
- "{{ LifecycleConfigArns }}"
CodeRepositories:
- RepositoryUrl: "{{ RepositoryUrl }}"
KernelGatewayAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
CustomImages:
- ImageName: "{{ ImageName }}"
ImageVersionNumber: {{ ImageVersionNumber }}
AppImageConfigName: "{{ AppImageConfigName }}"
LifecycleConfigArns:
- "{{ LifecycleConfigArns }}"
TensorBoardAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
RStudioServerProAppSettings:
AccessStatus: "{{ AccessStatus }}"
UserGroup: "{{ UserGroup }}"
RSessionAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
CustomImages:
- ImageName: "{{ ImageName }}"
ImageVersionNumber: {{ ImageVersionNumber }}
AppImageConfigName: "{{ AppImageConfigName }}"
CanvasAppSettings:
TimeSeriesForecastingSettings:
Status: "{{ Status }}"
AmazonForecastRoleArn: "{{ AmazonForecastRoleArn }}"
ModelRegisterSettings:
Status: "{{ Status }}"
CrossAccountModelRegisterRoleArn: "{{ CrossAccountModelRegisterRoleArn }}"
WorkspaceSettings:
S3ArtifactPath: "{{ S3ArtifactPath }}"
S3KmsKeyId: "{{ S3KmsKeyId }}"
IdentityProviderOAuthSettings:
- DataSourceName: "{{ DataSourceName }}"
Status: "{{ Status }}"
SecretArn: "{{ SecretArn }}"
DirectDeploySettings:
Status: "{{ Status }}"
KendraSettings:
Status: "{{ Status }}"
GenerativeAiSettings:
AmazonBedrockRoleArn: "{{ AmazonBedrockRoleArn }}"
EmrServerlessSettings:
ExecutionRoleArn: "{{ ExecutionRoleArn }}"
Status: "{{ Status }}"
CodeEditorAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
CustomImages:
- ImageName: "{{ ImageName }}"
ImageVersionNumber: {{ ImageVersionNumber }}
AppImageConfigName: "{{ AppImageConfigName }}"
LifecycleConfigArns:
- "{{ LifecycleConfigArns }}"
AppLifecycleManagement:
IdleSettings:
LifecycleManagement: "{{ LifecycleManagement }}"
IdleTimeoutInMinutes: {{ IdleTimeoutInMinutes }}
MinIdleTimeoutInMinutes: {{ MinIdleTimeoutInMinutes }}
MaxIdleTimeoutInMinutes: {{ MaxIdleTimeoutInMinutes }}
BuiltInLifecycleConfigArn: "{{ BuiltInLifecycleConfigArn }}"
JupyterLabAppSettings:
DefaultResourceSpec:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
CustomImages:
- ImageName: "{{ ImageName }}"
ImageVersionNumber: {{ ImageVersionNumber }}
AppImageConfigName: "{{ AppImageConfigName }}"
LifecycleConfigArns:
- "{{ LifecycleConfigArns }}"
CodeRepositories:
- RepositoryUrl: "{{ RepositoryUrl }}"
AppLifecycleManagement:
IdleSettings:
LifecycleManagement: "{{ LifecycleManagement }}"
IdleTimeoutInMinutes: {{ IdleTimeoutInMinutes }}
MinIdleTimeoutInMinutes: {{ MinIdleTimeoutInMinutes }}
MaxIdleTimeoutInMinutes: {{ MaxIdleTimeoutInMinutes }}
EmrSettings:
AssumableRoleArns:
- "{{ AssumableRoleArns }}"
ExecutionRoleArns:
- "{{ ExecutionRoleArns }}"
BuiltInLifecycleConfigArn: "{{ BuiltInLifecycleConfigArn }}"
SpaceStorageSettings:
DefaultEbsStorageSettings:
DefaultEbsVolumeSizeInGb: {{ DefaultEbsVolumeSizeInGb }}
MaximumEbsVolumeSizeInGb: {{ MaximumEbsVolumeSizeInGb }}
DefaultLandingUri: "{{ DefaultLandingUri }}"
StudioWebPortal: "{{ StudioWebPortal }}"
CustomPosixUserConfig:
Uid: {{ Uid }}
Gid: {{ Gid }}
CustomFileSystemConfigs:
- EFSFileSystemConfig:
FileSystemId: "{{ FileSystemId }}"
FileSystemPath: "{{ FileSystemPath }}"
FSxLustreFileSystemConfig:
FileSystemId: "{{ FileSystemId }}"
FileSystemPath: "{{ FileSystemPath }}"
S3FileSystemConfig:
MountPath: "{{ MountPath }}"
S3Uri: "{{ S3Uri }}"
StudioWebPortalSettings:
HiddenMlTools:
- "{{ HiddenMlTools }}"
HiddenAppTypes:
- "{{ HiddenAppTypes }}"
HiddenInstanceTypes:
- "{{ HiddenInstanceTypes }}"
HiddenSageMakerImageVersionAliases:
- SageMakerImageName: "{{ SageMakerImageName }}"
VersionAliases: "{{ VersionAliases }}"
ExecutionRoleSessionNameMode: "{{ ExecutionRoleSessionNameMode }}"
AutoMountHomeEFS: "{{ AutoMountHomeEFS }}"
UPDATE examples
- update_user_profile
Updates a user profile.
UPDATE aws.sagemaker.user_profiles
SET
DomainId = '{{ DomainId }}',
UserProfileName = '{{ UserProfileName }}',
UserSettings = '{{ UserSettings }}'
WHERE
region = '{{ region }}' --required
AND DomainId = '{{ DomainId }}' --required
AND UserProfileName = '{{ UserProfileName }}' --required
RETURNING
user_profile_arn;
DELETE examples
- delete_user_profile
Deletes a user profile. When a user profile is deleted, the user loses access to their EFS volume, including data, notebooks, and other artifacts.
DELETE FROM aws.sagemaker.user_profiles
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- create_presigned_domain_url
Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to the domain, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System volume. This operation can only be called when the authentication mode equals IAM. The IAM role or user passed to this API defines the permissions to access the app. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the app. You can restrict access to this API and to the URL that it returns to a list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, see Connect to Amazon SageMaker AI Studio Through an Interface VPC Endpoint . The URL that you get from a call to CreatePresignedDomainUrl has a default timeout of 5 minutes. You can configure this value using ExpiresInSeconds. If you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page. The JupyterLab session default expiration time is 12 hours. You can configure this value using SessionExpirationDurationInSeconds.
EXEC aws.sagemaker.user_profiles.create_presigned_domain_url
@region='{{ region }}' --required
@@json=
'{
"DomainId": "{{ DomainId }}",
"UserProfileName": "{{ UserProfileName }}",
"SessionExpirationDurationInSeconds": {{ SessionExpirationDurationInSeconds }},
"ExpiresInSeconds": {{ ExpiresInSeconds }},
"SpaceName": "{{ SpaceName }}",
"LandingUri": "{{ LandingUri }}"
}'
;