ComputeOptimizerAutomation / Client / tag_resource
tag_resource¶
- ComputeOptimizerAutomation.Client.tag_resource(**kwargs)¶
Adds tags to the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource( resourceArn='string', ruleRevision=123, tags=[ { 'key': 'string', 'value': 'string' }, ], clientToken='string' )
- Parameters:
resourceArn (string) –
[REQUIRED]
The ARN of the resource to tag.
ruleRevision (integer) –
[REQUIRED]
The revision number of the automation rule to tag. This ensures you’re tagging the correct version of the rule.
tags (list) –
[REQUIRED]
The tags to add to the resource.
(dict) –
A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.
key (string) – [REQUIRED]
The tag key, which can be up to 128 characters long.
value (string) – [REQUIRED]
The tag value, which can be up to 256 characters long.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{}Response Structure
(dict) –
Exceptions
ComputeOptimizerAutomation.Client.exceptions.InvalidParameterValueExceptionComputeOptimizerAutomation.Client.exceptions.ForbiddenExceptionComputeOptimizerAutomation.Client.exceptions.OptInRequiredExceptionComputeOptimizerAutomation.Client.exceptions.ResourceNotFoundExceptionComputeOptimizerAutomation.Client.exceptions.ThrottlingExceptionComputeOptimizerAutomation.Client.exceptions.IdempotentParameterMismatchExceptionComputeOptimizerAutomation.Client.exceptions.AccessDeniedExceptionComputeOptimizerAutomation.Client.exceptions.InternalServerExceptionComputeOptimizerAutomation.Client.exceptions.ServiceUnavailableExceptionComputeOptimizerAutomation.Client.exceptions.IdempotencyTokenInUseException