/AWS1/IF_S3=>PUTOBJECTANNOTATION()¶
About PutObjectAnnotation¶
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:
Method Signature¶
METHODS /AWS1/IF_S3~PUTOBJECTANNOTATION
IMPORTING
!IV_BUCKET TYPE /AWS1/S3_BUCKETNAME OPTIONAL
!IV_KEY TYPE /AWS1/S3_OBJECTKEY OPTIONAL
!IV_VERSIONID TYPE /AWS1/S3_OBJECTVERSIONID OPTIONAL
!IV_ANNOTATIONNAME TYPE /AWS1/S3_ANNOTATIONNAME OPTIONAL
!IV_ANNOTATIONPAYLOAD TYPE /AWS1/S3_STREAMINGBLOB OPTIONAL
!IV_OBJECTIFMATCH TYPE /AWS1/S3_OBJECTIFMATCH OPTIONAL
!IV_CHECKSUMALGORITHM TYPE /AWS1/S3_CHECKSUMALGORITHM OPTIONAL
!IV_CHECKSUMCRC32 TYPE /AWS1/S3_CHECKSUMCRC32 OPTIONAL
!IV_CHECKSUMCRC32C TYPE /AWS1/S3_CHECKSUMCRC32C OPTIONAL
!IV_CHECKSUMCRC64NVME TYPE /AWS1/S3_CHECKSUMCRC64NVME OPTIONAL
!IV_CHECKSUMSHA1 TYPE /AWS1/S3_CHECKSUMSHA1 OPTIONAL
!IV_CHECKSUMSHA256 TYPE /AWS1/S3_CHECKSUMSHA256 OPTIONAL
!IV_CHECKSUMSHA512 TYPE /AWS1/S3_CHECKSUMSHA512 OPTIONAL
!IV_CHECKSUMMD5 TYPE /AWS1/S3_CHECKSUMMD5 OPTIONAL
!IV_CHECKSUMXXHASH64 TYPE /AWS1/S3_CHECKSUMXXHASH64 OPTIONAL
!IV_CHECKSUMXXHASH3 TYPE /AWS1/S3_CHECKSUMXXHASH3 OPTIONAL
!IV_CHECKSUMXXHASH128 TYPE /AWS1/S3_CHECKSUMXXHASH128 OPTIONAL
!IV_CONTENTMD5 TYPE /AWS1/S3_CONTENTMD5 OPTIONAL
!IV_REQUESTPAYER TYPE /AWS1/S3_REQUESTPAYER OPTIONAL
!IV_EXPECTEDBUCKETOWNER TYPE /AWS1/S3_ACCOUNTID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3_putobjannotoutput
RAISING
/AWS1/CX_S3_ANNOTLIMITEXCEEDED
/AWS1/CX_S3_ANNOTNAMETOOLONG
/AWS1/CX_S3_INVALIDANNOTNAME
/AWS1/CX_S3_INVALIDREQUEST
/AWS1/CX_S3_NOSUCHBUCKET
/AWS1/CX_S3_NOSUCHKEY
/AWS1/CX_S3_UNSPPRTDMEDIATYPE
/AWS1/CX_S3_CLIENTEXC
/AWS1/CX_S3_SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_bucket TYPE /AWS1/S3_BUCKETNAME /AWS1/S3_BUCKETNAME¶
The name of the bucket that contains the object.
iv_key TYPE /AWS1/S3_OBJECTKEY /AWS1/S3_OBJECTKEY¶
The object key.
iv_annotationname TYPE /AWS1/S3_ANNOTATIONNAME /AWS1/S3_ANNOTATIONNAME¶
The name of the annotation.
Length Constraints: Minimum length of 1. Maximum length of 512 bytes.
iv_annotationpayload TYPE /AWS1/S3_STREAMINGBLOB /AWS1/S3_STREAMINGBLOB¶
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.
Optional arguments:¶
iv_versionid TYPE /AWS1/S3_OBJECTVERSIONID /AWS1/S3_OBJECTVERSIONID¶
The version ID of the object to attach the annotation to.
iv_objectifmatch TYPE /AWS1/S3_OBJECTIFMATCH /AWS1/S3_OBJECTIFMATCH¶
If specified, the operation only succeeds if the object's ETag matches the provided value.
iv_checksumalgorithm TYPE /AWS1/S3_CHECKSUMALGORITHM /AWS1/S3_CHECKSUMALGORITHM¶
The checksum algorithm to use. Supported values:
CRC32,CRC32C,CRC64NVME,SHA1,SHA256,SHA512,MD5,XXHASH64,XXHASH3,XXHASH128.
iv_checksumcrc32 TYPE /AWS1/S3_CHECKSUMCRC32 /AWS1/S3_CHECKSUMCRC32¶
Base64-encoded CRC32 checksum of the annotation payload.
iv_checksumcrc32c TYPE /AWS1/S3_CHECKSUMCRC32C /AWS1/S3_CHECKSUMCRC32C¶
Base64-encoded CRC32C checksum of the annotation payload.
iv_checksumcrc64nvme TYPE /AWS1/S3_CHECKSUMCRC64NVME /AWS1/S3_CHECKSUMCRC64NVME¶
Base64-encoded CRC64NVME checksum of the annotation payload.
iv_checksumsha1 TYPE /AWS1/S3_CHECKSUMSHA1 /AWS1/S3_CHECKSUMSHA1¶
Base64-encoded SHA1 checksum of the annotation payload.
iv_checksumsha256 TYPE /AWS1/S3_CHECKSUMSHA256 /AWS1/S3_CHECKSUMSHA256¶
Base64-encoded SHA256 checksum of the annotation payload.
iv_checksumsha512 TYPE /AWS1/S3_CHECKSUMSHA512 /AWS1/S3_CHECKSUMSHA512¶
Base64-encoded SHA512 checksum of the annotation payload.
iv_checksummd5 TYPE /AWS1/S3_CHECKSUMMD5 /AWS1/S3_CHECKSUMMD5¶
Base64-encoded MD5 checksum of the annotation payload.
iv_checksumxxhash64 TYPE /AWS1/S3_CHECKSUMXXHASH64 /AWS1/S3_CHECKSUMXXHASH64¶
Base64-encoded XXHASH64 checksum of the annotation payload.
iv_checksumxxhash3 TYPE /AWS1/S3_CHECKSUMXXHASH3 /AWS1/S3_CHECKSUMXXHASH3¶
Base64-encoded XXHASH3 checksum of the annotation payload.
iv_checksumxxhash128 TYPE /AWS1/S3_CHECKSUMXXHASH128 /AWS1/S3_CHECKSUMXXHASH128¶
Base64-encoded XXHASH128 checksum of the annotation payload.
iv_contentmd5 TYPE /AWS1/S3_CONTENTMD5 /AWS1/S3_CONTENTMD5¶
Base64-encoded MD5 digest of the message.
iv_requestpayer TYPE /AWS1/S3_REQUESTPAYER /AWS1/S3_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.
iv_expectedbucketowner TYPE /AWS1/S3_ACCOUNTID /AWS1/S3_ACCOUNTID¶
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.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3_putobjannotoutput /AWS1/CL_S3_PUTOBJANNOTOUTPUT¶
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->putobjectannotation(
iv_annotationname = |string|
iv_annotationpayload = '5347567362473873563239796247513D'
iv_bucket = |string|
iv_checksumalgorithm = |string|
iv_checksumcrc32 = |string|
iv_checksumcrc32c = |string|
iv_checksumcrc64nvme = |string|
iv_checksummd5 = |string|
iv_checksumsha1 = |string|
iv_checksumsha256 = |string|
iv_checksumsha512 = |string|
iv_checksumxxhash128 = |string|
iv_checksumxxhash3 = |string|
iv_checksumxxhash64 = |string|
iv_contentmd5 = |string|
iv_expectedbucketowner = |string|
iv_key = |string|
iv_objectifmatch = |string|
iv_requestpayer = |string|
iv_versionid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_objectkey = lo_result->get_key( ).
lv_annotationname = lo_result->get_annotationname( ).
lv_objectversionid = lo_result->get_objectversionid( ).
lv_etag = lo_result->get_etag( ).
lv_checksumcrc32 = lo_result->get_checksumcrc32( ).
lv_checksumcrc32c = lo_result->get_checksumcrc32c( ).
lv_checksumcrc64nvme = lo_result->get_checksumcrc64nvme( ).
lv_checksumsha1 = lo_result->get_checksumsha1( ).
lv_checksumsha256 = lo_result->get_checksumsha256( ).
lv_checksumsha512 = lo_result->get_checksumsha512( ).
lv_checksummd5 = lo_result->get_checksummd5( ).
lv_checksumxxhash64 = lo_result->get_checksumxxhash64( ).
lv_checksumxxhash3 = lo_result->get_checksumxxhash3( ).
lv_checksumxxhash128 = lo_result->get_checksumxxhash128( ).
lv_checksumtype = lo_result->get_checksumtype( ).
lv_serversideencryption = lo_result->get_serversideencryption( ).
lv_requestcharged = lo_result->get_requestcharged( ).
ENDIF.