HeadObject
A operação HEAD recupera metadados de um objeto sem retornar o próprio objeto. Esta operação é útil se você estiver interessado apenas nos metadados de um objeto. Para usar HEAD, você deve ter acesso de READ ao objeto.
Request Syntax
HEAD /Key+?PartNumber=PartNumber&VersionId=VersionId HTTP/1.1 Host: bucket-name.bigfile.brascloud.com.br:443 If-Match: IfMatch If-Modified-Since: IfModifiedSince If-None-Match: IfNoneMatch If-Unmodified-Since: IfUnmodifiedSince Range: Range x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm x-amz-server-side-encryption-customer-key: SSECustomerKey x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5 x-amz-request-payer: RequestPayer
Response Syntax
HTTP/1.1 200 x-amz-delete-marker: DeleteMarker accept-ranges: AcceptRanges x-amz-expiration: Expiration x-amz-restore: Restore Last-Modified: LastModified Content-Length: ContentLength ETag: ETag x-amz-missing-meta: MissingMeta x-amz-version-id: VersionId Cache-Control: CacheControl Content-Disposition: ContentDisposition Content-Encoding: ContentEncoding Content-Language: ContentLanguage Content-Type: ContentType Expires: Expires x-amz-website-redirect-location: WebsiteRedirectLocation x-amz-server-side-encryption: ServerSideEncryption x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5 x-amz-server-side-encryption-aws-kms-key-id: SSEKMSKeyId x-amz-storage-class: StorageClass x-amz-request-charged: RequestCharged x-amz-replication-status: ReplicationStatus x-amz-mp-parts-count: PartsCount x-amz-object-lock-mode: ObjectLockMode x-amz-object-lock-retain-until-date: ObjectLockRetainUntilDate x-amz-object-lock-legal-hold: ObjectLockLegalHoldStatus
Exemplos
A solicitação a seguir retorna os metadados de um objeto.
Request
HEAD /my-image.jpg HTTP/1.1 Host: bucket.bigfile.brascloud.com.br:443 Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: AKIAIOSFODNN7EXAMPLE:02236Q3V0RonhpaBX5sCYVf1bNRuU=
Response
HTTP/1.1 200 OK x-amz-id-2: ef8yU9AS1ed4OpIszj7UDNEHGran x-amz-request-id: 318BC8BC143432E5 x-amz-version-id: 3HL4kqtJlcpXroDTDmjVBH40Nrjfkd Date: Wed, 28 Oct 2009 22:32:00 GMT Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT ETag: "fba9dede5f27731c9771645a39863328" Content-Length: 434234 Content-Type: text/plain Connection: close Server: BigFile