ConfigService / Client / tag_resource
tag_resource#
- ConfigService.Client.tag_resource(**kwargs)#
Associates the specified tags to a resource with the specified
ResourceArn
. If existing tags on a resource are not specified in the request parameters, they are not changed. If existing tags are specified, however, then their values will be updated. When a resource is deleted, the tags associated with that resource are deleted as well.See also: AWS API Documentation
Request Syntax
response = client.tag_resource( ResourceArn='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ResourceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. The following resources are supported:
ConfigurationRecorder
ConfigRule
OrganizationConfigRule
ConformancePack
OrganizationConformancePack
ConfigurationAggregator
AggregationAuthorization
StoredQuery
Tags (list) –
[REQUIRED]
An array of tag object.
(dict) –
The tags for the resource. The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Key (string) –
One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.
Value (string) –
The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).
- Returns:
None
Exceptions
ConfigService.Client.exceptions.ValidationException
ConfigService.Client.exceptions.ResourceNotFoundException
ConfigService.Client.exceptions.TooManyTagsException