amazonka-s3-1.5.0: Amazon Simple Storage Service SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.S3.HeadObject

Contents

Description

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.

Synopsis

Creating a Request

headObject Source #

Creates a value of HeadObject with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • hoIfMatch - Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
  • hoVersionId - VersionId used to reference a specific version of the object.
  • hoSSECustomerAlgorithm - Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  • hoSSECustomerKey - 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 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.
  • hoRequestPayer - Undocumented member.
  • hoIfModifiedSince - Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
  • hoPartNumber - Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a ranged HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.
  • hoRange - Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  • hoIfUnmodifiedSince - Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
  • hoSSECustomerKeyMD5 - 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 the encryption key was transmitted without error.
  • hoIfNoneMatch - Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
  • hoBucket - Undocumented member.
  • hoKey - Undocumented member.

data HeadObject Source #

See: headObject smart constructor.

Instances

Eq HeadObject Source # 
Data HeadObject Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HeadObject -> c HeadObject #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HeadObject #

toConstr :: HeadObject -> Constr #

dataTypeOf :: HeadObject -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HeadObject) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HeadObject) #

gmapT :: (forall b. Data b => b -> b) -> HeadObject -> HeadObject #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HeadObject -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HeadObject -> r #

gmapQ :: (forall d. Data d => d -> u) -> HeadObject -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HeadObject -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HeadObject -> m HeadObject #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HeadObject -> m HeadObject #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HeadObject -> m HeadObject #

Show HeadObject Source # 
Generic HeadObject Source # 

Associated Types

type Rep HeadObject :: * -> * #

Hashable HeadObject Source # 
NFData HeadObject Source # 

Methods

rnf :: HeadObject -> () #

AWSRequest HeadObject Source # 
ToQuery HeadObject Source # 
ToPath HeadObject Source # 
ToHeaders HeadObject Source # 

Methods

toHeaders :: HeadObject -> [Header] #

type Rep HeadObject Source # 
type Rep HeadObject = D1 (MetaData "HeadObject" "Network.AWS.S3.HeadObject" "amazonka-s3-1.5.0-4i2REsRgyXL98WvgynC9is" False) (C1 (MetaCons "HeadObject'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_hoIfMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_hoVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectVersionId))) (S1 (MetaSel (Just Symbol "_hoSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_hoSSECustomerKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_hoRequestPayer") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RequestPayer))) (S1 (MetaSel (Just Symbol "_hoIfModifiedSince") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_hoPartNumber") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int))) ((:*:) (S1 (MetaSel (Just Symbol "_hoRange") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_hoIfUnmodifiedSince") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_hoSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_hoIfNoneMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_hoBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BucketName)) (S1 (MetaSel (Just Symbol "_hoKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ObjectKey)))))))
type Rs HeadObject Source # 

Request Lenses

hoIfMatch :: Lens' HeadObject (Maybe Text) Source #

Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).

hoVersionId :: Lens' HeadObject (Maybe ObjectVersionId) Source #

VersionId used to reference a specific version of the object.

hoSSECustomerAlgorithm :: Lens' HeadObject (Maybe Text) Source #

Specifies the algorithm to use to when encrypting the object (e.g., AES256).

hoSSECustomerKey :: Lens' HeadObject (Maybe Text) Source #

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 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.

hoIfModifiedSince :: Lens' HeadObject (Maybe UTCTime) Source #

Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).

hoPartNumber :: Lens' HeadObject (Maybe Int) Source #

Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a ranged HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.

hoRange :: Lens' HeadObject (Maybe Text) Source #

Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.

hoIfUnmodifiedSince :: Lens' HeadObject (Maybe UTCTime) Source #

Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).

hoSSECustomerKeyMD5 :: Lens' HeadObject (Maybe Text) Source #

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 the encryption key was transmitted without error.

hoIfNoneMatch :: Lens' HeadObject (Maybe Text) Source #

Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).

hoBucket :: Lens' HeadObject BucketName Source #

Undocumented member.

hoKey :: Lens' HeadObject ObjectKey Source #

Undocumented member.

Destructuring the Response

headObjectResponse Source #

Creates a value of HeadObjectResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • horsRequestCharged - Undocumented member.
  • horsPartsCount - The count of parts this object has.
  • horsETag - An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL
  • horsVersionId - Version of the object.
  • horsContentLength - Size of the body in bytes.
  • horsExpires - The date and time at which the object is no longer cacheable.
  • horsRestore - Provides information about object restoration operation and expiration time of the restored object copy.
  • horsExpiration - 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 providing object expiration information. The value of the rule-id is URL encoded.
  • horsDeleteMarker - Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
  • horsSSECustomerAlgorithm - If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
  • horsMissingMeta - This is 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.
  • horsWebsiteRedirectLocation - If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
  • horsAcceptRanges - Undocumented member.
  • horsStorageClass - Undocumented member.
  • horsSSECustomerKeyMD5 - If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.
  • horsSSEKMSKeyId - If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
  • horsContentEncoding - 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.
  • horsMetadata - A map of metadata to store with the object in S3.
  • horsReplicationStatus - Undocumented member.
  • horsCacheControl - Specifies caching behavior along the request/reply chain.
  • horsContentLanguage - The language the content is in.
  • horsLastModified - Last modified date of the object
  • horsContentDisposition - Specifies presentational information for the object.
  • horsServerSideEncryption - The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
  • horsContentType - A standard MIME type describing the format of the object data.
  • horsResponseStatus - -- | The response status code.

