Safe Haskell | None |
---|---|
Language | Haskell2010 |
Retrieves objects from Amazon S3.
http://docs.aws.amazon.com/AmazonS3/latest/API/GetObject.html
- data GetObject
- getObject :: Text -> Text -> GetObject
- goBucket :: Lens' GetObject Text
- goIfMatch :: Lens' GetObject (Maybe Text)
- goIfModifiedSince :: Lens' GetObject (Maybe UTCTime)
- goIfNoneMatch :: Lens' GetObject (Maybe Text)
- goIfUnmodifiedSince :: Lens' GetObject (Maybe UTCTime)
- goKey :: Lens' GetObject Text
- goRange :: Lens' GetObject (Maybe Text)
- goResponseCacheControl :: Lens' GetObject (Maybe Text)
- goResponseContentDisposition :: Lens' GetObject (Maybe Text)
- goResponseContentEncoding :: Lens' GetObject (Maybe Text)
- goResponseContentLanguage :: Lens' GetObject (Maybe Text)
- goResponseContentType :: Lens' GetObject (Maybe Text)
- goResponseExpires :: Lens' GetObject (Maybe UTCTime)
- goSSECustomerAlgorithm :: Lens' GetObject (Maybe Text)
- goSSECustomerKey :: Lens' GetObject (Maybe Text)
- goSSECustomerKeyMD5 :: Lens' GetObject (Maybe Text)
- goSSEKMSKeyId :: Lens' GetObject (Maybe Text)
- goVersionId :: Lens' GetObject (Maybe Text)
- data GetObjectResponse
- getObjectResponse :: RsBody -> GetObjectResponse
- gorAcceptRanges :: Lens' GetObjectResponse (Maybe Text)
- gorBody :: Lens' GetObjectResponse RsBody
- gorCacheControl :: Lens' GetObjectResponse (Maybe Text)
- gorContentDisposition :: Lens' GetObjectResponse (Maybe Text)
- gorContentEncoding :: Lens' GetObjectResponse (Maybe Text)
- gorContentLanguage :: Lens' GetObjectResponse (Maybe Text)
- gorContentLength :: Lens' GetObjectResponse (Maybe Int)
- gorContentType :: Lens' GetObjectResponse (Maybe Text)
- gorDeleteMarker :: Lens' GetObjectResponse (Maybe Bool)
- gorETag :: Lens' GetObjectResponse (Maybe Text)
- gorExpiration :: Lens' GetObjectResponse (Maybe UTCTime)
- gorExpires :: Lens' GetObjectResponse (Maybe UTCTime)
- gorLastModified :: Lens' GetObjectResponse (Maybe UTCTime)
- gorMetadata :: Lens' GetObjectResponse (HashMap (CI Text) Text)
- gorMissingMeta :: Lens' GetObjectResponse (Maybe Int)
- gorRestore :: Lens' GetObjectResponse (Maybe Text)
- gorSSECustomerAlgorithm :: Lens' GetObjectResponse (Maybe Text)
- gorSSECustomerKeyMD5 :: Lens' GetObjectResponse (Maybe Text)
- gorSSEKMSKeyId :: Lens' GetObjectResponse (Maybe Text)
- gorServerSideEncryption :: Lens' GetObjectResponse (Maybe Text)
- gorVersionId :: Lens' GetObjectResponse (Maybe Text)
- gorWebsiteRedirectLocation :: Lens' GetObjectResponse (Maybe Text)
Request
Request constructor
GetObject
constructor.
The fields accessible through corresponding lenses are:
goBucket
::
Text
goIfMatch
::
Maybe
Text
goIfModifiedSince
::
Maybe
UTCTime
goIfNoneMatch
::
Maybe
Text
goIfUnmodifiedSince
::
Maybe
UTCTime
goKey
::
Text
goRange
::
Maybe
Text
goResponseCacheControl
::
Maybe
Text
goResponseContentDisposition
::
Maybe
Text
goResponseContentEncoding
::
Maybe
Text
goResponseContentLanguage
::
Maybe
Text
goResponseContentType
::
Maybe
Text
goResponseExpires
::
Maybe
UTCTime
goSSECustomerAlgorithm
::
Maybe
Text
goSSECustomerKey
::
Maybe
Text
goSSECustomerKeyMD5
::
Maybe
Text
goSSEKMSKeyId
::
Maybe
Text
goVersionId
::
Maybe
Text
Request lenses
goIfMatch :: Lens' GetObject (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).
goIfModifiedSince :: Lens' GetObject (Maybe UTCTime) Source
Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
goIfNoneMatch :: Lens' GetObject (Maybe Text) Source
Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
goIfUnmodifiedSince :: Lens' GetObject (Maybe UTCTime) Source
Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
goRange :: Lens' GetObject (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.
goResponseCacheControl :: Lens' GetObject (Maybe Text) Source
Sets the Cache-Control header of the response.
goResponseContentDisposition :: Lens' GetObject (Maybe Text) Source
Sets the Content-Disposition header of the response.
goResponseContentEncoding :: Lens' GetObject (Maybe Text) Source
Sets the Content-Encoding header of the response.
goResponseContentLanguage :: Lens' GetObject (Maybe Text) Source
Sets the Content-Language header of the response.
goResponseContentType :: Lens' GetObject (Maybe Text) Source
Sets the Content-Type header of the response.
goSSECustomerAlgorithm :: Lens' GetObject (Maybe Text) Source
Specifies the algorithm to use to when encrypting the object (e.g., AES256, aws:kms).
goSSECustomerKey :: Lens' GetObject (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.
goSSECustomerKeyMD5 :: Lens' GetObject (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.
goSSEKMSKeyId :: Lens' GetObject (Maybe Text) Source
Specifies the AWS KMS key ID to use for object encryption.
goVersionId :: Lens' GetObject (Maybe Text) Source
VersionId used to reference a specific version of the object.
Response
Response constructor
GetObjectResponse
constructor.
The fields accessible through corresponding lenses are:
gorAcceptRanges
::
Maybe
Text
gorBody
::
RsBody
gorCacheControl
::
Maybe
Text
gorContentDisposition
::
Maybe
Text
gorContentEncoding
::
Maybe
Text
gorContentLanguage
::
Maybe
Text
gorContentLength
::
Maybe
Int
gorContentType
::
Maybe
Text
gorDeleteMarker
::
Maybe
Bool
gorETag
::
Maybe
Text
gorExpiration
::
Maybe
UTCTime
gorExpires
::
Maybe
UTCTime
gorLastModified
::
Maybe
UTCTime
gorMetadata
::
HashMap
(CI
Text
)Text
gorMissingMeta
::
Maybe
Int
gorRestore
::
Maybe
Text
gorSSECustomerAlgorithm
::
Maybe
Text
gorSSECustomerKeyMD5
::
Maybe
Text
gorSSEKMSKeyId
::
Maybe
Text
gorServerSideEncryption
::
Maybe
Text
gorVersionId
::
Maybe
Text
gorWebsiteRedirectLocation
::
Maybe
Text
Response lenses
gorBody :: Lens' GetObjectResponse RsBody Source
Object data.
gorCacheControl :: Lens' GetObjectResponse (Maybe Text) Source
Specifies caching behavior along the request/reply chain.
gorContentDisposition :: Lens' GetObjectResponse (Maybe Text) Source
Specifies presentational information for the object.
gorContentEncoding :: Lens' GetObjectResponse (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.
gorContentLanguage :: Lens' GetObjectResponse (Maybe Text) Source
The language the content is in.
gorContentLength :: Lens' GetObjectResponse (Maybe Int) Source
Size of the body in bytes.
gorContentType :: Lens' GetObjectResponse (Maybe Text) Source
A standard MIME type describing the format of the object data.
gorDeleteMarker :: Lens' GetObjectResponse (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.
gorETag :: Lens' GetObjectResponse (Maybe Text) Source
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
gorExpiration :: Lens' GetObjectResponse (Maybe UTCTime) 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.
gorExpires :: Lens' GetObjectResponse (Maybe UTCTime) Source
The date and time at which the object is no longer cacheable.
gorLastModified :: Lens' GetObjectResponse (Maybe UTCTime) Source
Last modified date of the object.
gorMetadata :: Lens' GetObjectResponse (HashMap (CI Text) Text) Source
A map of metadata to store with the object in S3.
gorMissingMeta :: Lens' GetObjectResponse (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.
gorRestore :: Lens' GetObjectResponse (Maybe Text) Source
Provides information about object restoration operation and expiration time of the restored object copy.
gorSSECustomerAlgorithm :: Lens' GetObjectResponse (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.
gorSSECustomerKeyMD5 :: Lens' GetObjectResponse (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.
gorSSEKMSKeyId :: Lens' GetObjectResponse (Maybe Text) Source
If present, specifies the AWS KMS key used to encrypt the object.
gorServerSideEncryption :: Lens' GetObjectResponse (Maybe Text) Source
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
gorVersionId :: Lens' GetObjectResponse (Maybe Text) Source
Version of the object.
gorWebsiteRedirectLocation :: Lens' GetObjectResponse (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.