Copyright | (c) 2013-2018 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 |
Downloads the object at the specified path.
- getObject :: Text -> GetObject
- data GetObject
- goRange :: Lens' GetObject (Maybe Text)
- goPath :: Lens' GetObject Text
- getObjectResponse :: Int -> RsBody -> GetObjectResponse
- data GetObjectResponse
- gorsETag :: Lens' GetObjectResponse (Maybe Text)
- gorsContentLength :: Lens' GetObjectResponse (Maybe Natural)
- gorsCacheControl :: Lens' GetObjectResponse (Maybe Text)
- gorsLastModified :: Lens' GetObjectResponse (Maybe UTCTime)
- gorsContentRange :: Lens' GetObjectResponse (Maybe Text)
- gorsContentType :: Lens' GetObjectResponse (Maybe Text)
- gorsStatusCode :: 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:
goRange
- The range bytes of an object to retrieve. For more information about theRange
header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 .goPath
- The path (including the file name) where the object is stored in the container. Format: namenamename For example, to upload the filemlaw.avi
to the folder pathpremiumcanada
in the containermovies
, enter the pathpremiumcanadamlaw.avi
. Do not include the container name in this path. If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existingpremium/usa
subfolder. If you specifypremium/canada
, the service creates acanada
subfolder in thepremium
folder. You then have two subfolders,usa
andcanada
, in thepremium
folder. There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore. For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide . The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.
See: getObject
smart constructor.
Request Lenses
goRange :: Lens' GetObject (Maybe Text) Source #
The range bytes of an object to retrieve. For more information about the Range
header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 .
goPath :: Lens' GetObject Text Source #
The path (including the file name) where the object is stored in the container. Format: namenamename For example, to upload the file mlaw.avi
to the folder path premiumcanada
in the container movies
, enter the path premiumcanadamlaw.avi
. Do not include the container name in this path. If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa
subfolder. If you specify premium/canada
, the service creates a canada
subfolder in the premium
folder. You then have two subfolders, usa
and canada
, in the premium
folder. There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore. For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide . The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.
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:
gorsETag
- The ETag that represents a unique instance of the object.gorsContentLength
- The length of the object in bytes.gorsCacheControl
- An optionalCacheControl
header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 . Headers with a custom user-defined value are also accepted.gorsLastModified
- The date and time that the object was last modified.gorsContentRange
- The range of bytes to retrieve.gorsContentType
- The content type of the object.gorsStatusCode
- The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.gorsBody
- The bytes of the object.
data GetObjectResponse Source #
See: getObjectResponse
smart constructor.
Response Lenses
gorsETag :: Lens' GetObjectResponse (Maybe Text) Source #
The ETag that represents a unique instance of the object.
gorsContentLength :: Lens' GetObjectResponse (Maybe Natural) Source #
The length of the object in bytes.
gorsCacheControl :: Lens' GetObjectResponse (Maybe Text) Source #
An optional CacheControl
header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP spec at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 . Headers with a custom user-defined value are also accepted.
gorsLastModified :: Lens' GetObjectResponse (Maybe UTCTime) Source #
The date and time that the object was last modified.
gorsContentRange :: Lens' GetObjectResponse (Maybe Text) Source #
The range of bytes to retrieve.
gorsContentType :: Lens' GetObjectResponse (Maybe Text) Source #
The content type of the object.
gorsStatusCode :: Lens' GetObjectResponse Int Source #
The HTML status code of the request. Status codes ranging from 200 to 299 indicate success. All other status codes indicate the type of error that occurred.