OpsWorksCM / Client / list_tags_for_resource
list_tags_for_resource#
- OpsWorksCM.Client.list_tags_for_resource(**kwargs)#
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 )
- Parameters:
ResourceArn (string) –
[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
.NextToken (string) – NextToken is a string that is returned in some command responses. It indicates that not all entries have been returned, and that you must run at least one more request to get remaining items. To get remaining results, call
ListTagsForResource
again, and assign the token from the previous results as the value of thenextToken
parameter. If there are no more results, the response object’snextToken
parameter value isnull
. Setting anextToken
value that was not returned in your previous results causes anInvalidNextTokenException
to occur.MaxResults (integer) – To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a
NextToken
value that you can assign to theNextToken
request parameter to get the next set of results.
- Return type:
dict
- Returns:
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
orName
. 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
ortest-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