Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Adds an object to a bucket.
See: AWS API Reference for PutObject.
- putObject :: BucketName -> ObjectKey -> RqBody -> PutObject
- data PutObject
- poContentLength :: Lens' PutObject (Maybe Int)
- poExpires :: Lens' PutObject (Maybe UTCTime)
- poGrantReadACP :: Lens' PutObject (Maybe Text)
- poSSECustomerAlgorithm :: Lens' PutObject (Maybe Text)
- poSSECustomerKey :: Lens' PutObject (Maybe Text)
- poRequestPayer :: Lens' PutObject (Maybe RequestPayer)
- poGrantWriteACP :: Lens' PutObject (Maybe Text)
- poWebsiteRedirectLocation :: Lens' PutObject (Maybe Text)
- poGrantRead :: Lens' PutObject (Maybe Text)
- poStorageClass :: Lens' PutObject (Maybe StorageClass)
- poSSECustomerKeyMD5 :: Lens' PutObject (Maybe Text)
- poSSEKMSKeyId :: Lens' PutObject (Maybe Text)
- poGrantFullControl :: Lens' PutObject (Maybe Text)
- poContentEncoding :: Lens' PutObject (Maybe Text)
- poContentMD5 :: Lens' PutObject (Maybe Text)
- poMetadata :: Lens' PutObject (HashMap Text Text)
- poCacheControl :: Lens' PutObject (Maybe Text)
- poContentLanguage :: Lens' PutObject (Maybe Text)
- poACL :: Lens' PutObject (Maybe ObjectCannedACL)
- poContentDisposition :: Lens' PutObject (Maybe Text)
- poServerSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption)
- poContentType :: Lens' PutObject (Maybe Text)
- poBucket :: Lens' PutObject BucketName
- poKey :: Lens' PutObject ObjectKey
- poBody :: Lens' PutObject RqBody
- putObjectResponse :: Int -> PutObjectResponse
- data PutObjectResponse
- porsRequestCharged :: Lens' PutObjectResponse (Maybe RequestCharged)
- porsETag :: Lens' PutObjectResponse (Maybe ETag)
- porsVersionId :: Lens' PutObjectResponse (Maybe ObjectVersionId)
- porsExpiration :: Lens' PutObjectResponse (Maybe Text)
- porsSSECustomerAlgorithm :: Lens' PutObjectResponse (Maybe Text)
- porsSSECustomerKeyMD5 :: Lens' PutObjectResponse (Maybe Text)
- porsSSEKMSKeyId :: Lens' PutObjectResponse (Maybe Text)
- porsServerSideEncryption :: Lens' PutObjectResponse (Maybe ServerSideEncryption)
- porsResponseStatus :: Lens' PutObjectResponse Int
Creating a Request
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:
poContentLength
poExpires
poGrantReadACP
poSSECustomerAlgorithm
poSSECustomerKey
poRequestPayer
poGrantWriteACP
poWebsiteRedirectLocation
poGrantRead
poStorageClass
poSSECustomerKeyMD5
poSSEKMSKeyId
poGrantFullControl
poContentEncoding
poContentMD5
poMetadata
poCacheControl
poContentLanguage
poACL
poContentDisposition
poServerSideEncryption
poContentType
poBucket
poKey
poBody
See: putObject
smart constructor.
Request Lenses
poContentLength :: Lens' PutObject (Maybe Int) Source
Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
poExpires :: Lens' PutObject (Maybe UTCTime) Source
The date and time at which the object is no longer cacheable.
poSSECustomerAlgorithm :: Lens' PutObject (Maybe Text) Source
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
poSSECustomerKey :: Lens' PutObject (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.
poRequestPayer :: Lens' PutObject (Maybe RequestPayer) Source
Undocumented member.
poGrantWriteACP :: Lens' PutObject (Maybe Text) Source
Allows grantee to write the ACL for the applicable object.
poWebsiteRedirectLocation :: Lens' PutObject (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.
poGrantRead :: Lens' PutObject (Maybe Text) Source
Allows grantee to read the object data and its metadata.
poStorageClass :: Lens' PutObject (Maybe StorageClass) Source
The type of storage to use for the object. Defaults to 'STANDARD'.
poSSECustomerKeyMD5 :: Lens' PutObject (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.
poSSEKMSKeyId :: Lens' PutObject (Maybe Text) Source
Specifies the AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS will fail if not made via SSL or using SigV4. Documentation on configuring any of the officially supported AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
poGrantFullControl :: Lens' PutObject (Maybe Text) Source
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
poContentEncoding :: Lens' PutObject (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.
poMetadata :: Lens' PutObject (HashMap Text Text) Source
A map of metadata to store with the object in S3.
poCacheControl :: Lens' PutObject (Maybe Text) Source
Specifies caching behavior along the request/reply chain.
poContentDisposition :: Lens' PutObject (Maybe Text) Source
Specifies presentational information for the object.
poServerSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption) Source
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
poContentType :: Lens' PutObject (Maybe Text) Source
A standard MIME type describing the format of the object data.
poBucket :: Lens' PutObject BucketName Source
Undocumented member.
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:
data PutObjectResponse Source
See: putObjectResponse
smart constructor.
Response Lenses
porsRequestCharged :: Lens' PutObjectResponse (Maybe RequestCharged) Source
Undocumented member.
porsVersionId :: Lens' PutObjectResponse (Maybe ObjectVersionId) Source
Version of the object.
porsExpiration :: Lens' PutObjectResponse (Maybe Text) Source
If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
porsSSECustomerAlgorithm :: Lens' PutObjectResponse (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.
porsSSECustomerKeyMD5 :: Lens' PutObjectResponse (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.
porsSSEKMSKeyId :: Lens' PutObjectResponse (Maybe Text) Source
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
porsServerSideEncryption :: Lens' PutObjectResponse (Maybe ServerSideEncryption) Source
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
porsResponseStatus :: Lens' PutObjectResponse Int Source
The response status code.