data HeadObjectResponse Source #

See: headObjectResponse smart constructor.

Instances

Eq HeadObjectResponse Source # 
Data HeadObjectResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HeadObjectResponse -> c HeadObjectResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HeadObjectResponse #

toConstr :: HeadObjectResponse -> Constr #

dataTypeOf :: HeadObjectResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HeadObjectResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HeadObjectResponse) #

gmapT :: (forall b. Data b => b -> b) -> HeadObjectResponse -> HeadObjectResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HeadObjectResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HeadObjectResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> HeadObjectResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HeadObjectResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HeadObjectResponse -> m HeadObjectResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HeadObjectResponse -> m HeadObjectResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HeadObjectResponse -> m HeadObjectResponse #

Show HeadObjectResponse Source # 
Generic HeadObjectResponse Source # 
NFData HeadObjectResponse Source # 

Methods

rnf :: HeadObjectResponse -> () #

type Rep HeadObjectResponse Source # 
type Rep HeadObjectResponse = D1 (MetaData "HeadObjectResponse" "Network.AWS.S3.HeadObject" "amazonka-s3-1.5.0-4i2REsRgyXL98WvgynC9is" False) (C1 (MetaCons "HeadObjectResponse'" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsRequestCharged") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RequestCharged))) ((:*:) (S1 (MetaSel (Just Symbol "_horsPartsCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int))) (S1 (MetaSel (Just Symbol "_horsETag") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ETag))))) ((:*:) (S1 (MetaSel (Just Symbol "_horsVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectVersionId))) ((:*:) (S1 (MetaSel (Just Symbol "_horsContentLength") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Integer))) (S1 (MetaSel (Just Symbol "_horsExpires") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsRestore") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_horsExpiration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsDeleteMarker") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsMissingMeta") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Int)))) ((:*:) (S1 (MetaSel (Just Symbol "_horsWebsiteRedirectLocation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsAcceptRanges") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsStorageClass") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe StorageClass))) ((:*:) (S1 (MetaSel (Just Symbol "_horsSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsSSEKMSKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text)))))) ((:*:) (S1 (MetaSel (Just Symbol "_horsContentEncoding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_horsMetadata") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Map Text Text))) (S1 (MetaSel (Just Symbol "_horsReplicationStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ReplicationStatus)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsCacheControl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_horsContentLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsLastModified") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_horsContentDisposition") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsServerSideEncryption") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ServerSideEncryption)))) ((:*:) (S1 (MetaSel (Just Symbol "_horsContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_horsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))))))

Response Lenses

horsPartsCount :: Lens' HeadObjectResponse (Maybe Int) Source #

The count of parts this object has.

horsETag :: Lens' HeadObjectResponse (Maybe ETag) Source #

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

horsExpires :: Lens' HeadObjectResponse (Maybe UTCTime) Source #

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

horsRestore :: Lens' HeadObjectResponse (Maybe Text) Source #

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

horsExpiration :: Lens' HeadObjectResponse (Maybe Text) Source #

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 providing object expiration information. The value of the rule-id is URL encoded.

horsDeleteMarker :: Lens' HeadObjectResponse (Maybe Bool) Source #

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.

horsSSECustomerAlgorithm :: Lens' HeadObjectResponse (Maybe Text) Source #

If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.

horsMissingMeta :: Lens' HeadObjectResponse (Maybe Int) Source #

This is 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.

horsWebsiteRedirectLocation :: Lens' HeadObjectResponse (Maybe Text) Source #

If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.

horsSSECustomerKeyMD5 :: Lens' HeadObjectResponse (Maybe Text) Source #

If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key.

horsSSEKMSKeyId :: Lens' HeadObjectResponse (Maybe Text) Source #

If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.

horsContentEncoding :: Lens' HeadObjectResponse (Maybe Text) Source #

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.

horsMetadata :: Lens' HeadObjectResponse (HashMap Text Text) Source #

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

horsCacheControl :: Lens' HeadObjectResponse (Maybe Text) Source #

Specifies caching behavior along the request/reply chain.

horsContentLanguage :: Lens' HeadObjectResponse (Maybe Text) Source #

The language the content is in.

horsLastModified :: Lens' HeadObjectResponse (Maybe UTCTime) Source #

Last modified date of the object

horsContentDisposition :: Lens' HeadObjectResponse (Maybe Text) Source #

Specifies presentational information for the object.

horsServerSideEncryption :: Lens' HeadObjectResponse (Maybe ServerSideEncryption) Source #

The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).

horsContentType :: Lens' HeadObjectResponse (Maybe Text) Source #

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

horsResponseStatus :: Lens' HeadObjectResponse Int Source #

  • - | The response status code.