Lists the tags that have been added to the specified resource. This operation is supported in storage gateways of all types.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceARN='string',
Marker='string',
Limit=123
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource for which you want to list tags.
dict
Response Syntax
{
'ResourceARN': 'string',
'Marker': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
(dict) --
ListTagsForResourceOutput
ResourceARN (string) --
The Amazon Resource Name (ARN) of the resource for which you want to list tags.
Marker (string) --
An opaque string that indicates the position at which to stop returning the list of tags.
Tags (list) --
An array that contains the tags for the specified resource.
(dict) --
A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /.
Key (string) --
Tag key. The key can't start with aws:.
Value (string) --
Value of the tag key.
Exceptions
StorageGateway.Client.exceptions.InvalidGatewayRequestException
StorageGateway.Client.exceptions.InternalServerError
Examples
Lists the tags that have been added to the specified resource.
response = client.list_tags_for_resource(
Limit=1,
Marker='1',
ResourceARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B',
)
print(response)
Expected Output:
{
'Marker': '1',
'ResourceARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B',
'Tags': [
{
'Key': 'Dev Gatgeway Region',
'Value': 'East Coast',
},
],
'ResponseMetadata': {
'...': '...',
},
}