apps
Creates, updates, deletes, gets or lists an apps resource.
Overview
| Name | apps |
| Type | Resource |
| Id | aws.sagemaker.apps |
Fields
The following fields are returned by SELECT queries:
- describe_app
- list_apps
| Name | Datatype | Description |
|---|---|---|
app_arn | string | The Amazon Resource Name (ARN) of the app. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:app/.*</code>) |
app_name | string | The name of the app. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
app_type | string | The type of app. (JupyterServer, KernelGateway, DetailedProfiler, TensorBoard, CodeEditor, JupyterLab, RStudioServerPro, RSessionGateway, Canvas) |
built_in_lifecycle_config_arn | string | The lifecycle configuration that runs before the default lifecycle configuration (pattern: <code>(arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:studio-lifecycle-config/.*|None)</code>) |
creation_time | string (date-time) | The creation time of the application. After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application. |
domain_id | string | The domain ID. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>) |
effective_trusted_identity_propagation_status | string | The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used. (ENABLED, DISABLED) |
failure_reason | string | The failure reason. |
last_health_check_timestamp | string (date-time) | The timestamp of the last health check. |
last_user_activity_timestamp | string (date-time) | The timestamp of the last user's activity. LastUserActivityTimestamp is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as LastHealthCheckTimestamp. |
recovery_mode | boolean | Indicates whether the application is launched in recovery mode. |
resource_spec | object | Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on. When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value. |
space_name | string | The name of the space. If this value is not set, then UserProfileName must be set. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
status | string | The status. (Deleted, Deleting, Failed, InService, Pending) |
user_profile_name | string | The user profile name. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
| Name | Datatype | Description |
|---|---|---|
app_name | string | The name of the app. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
app_type | string | The type of app. (JupyterServer, KernelGateway, DetailedProfiler, TensorBoard, CodeEditor, JupyterLab, RStudioServerPro, RSessionGateway, Canvas) |
creation_time | string (date-time) | The creation time. |
domain_id | string | The domain ID. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>) |
resource_spec | object | Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on. When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value. |
space_name | string | The name of the space. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
status | string | The status. (Deleted, Deleting, Failed, InService, Pending) |
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_app | select | region | Describes the app. | |
list_apps | select | region | Lists apps. | |
create_app | insert | region, DomainId, AppType, AppName | Creates a running app for the specified UserProfile. This operation is automatically invoked by Amazon SageMaker AI upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously. | |
delete_app | delete | region | Used to stop and delete an app. |
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_app
- list_apps
Describes the app.
SELECT
app_arn,
app_name,
app_type,
built_in_lifecycle_config_arn,
creation_time,
domain_id,
effective_trusted_identity_propagation_status,
failure_reason,
last_health_check_timestamp,
last_user_activity_timestamp,
recovery_mode,
resource_spec,
space_name,
status,
user_profile_name
FROM aws.sagemaker.apps
WHERE region = '{{ region }}' -- required
;
Lists apps.
SELECT
app_name,
app_type,
creation_time,
domain_id,
resource_spec,
space_name,
status,
user_profile_name
FROM aws.sagemaker.apps
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_app
- Manifest
Creates a running app for the specified UserProfile. This operation is automatically invoked by Amazon SageMaker AI upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.
INSERT INTO aws.sagemaker.apps (
DomainId,
UserProfileName,
SpaceName,
AppType,
AppName,
Tags,
ResourceSpec,
RecoveryMode,
region
)
SELECT
'{{ DomainId }}' /* required */,
'{{ UserProfileName }}',
'{{ SpaceName }}',
'{{ AppType }}' /* required */,
'{{ AppName }}' /* required */,
'{{ Tags }}',
'{{ ResourceSpec }}',
{{ RecoveryMode }},
'{{ region }}'
RETURNING
app_arn
;
# Description fields are for documentation purposes
- name: apps
props:
- name: region
value: "{{ region }}"
description: Required parameter for the apps resource.
- name: DomainId
value: "{{ DomainId }}"
description: |
The domain ID.
- name: UserProfileName
value: "{{ UserProfileName }}"
description: |
The user profile name. If this value is not set, then SpaceName must be set.
- name: SpaceName
value: "{{ SpaceName }}"
description: |
The name of the space. If this value is not set, then UserProfileName must be set.
- name: AppType
value: "{{ AppType }}"
description: |
The type of app.
valid_values: ['JupyterServer', 'KernelGateway', 'DetailedProfiler', 'TensorBoard', 'CodeEditor', 'JupyterLab', 'RStudioServerPro', 'RSessionGateway', 'Canvas']
- name: AppName
value: "{{ AppName }}"
description: |
The name of the app.
- name: Tags
description: |
Each tag consists of a key and an optional value. Tag keys must be unique per resource.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: ResourceSpec
description: |
The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. The value of InstanceType passed as part of the ResourceSpec in the CreateApp call overrides the value passed as part of the ResourceSpec configured for the user profile or the domain. If InstanceType is not specified in any of those three ResourceSpec values for a KernelGateway app, the CreateApp call fails with a request validation error.
value:
SageMakerImageArn: "{{ SageMakerImageArn }}"
SageMakerImageVersionArn: "{{ SageMakerImageVersionArn }}"
SageMakerImageVersionAlias: "{{ SageMakerImageVersionAlias }}"
InstanceType: "{{ InstanceType }}"
LifecycleConfigArn: "{{ LifecycleConfigArn }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
- name: RecoveryMode
value: {{ RecoveryMode }}
description: |
Indicates whether the application is launched in recovery mode.
DELETE examples
- delete_app
Used to stop and delete an app.
DELETE FROM aws.sagemaker.apps
WHERE region = '{{ region }}' --required
;