AWS S3

Get object

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Retrieve objects from Amazon S3.

Inputs

Champ

Type

Description

region [required]

enum

default: us-east-1

bucket [required]

string

The bucket name containing 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-az_id.region.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide. Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide. Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. Access points and Object Lambda access points are not supported by directory buckets. S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

key [required]

string

Key of the object to get.

versionId

string

expectedBucketOwner

string

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.

responseParsing

enum

Use if you want to override the default response parsing method which is inferred from the HTTP headers of the object. Allowed enum values: raw,json

responseEncoding

enum

Use if you want to override the default encoding in response HTTP headers. Allowed enum values: ascii,utf8,utf-8,utf16le,ucs2,ucs-2,base64,base64url,latin1,binary,hex

Outputs

Champ

Type

Description

lastModified

date-time

Date and time when the object was last modified. General purpose buckets - When you specify a versionId of the object in your request, if the specified version in the request is a delete marker, the response returns a 405 Method Not Allowed error and the Last-Modified: timestamp response header.

contentLength

number

Size of the body in bytes.

eTag

string

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.

checksumSHA256

string

The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

versionId

string

Version ID of the object. This functionality is not supported for directory buckets.

contentType

string

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

serverSideEncryption

string

The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).

object

amzRequestId [required]

string