

# TagResource

Adds the specified tags to the specified resource.

## Request Parameters
<a name="API_TagResource_RequestParameters"></a>

 ** resourceArn **   
The Amazon Resource Name (ARN) of the resource.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

 ** tags **   
The tags for the resource.  
Type: String to string map  
Map Entries: Minimum number of 0 items. Maximum number of 200 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Value Length Constraints: Minimum length of 0. Maximum length of 256.  
Required: Yes

## Errors
<a name="API_TagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
The user does not have sufficient access to perform this action.    
 ** message **   
The error message.
HTTP Status Code: 403

 ** InternalServerException **   
An unexpected error occurred while processing the request.    
 ** message **   
The error message.
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The request references a resource that does not exist.    
 ** message **   
The error message.
HTTP Status Code: 404

 ** ServiceQuotaExceededException **   
The request would cause a service quota to be exceeded.    
 ** message **   
The error message.  
 ** quotaCode **   
The ID of the service quota that was exceeded.  
 ** resourceId **   
The ID of the resource that caused the service quota to be exceeded.  
 ** resourceType **   
The type of the resource that caused the service quota to be exceeded.  
 ** serviceCode **   
The code of the service associated with the exceeded quota.
HTTP Status Code: 402

 ** ThrottlingException **   
The limit on the number of requests per second was exceeded.    
 ** message **   
The error message.
HTTP Status Code: 429

 ** ValidationError **   
The input does not satisfy the constraints specified by an AWS service.  
HTTP Status Code: 400

## See Also
<a name="API_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for Python (Boto3)](https://docs.aws.amazon.com/goto/boto3/elb-proxy-2026-11-20/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/elb-proxy-2026-11-20/TagResource) 