Copyright | (c) 2013-2021 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 |
Downloads the object at the specified path. If the object’s upload
availability is set to streaming
, AWS Elemental MediaStore downloads
the object even if it’s still uploading the object.
Synopsis
- data GetObject = GetObject' {}
- newGetObject :: Text -> GetObject
- getObject_range :: Lens' GetObject (Maybe Text)
- getObject_path :: Lens' GetObject Text
- data GetObjectResponse = GetObjectResponse' {
- eTag :: Maybe Text
- contentLength :: Maybe Natural
- cacheControl :: Maybe Text
- lastModified :: Maybe POSIX
- contentRange :: Maybe Text
- contentType :: Maybe Text
- statusCode :: Int
- body :: ResponseBody
- newGetObjectResponse :: Int -> ResponseBody -> GetObjectResponse
- getObjectResponse_eTag :: Lens' GetObjectResponse (Maybe Text)
- getObjectResponse_contentLength :: Lens' GetObjectResponse (Maybe Natural)
- getObjectResponse_cacheControl :: Lens' GetObjectResponse (Maybe Text)
- getObjectResponse_lastModified :: Lens' GetObjectResponse (Maybe UTCTime)
- getObjectResponse_contentRange :: Lens' GetObjectResponse (Maybe Text)
- getObjectResponse_contentType :: Lens' GetObjectResponse (Maybe Text)
- getObjectResponse_statusCode :: Lens' GetObjectResponse Int
- getObjectResponse_body :: Lens' GetObjectResponse ResponseBody
Creating a Request
See: newGetObject
smart constructor.
GetObject' | |
|
Instances
Create a value of GetObject
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:range:GetObject'
, getObject_range
- The range bytes of an object to retrieve. For more information about the
Range
header, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. AWS
Elemental MediaStore ignores this header for partially uploaded objects
that have streaming upload availability.
$sel:path:GetObject'
, getObject_path
- The path (including the file name) where the object is stored in the
container. Format: <folder name>/<folder name>/<file name>
For example, to upload the file mlaw.avi
to the folder path
premium\canada
in the container movies
, enter the path
premium/canada/mlaw.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.
Request Lenses
getObject_range :: Lens' GetObject (Maybe Text) Source #
The range bytes of an object to retrieve. For more information about the
Range
header, see
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. AWS
Elemental MediaStore ignores this header for partially uploaded objects
that have streaming upload availability.
getObject_path :: Lens' GetObject Text Source #
The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>
For example, to upload the file mlaw.avi
to the folder path
premium\canada
in the container movies
, enter the path
premium/canada/mlaw.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
data GetObjectResponse Source #
See: newGetObjectResponse
smart constructor.
GetObjectResponse' | |
|
Instances
:: Int | |
-> ResponseBody | |
-> GetObjectResponse |
Create a value of GetObjectResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:eTag:GetObjectResponse'
, getObjectResponse_eTag
- The ETag that represents a unique instance of the object.
$sel:contentLength:GetObjectResponse'
, getObjectResponse_contentLength
- The length of the object in bytes.
$sel:cacheControl:GetObjectResponse'
, getObjectResponse_cacheControl
- 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.
$sel:lastModified:GetObjectResponse'
, getObjectResponse_lastModified
- The date and time that the object was last modified.
$sel:contentRange:GetObjectResponse'
, getObjectResponse_contentRange
- The range of bytes to retrieve.
$sel:contentType:GetObjectResponse'
, getObjectResponse_contentType
- The content type of the object.
$sel:statusCode:GetObjectResponse'
, getObjectResponse_statusCode
- 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.
$sel:body:GetObjectResponse'
, getObjectResponse_body
- The bytes of the object.
Response Lenses
getObjectResponse_eTag :: Lens' GetObjectResponse (Maybe Text) Source #
The ETag that represents a unique instance of the object.
getObjectResponse_contentLength :: Lens' GetObjectResponse (Maybe Natural) Source #
The length of the object in bytes.
getObjectResponse_cacheControl :: 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.
getObjectResponse_lastModified :: Lens' GetObjectResponse (Maybe UTCTime) Source #
The date and time that the object was last modified.
getObjectResponse_contentRange :: Lens' GetObjectResponse (Maybe Text) Source #
The range of bytes to retrieve.
getObjectResponse_contentType :: Lens' GetObjectResponse (Maybe Text) Source #
The content type of the object.
getObjectResponse_statusCode :: 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.
getObjectResponse_body :: Lens' GetObjectResponse ResponseBody Source #
The bytes of the object.