Amazon Machine Learning

2016/06/07 - Amazon Machine Learning - 3 new api methods

AddTags (new) Link ¶

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.

Request Syntax

client.add_tags(
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ResourceId='string',
    ResourceType='BatchPrediction'|'DataSource'|'Evaluation'|'MLModel'
)
type Tags

list

param Tags

[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.

  • (dict) --

    A custom key-value pair associated with an ML object, such as an ML model.

    • Key (string) --

      A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

    • Value (string) --

      An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

type ResourceId

string

param ResourceId

[REQUIRED]

The ID of the ML object to tag. For example, exampleModelId .

type ResourceType

string

param ResourceType

[REQUIRED]

The type of the ML object to tag.

rtype

dict

returns

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.

DescribeTags (new) Link ¶

Describes one or more of the tags for your Amazon ML object.

Request Syntax

client.describe_tags(
    ResourceId='string',
    ResourceType='BatchPrediction'|'DataSource'|'Evaluation'|'MLModel'
)
type ResourceId

string

param ResourceId

[REQUIRED]

The ID of the ML object. For example, exampleModelId .

type ResourceType

string

param ResourceType

[REQUIRED]

The type of the ML object.

rtype

dict

returns

Response Syntax

{
    'ResourceId': 'string',
    'ResourceType': 'BatchPrediction'|'DataSource'|'Evaluation'|'MLModel',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Amazon ML returns the following elements.

    • ResourceId (string) --

      The ID of the tagged ML object.

    • ResourceType (string) --

      The type of the tagged ML object.

    • Tags (list) --

      A list of tags associated with the ML object.

      • (dict) --

        A custom key-value pair associated with an ML object, such as an ML model.

        • Key (string) --

          A unique identifier for the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

        • Value (string) --

          An optional string, typically used to describe or define the tag. Valid characters include Unicode letters, digits, white space, _, ., /, =, +, -, %, and @.

DeleteTags (new) Link ¶

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.

Request Syntax

client.delete_tags(
    TagKeys=[
        'string',
    ],
    ResourceId='string',
    ResourceType='BatchPrediction'|'DataSource'|'Evaluation'|'MLModel'
)
type TagKeys

list

param TagKeys

[REQUIRED]

One or more tags to delete.

  • (string) --

type ResourceId

string

param ResourceId

[REQUIRED]

The ID of the tagged ML object. For example, exampleModelId .

type ResourceType

string

param ResourceType

[REQUIRED]

The type of the tagged ML object.

rtype

dict

returns

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 from which tags were deleted.

    • ResourceType (string) --

      The type of the ML object from which tags were deleted.