Returns a list of tags that are applied to the specified AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise servers or backups.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string',
NextToken='string',
MaxResults=123
)
[REQUIRED]
The Amazon Resource Number (ARN) of an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server for which you want to show applied tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE
.
ListTagsForResource
again, and assign the token from the previous results as the value of the nextToken
parameter. If there are no more results, the response object's nextToken
parameter value is null
. Setting a nextToken
value that was not returned in your previous results causes an InvalidNextTokenException
to occur.NextToken
value that you can assign to the NextToken
request parameter to get the next set of results.dict
Response Syntax
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Tags (list) --
Tags that have been applied to the resource.
(dict) --
A map that contains tag keys and tag values to attach to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server. Leading and trailing white spaces are trimmed from both the key and value. A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.
Key (string) --
A tag key, such as Stage
or Name
. A tag key cannot be empty. The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /
Value (string) --
An optional tag value, such as Production
or test-owcm-server
. The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /
NextToken (string) --
A token that you can use as the value of NextToken
in subsequent calls to the API to show more results.
Exceptions
OpsWorksCM.Client.exceptions.ResourceNotFoundException
OpsWorksCM.Client.exceptions.ValidationException