Skip to content

write_get_object_response async

write_get_object_response(
    request_route: RequestRoute,
    request_token: RequestToken,
    *,
    config_overrides: Optional[AsyncS3ClientConfig] = None,
    body: Optional[Body[AsyncIterator[bytes]] | AsyncIterator[bytes] | bytes] = None,
    status_code: Optional[GetObjectResponseStatusCode] = None,
    error_code: Optional[ErrorCode] = None,
    error_message: Optional[ErrorMessage] = None,
    accept_ranges: Optional[AcceptRanges] = None,
    cache_control: Optional[CacheControl] = None,
    content_disposition: Optional[ContentDisposition] = None,
    content_encoding: Optional[ContentEncoding] = None,
    content_language: Optional[ContentLanguage] = None,
    content_length: Optional[ContentLength] = None,
    content_range: Optional[ContentRange] = None,
    content_type: Optional[ContentType] = None,
    checksum_crc32: Optional[ChecksumCRC32] = None,
    checksum_crc32_c: Optional[ChecksumCRC32C] = None,
    checksum_crc64_nvme: Optional[ChecksumCRC64NVME] = None,
    checksum_sha1: Optional[ChecksumSHA1] = None,
    checksum_sha256: Optional[ChecksumSHA256] = None,
    checksum_sha512: Optional[ChecksumSHA512] = None,
    checksum_md5: Optional[ChecksumMD5] = None,
    checksum_xxhash64: Optional[ChecksumXXHASH64] = None,
    checksum_xxhash3: Optional[ChecksumXXHASH3] = None,
    checksum_xxhash128: Optional[ChecksumXXHASH128] = None,
    delete_marker: Optional[DeleteMarker] = None,
    e_tag: Optional[ETag] = None,
    expires: Optional[Expires] = None,
    expiration: Optional[Expiration] = None,
    last_modified: Optional[LastModified] = None,
    missing_meta: Optional[MissingMeta] = None,
    metadata: Optional[Metadata] = None,
    object_lock_mode: Optional[ObjectLockMode] = None,
    object_lock_legal_hold_status: Optional[ObjectLockLegalHoldStatus] = None,
    object_lock_retain_until_date: Optional[ObjectLockRetainUntilDate] = None,
    parts_count: Optional[PartsCount] = None,
    replication_status: Optional[ReplicationStatus] = None,
    request_charged: Optional[RequestCharged] = None,
    restore: Optional[Restore] = None,
    server_side_encryption: Optional[ServerSideEncryption] = None,
    sse_customer_algorithm: Optional[SSECustomerAlgorithm] = None,
    ssekms_key_id: Optional[SSEKMSKeyId] = None,
    sse_customer_key_md5: Optional[SSECustomerKeyMD5] = None,
    storage_class: Optional[StorageClass] = None,
    tag_count: Optional[TagCount] = None,
    version_id: Optional[ObjectVersionId] = None,
    bucket_key_enabled: Optional[BucketKeyEnabled] = None,
) -> None

This operation is not supported for directory buckets.

Passes transformed objects to a GetObject operation when using Object Lambda access points. For information about Object Lambda access points, see Transforming objects with Object Lambda access points in the Amazon S3 User Guide.

This operation supports metadata that can be returned by GetObject, in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage. The GetObject response metadata is supported so that the WriteGetObjectResponse caller, typically an Lambda function, can provide the same metadata when it internally invokes GetObject. When WriteGetObjectResponse is called by a customer-owned Lambda function, the metadata returned to the end user GetObject call might differ from what Amazon S3 would normally return.

You can include any number of metadata headers. When including a metadata header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this is to forward GetObject metadata.

Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket.

Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket.

Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP.

For information on how to view and use these functions, see Using Amazon Web Services built Lambda functions in the Amazon S3 User Guide.

You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.

