OpsWorksCM.Client.
tag_resource
(**kwargs)¶Applies tags to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet Enterprise server, or to server backups.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Number (ARN) of a resource to which you want to apply tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE
.
[REQUIRED]
A map that contains tag keys and tag values to attach to AWS OpsWorks-CM servers or backups.
+ - = . _ : /
+ - = . _ : /
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.
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: + - = . _ : /
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: + - = . _ : /
dict
Response Syntax
{}
Response Structure
Exceptions
OpsWorksCM.Client.exceptions.ResourceNotFoundException
OpsWorksCM.Client.exceptions.ValidationException
OpsWorksCM.Client.exceptions.InvalidStateException