Skip to content

Retrieves an annotation from an Amazon S3 object

Description

Retrieves an annotation from an Amazon S3 object. To use this operation, you must have the s3:GetObjectAnnotation permission.

If checksum mode is enabled via the x-amz-checksum-mode header, Amazon S3 returns the stored checksum in the response headers for client-side validation.

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 get_object_annotation:

Usage

s3_get_object_annotation(Bucket, Key, AnnotationName, VersionId,
  RequestPayer, ExpectedBucketOwner, ChecksumMode)

Arguments

  • Bucket

[required] The name of the bucket that contains the object.

  • Key

[required] The object key.

  • AnnotationName

[required] The name of the annotation to retrieve.

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

  • VersionId

The version ID of the object.

  • RequestPayer

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

This functionality is not supported for directory buckets.

  • 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.

  • ChecksumMode

Set to ENABLED to validate the checksum of the annotation payload on retrieval.

Value

A list with the following syntax:

list(
  AnnotationPayload = raw,
  ObjectVersionId = "string",
  LastModified = as.POSIXct(
    "2015-01-01"
  ),
  ContentLength = 123,
  ETag = "string",
  ChecksumCRC32 = "string",
  ChecksumCRC32C = "string",
  ChecksumCRC64NVME = "string",
  ChecksumSHA1 = "string",
  ChecksumSHA256 = "string",
  ChecksumSHA512 = "string",
  ChecksumMD5 = "string",
  ChecksumXXHASH64 = "string",
  ChecksumXXHASH3 = "string",
  ChecksumXXHASH128 = "string",
  ChecksumType = "COMPOSITE"|"FULL_OBJECT",
  ServerSideEncryption = "AES256"|"aws:fsx"|"aws:backup"|"aws:kms"|"aws:kms:dsse",
  RequestCharged = "requester",
  ReplicationStatus = "COMPLETE"|"PENDING"|"FAILED"|"REPLICA"|"COMPLETED"
)

Request syntax

svc$get_object_annotation(
  Bucket = "string",
  Key = "string",
  AnnotationName = "string",
  VersionId = "string",
  RequestPayer = "requester",
  ExpectedBucketOwner = "string",
  ChecksumMode = "ENABLED"
)