

# TagResource
<a name="API_marketplace-deployment_TagResource"></a>

Tags a resource.

## Request Syntax
<a name="API_marketplace-deployment_TagResource_RequestSyntax"></a>

```
POST /tags/resourceArn HTTP/1.1
Content-type: application/json

{
   "tags": { 
      "string" : "string" 
   }
}
```

## URI Request Parameters
<a name="API_marketplace-deployment_TagResource_RequestParameters"></a>

The request uses the following URI parameters.

 ** [resourceArn](#API_marketplace-deployment_TagResource_RequestSyntax) **   <a name="AWSMarketplaceService-marketplace-deployment_TagResource-request-uri-resourceArn"></a>
The Amazon Resource Name (ARN) associated with the resource you want to tag.  
Required: Yes

## Request Body
<a name="API_marketplace-deployment_TagResource_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [tags](#API_marketplace-deployment_TagResource_RequestSyntax) **   <a name="AWSMarketplaceService-marketplace-deployment_TagResource-request-tags"></a>
A map of key-value pairs, where each pair represents a tag present on the resource.  
Type: String to string map  
Required: No

## Response Syntax
<a name="API_marketplace-deployment_TagResource_ResponseSyntax"></a>

```
HTTP/1.1 204
```

## Response Elements
<a name="API_marketplace-deployment_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

## Errors
<a name="API_marketplace-deployment_TagResource_Errors"></a>

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

 ** AccessDeniedException **   
You do not have sufficient access to perform this action.  
HTTP Status Code: 403

 ** ConflictException **   
The request configuration has conflicts. For details, see the accompanying error message.    
 ** resourceId **   
The unique identifier for the resource associated with the error.
HTTP Status Code: 409

 ** InternalServerException **   
There was an internal service exception.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified resource wasn't found.  
HTTP Status Code: 404

 ** ThrottlingException **   
Too many requests.  
HTTP Status Code: 429

 ** ValidationException **   
An error occurred during validation.    
 ** fieldName **   
The field name associated with the error.
HTTP Status Code: 400

## See Also
<a name="API_marketplace-deployment_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/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/marketplace-deployment-2023-01-25/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/marketplace-deployment-2023-01-25/TagResource) 