Amazon DynamoDB

2017/01/17 - Amazon DynamoDB - 3 new api methods

Changes  Adds support for tagging tables and indexes.

ListTagsOfResource (new) Link ¶

List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account.

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

See also: AWS API Documentation

Request Syntax

client.list_tags_of_resource(
    ResourceArn='string',
    NextToken='string'
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon DynamoDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).

type NextToken

string

param NextToken

An optional string that, if supplied, must be copied from the output of a previous call to ListTagOfResource. When provided in this manner, this API fetches the next page of results.

rtype

dict

returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Tags (list) --

      The tags currently associated with the Amazon DynamoDB resource.

      • (dict) --

        Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.

        AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag.

        For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

        • Key (string) --

          The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.

        • Value (string) --

          The value of the tag. Tag values are case-sensitive and can be null.

    • NextToken (string) --

      If this value is returned, there are additional results to be displayed. To retrieve them, call ListTagsOfResource again, with NextToken set to this value.

UntagResource (new) Link ¶

Removes the association of tags from an Amazon DynamoDB resource. You can call UntagResource up to 5 times per second, per account.

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon DyanamoDB resource the tags will be removed from. This value is an Amazon Resource Name (ARN).

type TagKeys

list

param TagKeys

[REQUIRED]

A list of tag keys. Existing tags of the resource whose keys are members of this list will be removed from the Amazon DynamoDB resource.

  • (string) --

returns

None

TagResource (new) Link ¶

Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to 5 times per second, per account.

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

Identifies the Amazon DynamoDB resource to which tags should be added. This value is an Amazon Resource Name (ARN).

type Tags

list

param Tags

[REQUIRED]

The tags to be assigned to the Amazon DynamoDB resource.

  • (dict) --

    Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.

    AWS-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag.

    For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

    • Key (string) -- [REQUIRED]

      The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.

    • Value (string) -- [REQUIRED]

      The value of the tag. Tag values are case-sensitive and can be null.

returns

None