contexts
Creates, updates, deletes, gets or lists a contexts resource.
Overview
| Name | contexts |
| Type | Resource |
| Id | aws.sagemaker.contexts |
Fields
The following fields are returned by SELECT queries:
- describe_context
- list_contexts
| Name | Datatype | Description |
|---|---|---|
context_arn | string | The Amazon Resource Name (ARN) of the context. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:context/.*</code>) |
context_name | string | The name of the context. (pattern: <code>[a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,119}</code>) |
context_type | string | The type of the context. |
created_by | object | Information about the user who created or modified a SageMaker resource. |
creation_time | string (date-time) | When the context was created. |
description | string | The description of the context. (pattern: <code>.*</code>) |
last_modified_by | object | Information about the user who created or modified a SageMaker resource. |
last_modified_time | string (date-time) | When the context was last modified. |
lineage_group_arn | string | The Amazon Resource Name (ARN) of the lineage group. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:lineage-group/.*</code>) |
properties | object | A list of the context's properties. |
source | object | The source of the context. |
| Name | Datatype | Description |
|---|---|---|
context_arn | string | The Amazon Resource Name (ARN) of the context. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:context/.*</code>) |
context_name | string | The name of the context. (pattern: <code>[a-zA-Z0-9]([-_]*[a-zA-Z0-9]){0,119}</code>) |
context_type | string | The type of the context. |
creation_time | string (date-time) | When the context was created. |
last_modified_time | string (date-time) | When the context was last modified. |
source | object | The source of the context. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_context | select | region | Describes a context. | |
list_contexts | select | region | Lists the contexts in your account and their properties. | |
create_context | insert | region, ContextName, ContextType | Creates a context. A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking. | |
update_context | update | region, ContextName | Updates a context. | |
delete_context | delete | region | Deletes an context. |
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_context
- list_contexts
Describes a context.
SELECT
context_arn,
context_name,
context_type,
created_by,
creation_time,
description,
last_modified_by,
last_modified_time,
lineage_group_arn,
properties,
source
FROM aws.sagemaker.contexts
WHERE region = '{{ region }}' -- required
;
Lists the contexts in your account and their properties.
SELECT
context_arn,
context_name,
context_type,
creation_time,
last_modified_time,
source
FROM aws.sagemaker.contexts
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_context
- Manifest
Creates a context. A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking.
INSERT INTO aws.sagemaker.contexts (
ContextName,
Source,
ContextType,
Description,
Properties,
Tags,
region
)
SELECT
'{{ ContextName }}' /* required */,
'{{ Source }}',
'{{ ContextType }}' /* required */,
'{{ Description }}',
'{{ Properties }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
context_arn
;
# Description fields are for documentation purposes
- name: contexts
props:
- name: region
value: "{{ region }}"
description: Required parameter for the contexts resource.
- name: ContextName
value: "{{ ContextName }}"
description: |
The name of the context. Must be unique to your account in an Amazon Web Services Region.
- name: Source
description: |
The source type, ID, and URI.
value:
SourceUri: "{{ SourceUri }}"
SourceType: "{{ SourceType }}"
SourceId: "{{ SourceId }}"
- name: ContextType
value: "{{ ContextType }}"
description: |
The context type.
- name: Description
value: "{{ Description }}"
description: |
The description of the context.
- name: Properties
value: "{{ Properties }}"
description: |
A list of properties to add to the context.
- name: Tags
description: |
A list of tags to apply to the context.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_context
Updates a context.
UPDATE aws.sagemaker.contexts
SET
ContextName = '{{ ContextName }}',
Description = '{{ Description }}',
Properties = '{{ Properties }}',
PropertiesToRemove = '{{ PropertiesToRemove }}'
WHERE
region = '{{ region }}' --required
AND ContextName = '{{ ContextName }}' --required
RETURNING
context_arn;
DELETE examples
- delete_context
Deletes an context.
DELETE FROM aws.sagemaker.contexts
WHERE region = '{{ region }}' --required
;