AWS SDK Version 4 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.

Container for the parameters to the PutObjectAnnotation operation. Attaches an annotation to an Amazon S3 object. An annotation is a named payload of 1 byte to 1 MiB that you can associate with a specific object or object version. Each object can have up to 1,000 annotations.

For annotation naming rules and restrictions, see Annotation naming guidelines in the Amazon S3 User Guide.

Annotations inherit the encryption of their parent object. For objects without server-side encryption, annotations are encrypted with SSE-S3 (the default for new objects). Objects encrypted with SSE-C cannot have annotations.

To use this operation, you must have the s3:PutObjectAnnotation permission. If the bucket has Requester Pays enabled, you must include the x-amz-request-payer header.

Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon S3 File Gateway, Amazon FSx, S3 on Outposts, and S3 Express One Zone (directory buckets).

The following operations are related to PutObjectAnnotation:

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.S3.Model.PutObjectAnnotationRequest

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

Syntax

C#
public class PutObjectAnnotationRequest : AmazonWebServiceRequest
         IAmazonWebServiceRequest

The PutObjectAnnotationRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AnnotationName System.String

Gets and sets the property AnnotationName.

The name of the annotation.

Length Constraints: Minimum length of 1. Maximum length of 512 bytes.

Public Property AnnotationPayload System.IO.MemoryStream

Gets and sets the property AnnotationPayload.

The annotation payload. Must be between 1 byte and 1 MiB in size, and must be valid UTF-8 encoded text. If the payload contains invalid UTF-8 bytes, the request fails with HTTP 415 (Unsupported Media Type). To store binary data, encode the payload using Base64 before uploading.

Public Property BucketName System.String

Gets and sets the property BucketName.

The name of the bucket that contains the object.

Public Property ChecksumAlgorithm Amazon.S3.ChecksumAlgorithm

Gets and sets the property ChecksumAlgorithm.

The checksum algorithm to use. Supported values: CRC32, CRC32C, CRC64NVME, SHA1, SHA256, SHA512, MD5, XXHASH64, XXHASH3, XXHASH128.

Public Property ChecksumCRC32 System.String

Gets and sets the property ChecksumCRC32.

Base64-encoded CRC32 checksum of the annotation payload.

Public Property ChecksumCRC32C System.String

Gets and sets the property ChecksumCRC32C.

Base64-encoded CRC32C checksum of the annotation payload.

Public Property ChecksumCRC64NVME System.String

Gets and sets the property ChecksumCRC64NVME.

Base64-encoded CRC64NVME checksum of the annotation payload.

Public Property ChecksumMD5 System.String

Gets and sets the property ChecksumMD5.

Base64-encoded MD5 checksum of the annotation payload.

Public Property ChecksumSHA1 System.String

Gets and sets the property ChecksumSHA1.

Base64-encoded SHA1 checksum of the annotation payload.

Public Property ChecksumSHA256 System.String

Gets and sets the property ChecksumSHA256.

Base64-encoded SHA256 checksum of the annotation payload.

Public Property ChecksumSHA512 System.String

Gets and sets the property ChecksumSHA512.

Base64-encoded SHA512 checksum of the annotation payload.

Public Property ChecksumXXHASH128 System.String

Gets and sets the property ChecksumXXHASH128.

Base64-encoded XXHASH128 checksum of the annotation payload.

Public Property ChecksumXXHASH3 System.String

Gets and sets the property ChecksumXXHASH3.

Base64-encoded XXHASH3 checksum of the annotation payload.

Public Property ChecksumXXHASH64 System.String

Gets and sets the property ChecksumXXHASH64.

Base64-encoded XXHASH64 checksum of the annotation payload.

Public Property ContentMD5 System.String

Gets and sets the property ContentMD5.

Base64-encoded MD5 digest of the message.

Public Property ExpectedBucketOwner System.String

Gets and sets the property ExpectedBucketOwner.

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.

Public Property Key System.String

Gets and sets the property Key.

The object key.

Public Property ObjectIfMatch System.String

Gets and sets the property ObjectIfMatch.

If specified, the operation only succeeds if the object's ETag matches the provided value.

Public Property RequestPayer Amazon.S3.RequestPayer

Gets and sets the property RequestPayer.

Public Property VersionId System.String

Gets and sets the property VersionId.

The version ID of the object to attach the annotation to.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer