@SdkInternalApi
    final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {

        ExecutionContext executionContext = createExecutionContext(tagResourceRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<TagResourceRequest> request = null;
        Response<TagResourceResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "OAM");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<TagResourceResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Assigns one or more tags (key-value pairs) to the specified resource. Both sinks and links can be tagged.
</p>
<p>
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values.
</p>
<p>
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of
characters.
</p>
<p>
You can use the <code>TagResource</code> action with a resource that already has tags. If you specify a new tag
key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key
that is already associated with the alarm, the new tag value that you specify replaces the previous value for
that tag.
</p>
<p>
You can associate as many as 50 tags with a resource.
</p>
<important>
<p>
Unlike tagging permissions in other Amazon Web Services services, to tag or untag links and sinks you must have
the <code>oam:ResourceTag</code> permission. The <code>iam:ResourceTag</code> permission does not allow you to
tag and untag links and sinks.
</p>
</important>

@param tagResourceRequest
@return Result of the TagResource operation returned by the service.
@throws ValidationException
        The value of a parameter in the request caused an error.
@throws TooManyTagsException
        A resource can have no more than 50 tags.
@throws ResourceNotFoundException
        The request references a resource that does not exist.
@sample AWSOAM.TagResource
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/TagResource" target="_top">AWS API
     Documentation</a>
aws-java-sdk-oam/src/main/java/com/amazonaws/services/oam/AWSOAMClient.java