AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

This operation is not supported by directory buckets.

Sets the supplied tag-set to an object that already exists in a bucket. A tag is a key-value pair. For more information, see Object Tagging.

You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request. For more information, see GetObjectTagging.

For tagging-related restrictions related to characters and encodings, see Tag Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per object.

To use this operation, you must have permission to perform the s3:PutObjectTagging action. By default, the bucket owner has this permission and can grant this permission to others.

To put tags of any other version, use the versionId query parameter. You also need permission for the s3:PutObjectVersionTagging action.

PutObjectTagging has the following special errors. For more Amazon S3 errors see, Error Responses.

The following operations are related to PutObjectTagging:

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to PutObjectTaggingAsync.

Namespace: Amazon.S3
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public virtual PutObjectTaggingResponse PutObjectTagging(
         PutObjectTaggingRequest request
)

Parameters

request
Type: Amazon.S3.Model.PutObjectTaggingRequest

Container for the necessary parameters to execute the PutObjectTagging service method.

Return Value


The response from the PutObjectTagging service method, as returned by S3.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also