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 |
Uploads an object to the specified path. Object sizes are limited to 10 MB.
Synopsis
- putObject :: Text -> HashedBody -> PutObject
- data PutObject
- poStorageClass :: Lens' PutObject (Maybe StorageClass)
- poCacheControl :: Lens' PutObject (Maybe Text)
- poContentType :: Lens' PutObject (Maybe Text)
- poPath :: Lens' PutObject Text
- poBody :: Lens' PutObject HashedBody
- putObjectResponse :: Int -> PutObjectResponse
- data PutObjectResponse
- porsETag :: Lens' PutObjectResponse (Maybe Text)
- porsStorageClass :: Lens' PutObjectResponse (Maybe StorageClass)
- porsContentSHA256 :: Lens' PutObjectResponse (Maybe Text)
- porsResponseStatus :: Lens' PutObjectResponse Int
Creating a Request
:: Text | |
-> HashedBody | |
-> PutObject |
Creates a value of PutObject
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
poStorageClass
- Indicates the storage class of aPut
request. Defaults to high-performance temporal storage class, and objects are persisted into durable storage shortly after being received.poCacheControl
- An optionalCacheControl
header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 . Headers with a custom user-defined value are also accepted.poContentType
- The content type of the object.poPath
- 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.poBody
- The bytes to be stored.
See: putObject
smart constructor.
Instances
Request Lenses
poStorageClass :: Lens' PutObject (Maybe StorageClass) Source #
Indicates the storage class of a Put
request. Defaults to high-performance temporal storage class, and objects are persisted into durable storage shortly after being received.
poCacheControl :: Lens' PutObject (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 at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 . Headers with a custom user-defined value are also accepted.
poPath :: Lens' PutObject 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 PutObjectResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
porsETag
- Unique identifier of the object in the container.porsStorageClass
- The storage class where the object was persisted. Should be “Temporal”.porsContentSHA256
- The SHA256 digest of the object that is persisted.porsResponseStatus
- -- | The response status code.
data PutObjectResponse Source #
See: putObjectResponse
smart constructor.
Instances
Response Lenses
porsETag :: Lens' PutObjectResponse (Maybe Text) Source #
Unique identifier of the object in the container.
porsStorageClass :: Lens' PutObjectResponse (Maybe StorageClass) Source #
The storage class where the object was persisted. Should be “Temporal”.
porsContentSHA256 :: Lens' PutObjectResponse (Maybe Text) Source #
The SHA256 digest of the object that is persisted.
porsResponseStatus :: Lens' PutObjectResponse Int Source #
- - | The response status code.