tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.machinelearning.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
| Name | Datatype | Description |
|---|---|---|
resource_id | string | The ID of the tagged ML object. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
resource_type | string | The type of the tagged ML object. (BatchPrediction, DataSource, Evaluation, MLModel) |
tags | array | A list of tags associated with the ML object. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | region | Describes one or more of the tags for your Amazon ML object. | |
add_tags | update | region, ResourceId, ResourceType | Adds one or more tags to an object, up to a limit of 10. Each tag consists of a key and an optional value. If you add a tag using a key that is already associated with the ML object, AddTags updates the tag's value. | |
delete_tags | delete | region | Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags. If you specify a tag that doesn't exist, Amazon ML ignores it. |
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_tags
Describes one or more of the tags for your Amazon ML object.
SELECT
resource_id,
resource_type,
tags
FROM aws.machinelearning.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- add_tags
Adds one or more tags to an object, up to a limit of 10. Each tag consists of a key and an optional value. If you add a tag using a key that is already associated with the ML object, AddTags updates the tag's value.
UPDATE aws.machinelearning.tags
SET
Tags = '{{ Tags }}',
ResourceId = '{{ ResourceId }}',
ResourceType = '{{ ResourceType }}'
WHERE
region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND ResourceType = '{{ ResourceType }}' --required
RETURNING
resource_id,
resource_type;
DELETE examples
- delete_tags
Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags. If you specify a tag that doesn't exist, Amazon ML ignores it.
DELETE FROM aws.machinelearning.tags
WHERE region = '{{ region }}' --required
;