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.
See also: AWS API Documentation
Request Syntax
response = client.add_tags(
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ResourceId='string',
ResourceType='BatchPrediction'|'DataSource'|'Evaluation'|'MLModel'
)
[REQUIRED]
The key-value pairs to use to create tags. If you specify a key without specifying a value, Amazon ML creates a tag with the specified key and a value of null.
A custom key-value pair associated with an ML object, such as an ML model.
A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.
An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.
[REQUIRED]
The ID of the ML object to tag. For example, exampleModelId
.
[REQUIRED]
The type of the ML object to tag.
dict
Response Syntax
{
'ResourceId': 'string',
'ResourceType': 'BatchPrediction'|'DataSource'|'Evaluation'|'MLModel'
}
Response Structure
(dict) --
Amazon ML returns the following elements.
ResourceId (string) --
The ID of the ML object that was tagged.
ResourceType (string) --
The type of the ML object that was tagged.
Exceptions
MachineLearning.Client.exceptions.InvalidInputException
MachineLearning.Client.exceptions.InvalidTagException
MachineLearning.Client.exceptions.TagLimitExceededException
MachineLearning.Client.exceptions.ResourceNotFoundException
MachineLearning.Client.exceptions.InternalServerException