apps
Creates, updates, deletes or gets an app resource or lists apps in a region
Overview
| Name | apps |
| Type | Resource |
| Description | Resource Type definition for AWS::SageMaker::App |
| Id | awscc.sagemaker.apps |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
app_arn | string | The Amazon Resource Name (ARN) of the app. |
app_name | string | The name of the app. |
app_type | string | The type of app. |
domain_id | string | The domain ID. |
resource_spec | object | The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance. |
tags | array | A list of tags to apply to the app. |
user_profile_name | string | The user profile name. |
built_in_lifecycle_config_arn | string | The lifecycle configuration that runs before the default lifecycle configuration. |
recovery_mode | boolean | Indicates whether the application is launched in recovery mode. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
app_name | string | The name of the app. |
app_type | string | The type of app. |
domain_id | string | The domain ID. |
user_profile_name | string | The user profile name. |
region | string | AWS region. |
For more information, see AWS::SageMaker::App.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | apps | INSERT | AppName, AppType, DomainId, UserProfileName, region |
delete_resource | apps | DELETE | Identifier, region |
update_resource | apps | UPDATE | Identifier, PatchDocument, region |
list_resources | apps_list_only | SELECT | region |
get_resource | apps | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all apps in a region.
SELECT
region,
app_name,
app_type,
domain_id,
user_profile_name
FROM awscc.sagemaker.apps_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new app resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.sagemaker.apps (
AppName,
AppType,
DomainId,
ResourceSpec,
Tags,
UserProfileName,
RecoveryMode,
region
)
SELECT
'{{ app_name }}',
'{{ app_type }}',
'{{ domain_id }}',
'{{ resource_spec }}',
'{{ tags }}',
'{{ user_profile_name }}',
'{{ recovery_mode }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: app
props:
- name: app_name
value: '{{ app_name }}'
- name: app_type
value: '{{ app_type }}'
- name: domain_id
value: '{{ domain_id }}'
- name: resource_spec
value:
instance_type: '{{ instance_type }}'
sage_maker_image_arn: '{{ sage_maker_image_arn }}'
sage_maker_image_version_arn: '{{ sage_maker_image_version_arn }}'
lifecycle_config_arn: '{{ lifecycle_config_arn }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: user_profile_name
value: '{{ user_profile_name }}'
- name: recovery_mode
value: '{{ recovery_mode }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
sagemaker:CreateApp,
sagemaker:DescribeApp,
sagemaker:AddTags,
sagemaker:ListTags
sagemaker:DescribeApp,
sagemaker:DescribeApp,
sagemaker:ListTags
sagemaker:DescribeApp,
sagemaker:AddTags,
sagemaker:DeleteTags,
sagemaker:ListTags
sagemaker:DeleteApp,
sagemaker:DescribeApp,
sagemaker:DeleteTags,
sagemaker:ListTags
sagemaker:ListApps,
sagemaker:ListTags