Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Retrieves objects from Amazon S3.
- getObject :: BucketName -> ObjectKey -> GetObject
- data GetObject
- goIfMatch :: Lens' GetObject (Maybe Text)
- goVersionId :: Lens' GetObject (Maybe ObjectVersionId)
- goResponseContentType :: Lens' GetObject (Maybe Text)
- goResponseContentDisposition :: Lens' GetObject (Maybe Text)
- goResponseContentLanguage :: Lens' GetObject (Maybe Text)
- goSSECustomerAlgorithm :: Lens' GetObject (Maybe Text)
- goSSECustomerKey :: Lens' GetObject (Maybe Text)
- goRequestPayer :: Lens' GetObject (Maybe RequestPayer)
- goResponseContentEncoding :: Lens' GetObject (Maybe Text)
- goIfModifiedSince :: Lens' GetObject (Maybe UTCTime)
- goPartNumber :: Lens' GetObject (Maybe Int)
- goRange :: Lens' GetObject (Maybe Text)
- goIfUnmodifiedSince :: Lens' GetObject (Maybe UTCTime)
- goSSECustomerKeyMD5 :: Lens' GetObject (Maybe Text)
- goResponseCacheControl :: Lens' GetObject (Maybe Text)
- goResponseExpires :: Lens' GetObject (Maybe UTCTime)
- goIfNoneMatch :: Lens' GetObject (Maybe Text)
- goBucket :: Lens' GetObject BucketName
- goKey :: Lens' GetObject ObjectKey
- getObjectResponse :: Int -> RsBody -> GetObjectResponse
- data GetObjectResponse
- gorsRequestCharged :: Lens' GetObjectResponse (Maybe RequestCharged)
- gorsPartsCount :: Lens' GetObjectResponse (Maybe Int)
- gorsETag :: Lens' GetObjectResponse (Maybe ETag)
- gorsVersionId :: Lens' GetObjectResponse (Maybe ObjectVersionId)
- gorsContentLength :: Lens' GetObjectResponse (Maybe Integer)
- gorsExpires :: Lens' GetObjectResponse (Maybe UTCTime)
- gorsRestore :: Lens' GetObjectResponse (Maybe Text)
- gorsExpiration :: Lens' GetObjectResponse (Maybe Text)
- gorsDeleteMarker :: Lens' GetObjectResponse (Maybe Bool)
- gorsSSECustomerAlgorithm :: Lens' GetObjectResponse (Maybe Text)
- gorsTagCount :: Lens' GetObjectResponse (Maybe Int)
- gorsMissingMeta :: Lens' GetObjectResponse (Maybe Int)
- gorsWebsiteRedirectLocation :: Lens' GetObjectResponse (Maybe Text)
- gorsAcceptRanges :: Lens' GetObjectResponse (Maybe Text)
- gorsStorageClass :: Lens' GetObjectResponse (Maybe StorageClass)
- gorsSSECustomerKeyMD5 :: Lens' GetObjectResponse (Maybe Text)
- gorsSSEKMSKeyId :: Lens' GetObjectResponse (Maybe Text)
- gorsContentEncoding :: Lens' GetObjectResponse (Maybe Text)
- gorsMetadata :: Lens' GetObjectResponse (HashMap Text Text)
- gorsReplicationStatus :: Lens' GetObjectResponse (Maybe ReplicationStatus)
- gorsCacheControl :: Lens' GetObjectResponse (Maybe Text)
- gorsContentLanguage :: Lens' GetObjectResponse (Maybe Text)
- gorsLastModified :: Lens' GetObjectResponse (Maybe UTCTime)
- gorsContentDisposition :: Lens' GetObjectResponse (Maybe Text)
- gorsContentRange :: Lens' GetObjectResponse (Maybe Text)
- gorsServerSideEncryption :: Lens' GetObjectResponse (Maybe ServerSideEncryption)
- gorsContentType :: Lens' GetObjectResponse (Maybe Text)
- gorsResponseStatus :: Lens' GetObjectResponse Int
- gorsBody :: Lens' GetObjectResponse RsBody
Creating a Request
Creates a value of GetObject
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
goIfMatch
- Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).goVersionId
- VersionId used to reference a specific version of the object.goResponseContentType
- Sets the Content-Type header of the response.goResponseContentDisposition
- Sets the Content-Disposition header of the responsegoResponseContentLanguage
- Sets the Content-Language header of the response.goSSECustomerAlgorithm
- Specifies the algorithm to use to when encrypting the object (e.g., AES256).goSSECustomerKey
- 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.goRequestPayer
- Undocumented member.goResponseContentEncoding
- Sets the Content-Encoding header of the response.goIfModifiedSince
- Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).goPartNumber
- Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs aranged
GET request for the part specified. Useful for downloading just a part of an object.goRange
- 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.goIfUnmodifiedSince
- Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).goSSECustomerKeyMD5
- 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.goResponseCacheControl
- Sets the Cache-Control header of the response.goResponseExpires
- Sets the Expires header of the response.goIfNoneMatch
- Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).goBucket
- Undocumented member.goKey
- Undocumented member.
See: getObject
smart constructor.
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).
goVersionId :: Lens' GetObject (Maybe ObjectVersionId) Source #
VersionId used to reference a specific version of the object.
goResponseContentType :: Lens' GetObject (Maybe Text) Source #
Sets the Content-Type header of the response.
goResponseContentDisposition :: Lens' GetObject (Maybe Text) Source #
Sets the Content-Disposition header of the response
goResponseContentLanguage :: Lens' GetObject (Maybe Text) Source #
Sets the Content-Language header of the response.
goSSECustomerAlgorithm :: Lens' GetObject (Maybe Text) Source #
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
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.
goRequestPayer :: Lens' GetObject (Maybe RequestPayer) Source #
Undocumented member.
goResponseContentEncoding :: Lens' GetObject (Maybe Text) Source #
Sets the Content-Encoding header of the response.
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).
goPartNumber :: Lens' GetObject (Maybe Int) Source #
Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a ranged
GET request for the part specified. Useful for downloading just a part of an object.
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.
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).
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.
goResponseCacheControl :: Lens' GetObject (Maybe Text) Source #
Sets the Cache-Control header of the response.
goResponseExpires :: Lens' GetObject (Maybe UTCTime) Source #
Sets the Expires header of the response.
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).
Destructuring the Response
Creates a value of GetObjectResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gorsRequestCharged
- Undocumented member.gorsPartsCount
- The count of parts this object has.gorsETag
- An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URLgorsVersionId
- Version of the object.gorsContentLength
- Size of the body in bytes.gorsExpires
- The date and time at which the object is no longer cacheable.gorsRestore
- Provides information about object restoration operation and expiration time of the restored object copy.gorsExpiration
- 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.gorsDeleteMarker
- 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.gorsSSECustomerAlgorithm
- If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.gorsTagCount
- The number of tags, if any, on the object.gorsMissingMeta
- 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.gorsWebsiteRedirectLocation
- 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.gorsAcceptRanges
- Undocumented member.gorsStorageClass
- Undocumented member.gorsSSECustomerKeyMD5
- 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.gorsSSEKMSKeyId
- If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.gorsContentEncoding
- 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.gorsMetadata
- A map of metadata to store with the object in S3.gorsReplicationStatus
- Undocumented member.gorsCacheControl
- Specifies caching behavior along the request/reply chain.gorsContentLanguage
- The language the content is in.gorsLastModified
- Last modified date of the objectgorsContentDisposition
- Specifies presentational information for the object.gorsContentRange
- The portion of the object returned in the response.gorsServerSideEncryption
- The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).gorsContentType
- A standard MIME type describing the format of the object data.gorsResponseStatus
- -- | The response status code.gorsBody
- Object data.
data GetObjectResponse Source #
See: getObjectResponse
smart constructor.
Response Lenses
gorsRequestCharged :: Lens' GetObjectResponse (Maybe RequestCharged) Source #
Undocumented member.
gorsPartsCount :: Lens' GetObjectResponse (Maybe Int) Source #
The count of parts this object has.
gorsETag :: Lens' GetObjectResponse (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
gorsVersionId :: Lens' GetObjectResponse (Maybe ObjectVersionId) Source #
Version of the object.
gorsContentLength :: Lens' GetObjectResponse (Maybe Integer) Source #
Size of the body in bytes.
gorsExpires :: Lens' GetObjectResponse (Maybe UTCTime) Source #
The date and time at which the object is no longer cacheable.
gorsRestore :: Lens' GetObjectResponse (Maybe Text) Source #
Provides information about object restoration operation and expiration time of the restored object copy.
gorsExpiration :: Lens' GetObjectResponse (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.
gorsDeleteMarker :: 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.
gorsSSECustomerAlgorithm :: 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.
gorsTagCount :: Lens' GetObjectResponse (Maybe Int) Source #
The number of tags, if any, on the object.
gorsMissingMeta :: 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.
gorsWebsiteRedirectLocation :: 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.
gorsAcceptRanges :: Lens' GetObjectResponse (Maybe Text) Source #
Undocumented member.
gorsStorageClass :: Lens' GetObjectResponse (Maybe StorageClass) Source #
Undocumented member.
gorsSSECustomerKeyMD5 :: 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.
gorsSSEKMSKeyId :: Lens' GetObjectResponse (Maybe Text) Source #
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
gorsContentEncoding :: 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.
gorsMetadata :: Lens' GetObjectResponse (HashMap Text Text) Source #
A map of metadata to store with the object in S3.
gorsReplicationStatus :: Lens' GetObjectResponse (Maybe ReplicationStatus) Source #
Undocumented member.
gorsCacheControl :: Lens' GetObjectResponse (Maybe Text) Source #
Specifies caching behavior along the request/reply chain.
gorsContentLanguage :: Lens' GetObjectResponse (Maybe Text) Source #
The language the content is in.
gorsLastModified :: Lens' GetObjectResponse (Maybe UTCTime) Source #
Last modified date of the object
gorsContentDisposition :: Lens' GetObjectResponse (Maybe Text) Source #
Specifies presentational information for the object.
gorsContentRange :: Lens' GetObjectResponse (Maybe Text) Source #
The portion of the object returned in the response.
gorsServerSideEncryption :: Lens' GetObjectResponse (Maybe ServerSideEncryption) Source #
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
gorsContentType :: Lens' GetObjectResponse (Maybe Text) Source #
A standard MIME type describing the format of the object data.
gorsResponseStatus :: Lens' GetObjectResponse Int Source #
- - | The response status code.