S3Client.get_object_attributes
rboto-s3==0.4.0 · Service index · Types
Model summary (excerpt): Retrieves all of the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata. GetObjectAttributes combines the functionality of HeadObject and ListParts . All of the data returned with both of those individual calls can be returned with a single call to GetObjectAttributes . Directory buckets - For directory...
Install and imports
from rboto import S3Client
from collections.abc import Sequence
from rboto_s3.types import (
GetObjectAttributesOutput,
ObjectAttributes,
RequestPayer,
)
Signature
async def get_object_attributes(
*,
bucket: str,
key: str,
object_attributes: Sequence[ObjectAttributes],
version_id: str | None = None,
max_parts: int | None = None,
part_number_marker: str | None = None,
sse_customer_algorithm: str | None = None,
sse_customer_key: str | None = None,
sse_customer_key_md5: str | None = None,
request_payer: RequestPayer | None = None,
expected_bucket_owner: str | None = None,
) -> GetObjectAttributesOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
bucket |
Yes | The name of the bucket that contains the object. Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format Bucket-name .s3express- zone-id . region-code .amazonaws.com . Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must... |
key |
Yes | The object key. |
object_attributes |
Yes | Specifies the fields at the root level that you want returned in the response. Fields that you do not specify are not returned. |
version_id |
No | The version ID used to reference a specific version of the object. S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the versionId query parameter in the request. |
max_parts |
No | Sets the maximum number of parts to return. For more information, see Uploading and copying objects using multipart upload in Amazon S3 in the Amazon Simple Storage Service user guide . |
part_number_marker |
No | Specifies the part after which listing should begin. Only parts with higher part numbers will be listed. For more information, see Uploading and copying objects using multipart upload in Amazon S3 in the Amazon Simple Storage Service user guide . |
sse_customer_algorithm |
No | Specifies the algorithm to use when encrypting the object (for example, AES256). This functionality is not supported for directory buckets. |
sse_customer_key |
No | Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header. This functionality is not supported for directory buckets. |
sse_customer_key_md5 |
No | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error. This functionality is not supported for directory buckets. |
request_payer |
No | |
expected_bucket_owner |
No | The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied). |
Output
GetObjectAttributesOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
delete_marker |
bool | None |
Always present | — |
last_modified |
str | None |
Always present | — |
version_id |
str | None |
Always present | — |
request_charged |
RequestChargedOutput | None |
Always present | RequestChargedOutput |
e_tag |
str | None |
Always present | — |
checksum |
ChecksumOutput | None |
Always present | ChecksumOutput |
object_parts |
GetObjectAttributesPartsOutput | None |
Always present | GetObjectAttributesPartsOutput |
storage_class |
StorageClassOutput | None |
Always present | StorageClassOutput |
object_size |
int | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
GetObjectAttributesOutput, ObjectAttributes, RequestPayer
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_s3.exceptions:
Other service failures use the service base error; credential, transport and timeout failures use shared errors.