Amazon CloudHSM

2016/03/17 - Amazon CloudHSM - 3 new api methods

AddTagsToResource (new) Link ¶

Adds or overwrites one or more tags for the specified resource.

Each tag consists of a key and a value. Tag keys must be unique per resource.

Request Syntax

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

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to tag.

type TagList:

list

param TagList:

[REQUIRED]

One or more tags.

  • (dict) --

    A key-value pair that identifies or specifies metadata about a resource.

    • Key (string) -- [REQUIRED]

      The key of the tag.

    • Value (string) -- [REQUIRED]

      The value of the tag.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'string'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the operation.

RemoveTagsFromResource (new) Link ¶

Removes one or more tags from the specified resource.

To remove a tag, specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use AddTagsToResource.

Request Syntax

client.remove_tags_from_resource(
    ResourceArn='string',
    TagKeyList=[
        'string',
    ]
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

type TagKeyList:

list

param TagKeyList:

[REQUIRED]

The tag key or keys to remove.

Specify only the tag key to remove (not the value). To overwrite the value for an existing tag, use AddTagsToResource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Status': 'string'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the operation.

ListTagsForResource (new) Link ¶

Returns a list of all tags for the specified resource.

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn:

string

param ResourceArn:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

rtype:

dict

returns:

Response Syntax

{
    'TagList': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • TagList (list) --

      One or more tags.

      • (dict) --

        A key-value pair that identifies or specifies metadata about a resource.

        • Key (string) --

          The key of the tag.

        • Value (string) --

          The value of the tag.