Skip to main content

apps

Creates, updates, deletes, gets or lists an apps resource.

Overview

Nameapps
TypeResource
Idaws.sagemaker.apps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_arnstringThe Amazon Resource Name (ARN) of the app. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:app/.*</code>)
app_namestringThe name of the app. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
app_typestringThe type of app. (JupyterServer, KernelGateway, DetailedProfiler, TensorBoard, CodeEditor, JupyterLab, RStudioServerPro, RSessionGateway, Canvas)
built_in_lifecycle_config_arnstringThe 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_timestring (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_idstringThe domain ID. (pattern: <code>d-(-*[a-z0-9]){1,61}</code>)
effective_trusted_identity_propagation_statusstringThe 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_reasonstringThe failure reason.
last_health_check_timestampstring (date-time)The timestamp of the last health check.
last_user_activity_timestampstring (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_modebooleanIndicates whether the application is launched in recovery mode.
resource_specobjectSpecifies 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_namestringThe 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>)
statusstringThe status. (Deleted, Deleting, Failed, InService, Pending)
user_profile_namestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_appselectregionDescribes the app.
list_appsselectregionLists apps.
create_appinsertregion, DomainId, AppType, AppNameCreates 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_appdeleteregionUsed 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

Used to stop and delete an app.

DELETE FROM aws.sagemaker.apps
WHERE region = '{{ region }}' --required
;