

# TagResource


Add a tag to the specified resource.

## Request Syntax


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

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

## URI Request Parameters


The request uses the following URI parameters.

 ** [resourceArn](#API_TagResource_RequestSyntax) **   <a name="braket-TagResource-request-uri-resourceArn"></a>
Specify the `resourceArn` of the resource to which a tag will be added.  
Required: Yes

## Request Body


The request accepts the following data in JSON format.

 ** [tags](#API_TagResource_RequestSyntax) **   <a name="braket-TagResource-request-tags"></a>
Specify the tags to add to the resource. Tags can be specified as a key-value map.  
Type: String to string map  
Required: Yes

## Response Syntax


```
HTTP/1.1 200
```

## Response Elements


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

## Errors


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

 ** InternalServiceException **   
The request failed because of an unknown error.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
The specified resource was not found.  
HTTP Status Code: 404

 ** ValidationException **   
The input request failed to satisfy constraints expected by Amazon Braket.    
 ** programSetValidationFailures **   
The validation failures in the program set submitted in the request.  
 ** reason **   
The reason for validation failure.
HTTP Status Code: 400

## See Also


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/braket-2019-09-01/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/braket-2019-09-01/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/braket-2019-09-01/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/braket-2019-09-01/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/braket-2019-09-01/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/braket-2019-09-01/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/braket-2019-09-01/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/braket-2019-09-01/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/braket-2019-09-01/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/braket-2019-09-01/TagResource) 