Parameters:

  • request_route (RequestRoute) –

    Route prefix to the HTTP URL generated.

  • request_token (RequestToken) –

    A single use encrypted token that maps WriteGetObjectResponse to the end user GetObject request.

  • body (Optional[Body[AsyncIterator[bytes]] | AsyncIterator[bytes] | bytes], default: None ) –

    The object data.

  • status_code (Optional[GetObjectResponseStatusCode], default: None ) –

    The integer status code for an HTTP response of a corresponding GetObject request. The following is a list of status codes.

    • 200 - OK

    • 206 - Partial Content

    • 304 - Not Modified

    • 400 - Bad Request

    • 401 - Unauthorized

    • 403 - Forbidden

    • 404 - Not Found

    • 405 - Method Not Allowed

    • 409 - Conflict

    • 411 - Length Required

    • 412 - Precondition Failed

    • 416 - Range Not Satisfiable

    • 500 - Internal Server Error

    • 503 - Service Unavailable

  • error_code (Optional[ErrorCode], default: None ) –

    A string that uniquely identifies an error condition. Returned in the tag of the error XML response for a corresponding GetObject call. Cannot be used with a successful StatusCode header or when the transformed object is provided in the body. All error codes from S3 are sentence-cased. The regular expression (regex) value is "^[A-Z][a-zA-Z]+$".

  • error_message (Optional[ErrorMessage], default: None ) –

    Contains a generic description of the error condition. Returned in the tag of the error XML response for a corresponding GetObject call. Cannot be used with a successful StatusCode header or when the transformed object is provided in body.

  • accept_ranges (Optional[AcceptRanges], default: None ) –

    Indicates that a range of bytes was specified.

  • cache_control (Optional[CacheControl], default: None ) –

    Specifies caching behavior along the request/reply chain.

  • content_disposition (Optional[ContentDisposition], default: None ) –

    Specifies presentational information for the object.

  • content_encoding (Optional[ContentEncoding], default: None ) –

    Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.

  • content_language (Optional[ContentLanguage], default: None ) –

    The language the content is in.

  • content_length (Optional[ContentLength], default: None ) –

    The size of the content body in bytes.

  • content_range (Optional[ContentRange], default: None ) –

    The portion of the object returned in the response.

  • content_type (Optional[ContentType], default: None ) –

    A standard MIME type describing the format of the object data.

  • checksum_crc32 (Optional[ChecksumCRC32], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

    Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

  • checksum_crc32_c (Optional[ChecksumCRC32C], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

    Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

  • checksum_crc64_nvme (Optional[ChecksumCRC64NVME], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • checksum_sha1 (Optional[ChecksumSHA1], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

    Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

  • checksum_sha256 (Optional[ChecksumSHA256], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original GetObject request required checksum validation. For more information about checksums, see Checking object integrity in the Amazon S3 User Guide.

    Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.

  • checksum_sha512 (Optional[ChecksumSHA512], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit SHA512 digest of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • checksum_md5 (Optional[ChecksumMD5], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit MD5 digest of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • checksum_xxhash64 (Optional[ChecksumXXHASH64], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit XXHASH64 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • checksum_xxhash3 (Optional[ChecksumXXHASH3], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit XXHASH3 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • checksum_xxhash128 (Optional[ChecksumXXHASH128], default: None ) –

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit XXHASH128 checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

  • delete_marker (Optional[DeleteMarker], default: None ) –

    Specifies whether an object stored in Amazon S3 is (true) or is not (false) a delete marker. To learn more about delete markers, see Working with delete markers.

  • e_tag (Optional[ETag], default: None ) –

    An opaque identifier assigned by a web server to a specific version of a resource found at a URL.

  • expires (Optional[Expires], default: None ) –

    The date and time at which the object is no longer cacheable.

  • expiration (Optional[Expiration], default: None ) –

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs that provide the object expiration information. The value of the rule-id is URL-encoded.

  • last_modified (Optional[LastModified], default: None ) –

    The date and time that the object was last modified.

  • missing_meta (Optional[MissingMeta], default: None ) –

    Set to the number of metadata entries not returned in x-amz-meta headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.

  • metadata (Optional[Metadata], default: None ) –

    A map of metadata to store with the object in S3.

  • object_lock_mode (Optional[ObjectLockMode], default: None ) –

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information about S3 Object Lock, see Object Lock.

  • object_lock_legal_hold_status (Optional[ObjectLockLegalHoldStatus], default: None ) –

    Indicates whether an object stored in Amazon S3 has an active legal hold.

  • object_lock_retain_until_date (Optional[ObjectLockRetainUntilDate], default: None ) –

    The date and time when Object Lock is configured to expire.

  • parts_count (Optional[PartsCount], default: None ) –

    The count of parts this object has.

  • replication_status (Optional[ReplicationStatus], default: None ) –

    Indicates if request involves bucket that is either a source or destination in a Replication rule. For more information about S3 Replication, see Replication.

  • restore (Optional[Restore], default: None ) –

    Provides information about object restoration operation and expiration time of the restored object copy.

  • server_side_encryption (Optional[ServerSideEncryption], default: None ) –

    The server-side encryption algorithm used when storing requested object in Amazon S3 or Amazon FSx.

    When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is aws:fsx.

  • sse_customer_algorithm (Optional[SSECustomerAlgorithm], default: None ) –

    Encryption algorithm used if server-side encryption with a customer-provided encryption key was specified for object stored in Amazon S3.

  • ssekms_key_id (Optional[SSEKMSKeyId], default: None ) –

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in Amazon S3 object.

  • sse_customer_key_md5 (Optional[SSECustomerKeyMD5], default: None ) –

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data stored in S3. For more information, see Protecting data using server-side encryption with customer-provided encryption keys (SSE-C).

  • storage_class (Optional[StorageClass], default: None ) –

    Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.

    For more information, see Storage Classes.

  • tag_count (Optional[TagCount], default: None ) –

    The number of tags, if any, on the object.

  • version_id (Optional[ObjectVersionId], default: None ) –

    An ID used to reference a specific version of the object.

  • bucket_key_enabled (Optional[BucketKeyEnabled], default: None ) –

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

Raises:

Source code in docs_src/capo_s3/_services/async_s3.py
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
async def write_get_object_response(
    self,
    request_route: "capo_s3.types.request_route.RequestRoute",
    request_token: "capo_s3.types.request_token.RequestToken",
    *,
    config_overrides: Optional[AsyncS3ClientConfig] = None,
    body: Optional[
        Body[AsyncIterator[bytes]] | AsyncIterator[bytes] | bytes
    ] = None,
    status_code: Optional[
        "capo_s3.types.get_object_response_status_code.GetObjectResponseStatusCode"
    ] = None,
    error_code: Optional["capo_s3.types.error_code.ErrorCode"] = None,
    error_message: Optional["capo_s3.types.error_message.ErrorMessage"] = None,
    accept_ranges: Optional["capo_s3.types.accept_ranges.AcceptRanges"] = None,
    cache_control: Optional["capo_s3.types.cache_control.CacheControl"] = None,
    content_disposition: Optional[
        "capo_s3.types.content_disposition.ContentDisposition"
    ] = None,
    content_encoding: Optional[
        "capo_s3.types.content_encoding.ContentEncoding"
    ] = None,
    content_language: Optional[
        "capo_s3.types.content_language.ContentLanguage"
    ] = None,
    content_length: Optional["capo_s3.types.content_length.ContentLength"] = None,
    content_range: Optional["capo_s3.types.content_range.ContentRange"] = None,
    content_type: Optional["capo_s3.types.content_type.ContentType"] = None,
    checksum_crc32: Optional["capo_s3.types.checksum_crc32.ChecksumCRC32"] = None,
    checksum_crc32_c: Optional[
        "capo_s3.types.checksum_crc32_c.ChecksumCRC32C"
    ] = None,
    checksum_crc64_nvme: Optional[
        "capo_s3.types.checksum_crc64_nvme.ChecksumCRC64NVME"
    ] = None,
    checksum_sha1: Optional["capo_s3.types.checksum_sha1.ChecksumSHA1"] = None,
    checksum_sha256: Optional[
        "capo_s3.types.checksum_sha256.ChecksumSHA256"
    ] = None,
    checksum_sha512: Optional[
        "capo_s3.types.checksum_sha512.ChecksumSHA512"
    ] = None,
    checksum_md5: Optional["capo_s3.types.checksum_md5.ChecksumMD5"] = None,
    checksum_xxhash64: Optional[
        "capo_s3.types.checksum_xxhash64.ChecksumXXHASH64"
    ] = None,
    checksum_xxhash3: Optional[
        "capo_s3.types.checksum_xxhash3.ChecksumXXHASH3"
    ] = None,
    checksum_xxhash128: Optional[
        "capo_s3.types.checksum_xxhash128.ChecksumXXHASH128"
    ] = None,
    delete_marker: Optional["capo_s3.types.delete_marker.DeleteMarker"] = None,
    e_tag: Optional["capo_s3.types.e_tag.ETag"] = None,
    expires: Optional["capo_s3.types.expires.Expires"] = None,
    expiration: Optional["capo_s3.types.expiration.Expiration"] = None,
    last_modified: Optional["capo_s3.types.last_modified.LastModified"] = None,
    missing_meta: Optional["capo_s3.types.missing_meta.MissingMeta"] = None,
    metadata: Optional["capo_s3.types.metadata.Metadata"] = None,
    object_lock_mode: Optional[
        "capo_s3.types.object_lock_mode.ObjectLockMode"
    ] = None,
    object_lock_legal_hold_status: Optional[
        "capo_s3.types.object_lock_legal_hold_status.ObjectLockLegalHoldStatus"
    ] = None,
    object_lock_retain_until_date: Optional[
        "capo_s3.types.object_lock_retain_until_date.ObjectLockRetainUntilDate"
    ] = None,
    parts_count: Optional["capo_s3.types.parts_count.PartsCount"] = None,
    replication_status: Optional[
        "capo_s3.types.replication_status.ReplicationStatus"
    ] = None,
    request_charged: Optional[
        "capo_s3.types.request_charged.RequestCharged"
    ] = None,
    restore: Optional["capo_s3.types.restore.Restore"] = None,
    server_side_encryption: Optional[
        "capo_s3.types.server_side_encryption.ServerSideEncryption"
    ] = None,
    sse_customer_algorithm: Optional[
        "capo_s3.types.sse_customer_algorithm.SSECustomerAlgorithm"
    ] = None,
    ssekms_key_id: Optional["capo_s3.types.ssekms_key_id.SSEKMSKeyId"] = None,
    sse_customer_key_md5: Optional[
        "capo_s3.types.sse_customer_key_md5.SSECustomerKeyMD5"
    ] = None,
    storage_class: Optional["capo_s3.types.storage_class.StorageClass"] = None,
    tag_count: Optional["capo_s3.types.tag_count.TagCount"] = None,
    version_id: Optional["capo_s3.types.object_version_id.ObjectVersionId"] = None,
    bucket_key_enabled: Optional[
        "capo_s3.types.bucket_key_enabled.BucketKeyEnabled"
    ] = None,
) -> None:
    """<note> <p>This operation is not supported for directory buckets.</p> </note> <p>Passes transformed objects to a <code>GetObject</code> operation when using Object Lambda access points. For information about Object Lambda access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html">Transforming objects with Object Lambda access points</a> in the <i>Amazon S3 User Guide</i>.</p> <p>This operation supports metadata that can be returned by <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a>, in addition to <code>RequestRoute</code>, <code>RequestToken</code>, <code>StatusCode</code>, <code>ErrorCode</code>, and <code>ErrorMessage</code>. The <code>GetObject</code> response metadata is supported so that the <code>WriteGetObjectResponse</code> caller, typically an Lambda function, can provide the same metadata when it internally invokes <code>GetObject</code>. When <code>WriteGetObjectResponse</code> is called by a customer-owned Lambda function, the metadata returned to the end user <code>GetObject</code> call might differ from what Amazon S3 would normally return.</p> <p>You can include any number of metadata headers. When including a metadata header, it should be prefaced with <code>x-amz-meta</code>. For example, <code>x-amz-meta-my-custom-header: MyCustomValue</code>. The primary use case for this is to forward <code>GetObject</code> metadata.</p> <p>Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to detect and redact personally identifiable information (PII) and decompress S3 objects. These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.</p> <p>Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically detects personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural language processing (NLP) service using machine learning to find insights and relationships in text. It automatically redacts personally identifiable information (PII) such as names, addresses, dates, credit card numbers, and social security numbers from documents in your Amazon S3 bucket. </p> <p>Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is equipped to decompress objects stored in S3 in one of six compressed file formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. </p> <p>For information on how to view and use these functions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html">Using Amazon Web Services built Lambda functions</a> in the <i>Amazon S3 User Guide</i>.</p> <important> <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p> </important>

    Args:
        request_route: <p>Route prefix to the HTTP URL generated.</p>
        request_token: <p>A single use encrypted token that maps <code>WriteGetObjectResponse</code> to the end user <code>GetObject</code> request.</p>
        body: <p>The object data.</p>
        status_code: <p>The integer status code for an HTTP response of a corresponding <code>GetObject</code> request. The following is a list of status codes.</p> <ul> <li> <p> <code>200 - OK</code> </p> </li> <li> <p> <code>206 - Partial Content</code> </p> </li> <li> <p> <code>304 - Not Modified</code> </p> </li> <li> <p> <code>400 - Bad Request</code> </p> </li> <li> <p> <code>401 - Unauthorized</code> </p> </li> <li> <p> <code>403 - Forbidden</code> </p> </li> <li> <p> <code>404 - Not Found</code> </p> </li> <li> <p> <code>405 - Method Not Allowed</code> </p> </li> <li> <p> <code>409 - Conflict</code> </p> </li> <li> <p> <code>411 - Length Required</code> </p> </li> <li> <p> <code>412 - Precondition Failed</code> </p> </li> <li> <p> <code>416 - Range Not Satisfiable</code> </p> </li> <li> <p> <code>500 - Internal Server Error</code> </p> </li> <li> <p> <code>503 - Service Unavailable</code> </p> </li> </ul>
        error_code: <p>A string that uniquely identifies an error condition. Returned in the <Code> tag of the error XML response for a corresponding <code>GetObject</code> call. Cannot be used with a successful <code>StatusCode</code> header or when the transformed object is provided in the body. All error codes from S3 are sentence-cased. The regular expression (regex) value is <code>"^[A-Z][a-zA-Z]+$"</code>.</p>
        error_message: <p>Contains a generic description of the error condition. Returned in the <Message> tag of the error XML response for a corresponding <code>GetObject</code> call. Cannot be used with a successful <code>StatusCode</code> header or when the transformed object is provided in body.</p>
        accept_ranges: <p>Indicates that a range of bytes was specified.</p>
        cache_control: <p>Specifies caching behavior along the request/reply chain.</p>
        content_disposition: <p>Specifies presentational information for the object.</p>
        content_encoding: <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
        content_language: <p>The language the content is in.</p>
        content_length: <p>The size of the content body in bytes.</p>
        content_range: <p>The portion of the object returned in the response.</p>
        content_type: <p>A standard MIME type describing the format of the object data.</p>
        checksum_crc32: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original <code>GetObject</code> request required checksum validation. For more information about checksums, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> <p>Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.</p> <p></p>
        checksum_crc32_c: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original <code>GetObject</code> request required checksum validation. For more information about checksums, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> <p>Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.</p>
        checksum_crc64_nvme: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        checksum_sha1: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original <code>GetObject</code> request required checksum validation. For more information about checksums, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> <p>Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.</p>
        checksum_sha256: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object returned by the Object Lambda function. This may not match the checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values only when the original <code>GetObject</code> request required checksum validation. For more information about checksums, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p> <p>Only one checksum header can be specified at a time. If you supply multiple checksum headers, this request will fail.</p>
        checksum_sha512: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        checksum_md5: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        checksum_xxhash64: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        checksum_xxhash3: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        checksum_xxhash128: <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the part. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
        delete_marker: <p>Specifies whether an object stored in Amazon S3 is (<code>true</code>) or is not (<code>false</code>) a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p>
        e_tag: <p>An opaque identifier assigned by a web server to a specific version of a resource found at a URL. </p>
        expires: <p>The date and time at which the object is no longer cacheable.</p>
        expiration: <p>If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs that provide the object expiration information. The value of the <code>rule-id</code> is URL-encoded. </p>
        last_modified: <p>The date and time that the object was last modified.</p>
        missing_meta: <p>Set to the number of metadata entries not returned in <code>x-amz-meta</code> headers. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p>
        metadata: <p>A map of metadata to store with the object in S3.</p>
        object_lock_mode: <p>Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html">Object Lock</a>.</p>
        object_lock_legal_hold_status: <p>Indicates whether an object stored in Amazon S3 has an active legal hold.</p>
        object_lock_retain_until_date: <p>The date and time when Object Lock is configured to expire.</p>
        parts_count: <p>The count of parts this object has.</p>
        replication_status: <p>Indicates if request involves bucket that is either a source or destination in a Replication rule. For more information about S3 Replication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html">Replication</a>.</p>
        restore: <p>Provides information about object restoration operation and expiration time of the restored object copy.</p>
        server_side_encryption: <p> The server-side encryption algorithm used when storing requested object in Amazon S3 or Amazon FSx.</p> <note> <p>When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>.</p> </note>
        sse_customer_algorithm: <p>Encryption algorithm used if server-side encryption with a customer-provided encryption key was specified for object stored in Amazon S3.</p>
        ssekms_key_id: <p> If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in Amazon S3 object. </p>
        sse_customer_key_md5: <p> 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data stored in S3. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html">Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)</a>.</p>
        storage_class: <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p>
        tag_count: <p>The number of tags, if any, on the object.</p>
        version_id: <p>An ID used to reference a specific version of the object.</p>
        bucket_key_enabled: <p> Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side encryption with Amazon Web Services KMS (SSE-KMS).</p>

    Raises:
        capo_s3.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3.types.write_get_object_response_request.WriteGetObjectResponseRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_s3._operations.amazon_s3.write_get_object_response

        (
            output,
            http_response,
        ) = await capo_s3._operations.amazon_s3.write_get_object_response.async_write_get_object_response(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_s3.types.write_get_object_response_request.WriteGetObjectResponseRequest",
    ) -> dict[str, Any]:
        import capo_s3.types.write_get_object_response_request

        return capo_s3.types.write_get_object_response_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("WriteGetObjectResponse", redact_input=_redact_input),
    )
    input_: capo_s3.types.write_get_object_response_request.WriteGetObjectResponseRequest = {
        "request_route": request_route,
        "request_token": request_token,
    }
    if body is not None:
        input_["body"] = ensure_async_iterator(body)
    if status_code is not None:
        input_["status_code"] = status_code
    if error_code is not None:
        input_["error_code"] = error_code
    if error_message is not None:
        input_["error_message"] = error_message
    if accept_ranges is not None:
        input_["accept_ranges"] = accept_ranges
    if cache_control is not None:
        input_["cache_control"] = cache_control
    if content_disposition is not None:
        input_["content_disposition"] = content_disposition
    if content_encoding is not None:
        input_["content_encoding"] = content_encoding
    if content_language is not None:
        input_["content_language"] = content_language
    if content_length is not None:
        input_["content_length"] = content_length
    if content_range is not None:
        input_["content_range"] = content_range
    if content_type is not None:
        input_["content_type"] = content_type
    if checksum_crc32 is not None:
        input_["checksum_crc32"] = checksum_crc32
    if checksum_crc32_c is not None:
        input_["checksum_crc32_c"] = checksum_crc32_c
    if checksum_crc64_nvme is not None:
        input_["checksum_crc64_nvme"] = checksum_crc64_nvme
    if checksum_sha1 is not None:
        input_["checksum_sha1"] = checksum_sha1
    if checksum_sha256 is not None:
        input_["checksum_sha256"] = checksum_sha256
    if checksum_sha512 is not None:
        input_["checksum_sha512"] = checksum_sha512
    if checksum_md5 is not None:
        input_["checksum_md5"] = checksum_md5
    if checksum_xxhash64 is not None:
        input_["checksum_xxhash64"] = checksum_xxhash64
    if checksum_xxhash3 is not None:
        input_["checksum_xxhash3"] = checksum_xxhash3
    if checksum_xxhash128 is not None:
        input_["checksum_xxhash128"] = checksum_xxhash128
    if delete_marker is not None:
        input_["delete_marker"] = delete_marker
    if e_tag is not None:
        input_["e_tag"] = e_tag
    if expires is not None:
        input_["expires"] = expires
    if expiration is not None:
        input_["expiration"] = expiration
    if last_modified is not None:
        input_["last_modified"] = last_modified
    if missing_meta is not None:
        input_["missing_meta"] = missing_meta
    if metadata is not None:
        input_["metadata"] = metadata
    if object_lock_mode is not None:
        input_["object_lock_mode"] = object_lock_mode
    if object_lock_legal_hold_status is not None:
        input_["object_lock_legal_hold_status"] = object_lock_legal_hold_status
    if object_lock_retain_until_date is not None:
        input_["object_lock_retain_until_date"] = object_lock_retain_until_date
    if parts_count is not None:
        input_["parts_count"] = parts_count
    if replication_status is not None:
        input_["replication_status"] = replication_status
    if request_charged is not None:
        input_["request_charged"] = request_charged
    if restore is not None:
        input_["restore"] = restore
    if server_side_encryption is not None:
        input_["server_side_encryption"] = server_side_encryption
    if sse_customer_algorithm is not None:
        input_["sse_customer_algorithm"] = sse_customer_algorithm
    if ssekms_key_id is not None:
        input_["ssekms_key_id"] = ssekms_key_id
    if sse_customer_key_md5 is not None:
        input_["sse_customer_key_md5"] = sse_customer_key_md5
    if storage_class is not None:
        input_["storage_class"] = storage_class
    if tag_count is not None:
        input_["tag_count"] = tag_count
    if version_id is not None:
        input_["version_id"] = version_id
    if bucket_key_enabled is not None:
        input_["bucket_key_enabled"] = bucket_key_enabled

    async with aclosing_bodies(input_):
        response = await aexecute_pipeline(
            AsyncOperationRequest(input=input_, options=options_),
            handler=_handler,
            interceptors=list(interceptors_),
        )
        await response.response.aclose()
        return response.output