Skip to main content

apps

Creates, updates, deletes or gets an app resource or lists apps in a region

Overview

Nameapps
TypeResource
DescriptionResource Type definition for AWS::SageMaker::App
Idawscc.sagemaker.apps

Fields

NameDatatypeDescription
app_arnstringThe Amazon Resource Name (ARN) of the app.
app_namestringThe name of the app.
app_typestringThe type of app.
domain_idstringThe domain ID.
resource_specobjectThe instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.
tagsarrayA list of tags to apply to the app.
user_profile_namestringThe user profile name.
built_in_lifecycle_config_arnstringThe lifecycle configuration that runs before the default lifecycle configuration.
recovery_modebooleanIndicates whether the application is launched in recovery mode.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceappsINSERTAppName, AppType, DomainId, UserProfileName, region
delete_resourceappsDELETEIdentifier, region
update_resourceappsUPDATEIdentifier, PatchDocument, region
list_resourcesapps_list_onlySELECTregion
get_resourceappsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual app.

SELECT
region,
app_arn,
app_name,
app_type,
domain_id,
resource_spec,
tags,
user_profile_name,
built_in_lifecycle_config_arn,
recovery_mode
FROM awscc.sagemaker.apps
WHERE
region = '{{ region }}' AND
Identifier = '{{ app_name }}|{{ app_type }}|{{ domain_id }}|{{ user_profile_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.sagemaker.apps (
AppName,
AppType,
DomainId,
UserProfileName,
region
)
SELECT
'{{ app_name }}',
'{{ app_type }}',
'{{ domain_id }}',
'{{ user_profile_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 app resource, using stack-deploy.

/*+ update */
UPDATE awscc.sagemaker.apps
SET PatchDocument = string('{{ {
"Tags": tags,
"RecoveryMode": recovery_mode
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ app_name }}|{{ app_type }}|{{ domain_id }}|{{ user_profile_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.sagemaker.apps
WHERE
Identifier = '{{ app_name }}|{{ app_type }}|{{ domain_id }}|{{ user_profile_name }}' 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 apps resource, the following permissions are required:

sagemaker:CreateApp,
sagemaker:DescribeApp,
sagemaker:AddTags,
sagemaker:ListTags