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 |
Creates a copy of an object that is already stored in Amazon S3.
See: AWS API Reference for CopyObject.
- copyObject :: BucketName -> Text -> ObjectKey -> CopyObject
- data CopyObject
- coCopySourceIfModifiedSince :: Lens' CopyObject (Maybe UTCTime)
- coCopySourceIfUnmodifiedSince :: Lens' CopyObject (Maybe UTCTime)
- coCopySourceSSECustomerKeyMD5 :: Lens' CopyObject (Maybe Text)
- coMetadataDirective :: Lens' CopyObject (Maybe MetadataDirective)
- coExpires :: Lens' CopyObject (Maybe UTCTime)
- coSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text)
- coCopySourceIfNoneMatch :: Lens' CopyObject (Maybe Text)
- coGrantReadACP :: Lens' CopyObject (Maybe Text)
- coSSECustomerKey :: Lens' CopyObject (Maybe Text)
- coRequestPayer :: Lens' CopyObject (Maybe RequestPayer)
- coGrantWriteACP :: Lens' CopyObject (Maybe Text)
- coWebsiteRedirectLocation :: Lens' CopyObject (Maybe Text)
- coCopySourceIfMatch :: Lens' CopyObject (Maybe Text)
- coGrantRead :: Lens' CopyObject (Maybe Text)
- coStorageClass :: Lens' CopyObject (Maybe StorageClass)
- coContentEncoding :: Lens' CopyObject (Maybe Text)
- coSSEKMSKeyId :: Lens' CopyObject (Maybe Text)
- coGrantFullControl :: Lens' CopyObject (Maybe Text)
- coSSECustomerKeyMD5 :: Lens' CopyObject (Maybe Text)
- coMetadata :: Lens' CopyObject (HashMap Text Text)
- coCacheControl :: Lens' CopyObject (Maybe Text)
- coContentLanguage :: Lens' CopyObject (Maybe Text)
- coACL :: Lens' CopyObject (Maybe ObjectCannedACL)
- coCopySourceSSECustomerKey :: Lens' CopyObject (Maybe Text)
- coContentDisposition :: Lens' CopyObject (Maybe Text)
- coCopySourceSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text)
- coServerSideEncryption :: Lens' CopyObject (Maybe ServerSideEncryption)
- coContentType :: Lens' CopyObject (Maybe Text)
- coBucket :: Lens' CopyObject BucketName
- coCopySource :: Lens' CopyObject Text
- coKey :: Lens' CopyObject ObjectKey
- copyObjectResponse :: Int -> CopyObjectResponse
- data CopyObjectResponse
- corsRequestCharged :: Lens' CopyObjectResponse (Maybe RequestCharged)
- corsExpiration :: Lens' CopyObjectResponse (Maybe Text)
- corsSSECustomerAlgorithm :: Lens' CopyObjectResponse (Maybe Text)
- corsCopySourceVersionId :: Lens' CopyObjectResponse (Maybe Text)
- corsSSEKMSKeyId :: Lens' CopyObjectResponse (Maybe Text)
- corsSSECustomerKeyMD5 :: Lens' CopyObjectResponse (Maybe Text)
- corsServerSideEncryption :: Lens' CopyObjectResponse (Maybe ServerSideEncryption)
- corsCopyObjectResult :: Lens' CopyObjectResponse (Maybe CopyObjectResult)
- corsStatus :: Lens' CopyObjectResponse Int
Creating a Request
Creates a value of CopyObject
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
coCopySourceIfModifiedSince
coCopySourceIfUnmodifiedSince
coCopySourceSSECustomerKeyMD5
coMetadataDirective
coExpires
coSSECustomerAlgorithm
coCopySourceIfNoneMatch
coGrantReadACP
coSSECustomerKey
coRequestPayer
coGrantWriteACP
coWebsiteRedirectLocation
coCopySourceIfMatch
coGrantRead
coStorageClass
coContentEncoding
coSSEKMSKeyId
coGrantFullControl
coSSECustomerKeyMD5
coMetadata
coCacheControl
coContentLanguage
coACL
coCopySourceSSECustomerKey
coContentDisposition
coCopySourceSSECustomerAlgorithm
coServerSideEncryption
coContentType
coBucket
coCopySource
coKey
data CopyObject Source
See: copyObject
smart constructor.
Request Lenses
coCopySourceIfModifiedSince :: Lens' CopyObject (Maybe UTCTime) Source
Copies the object if it has been modified since the specified time.
coCopySourceIfUnmodifiedSince :: Lens' CopyObject (Maybe UTCTime) Source
Copies the object if it hasn't been modified since the specified time.
coCopySourceSSECustomerKeyMD5 :: Lens' CopyObject (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.
coMetadataDirective :: Lens' CopyObject (Maybe MetadataDirective) Source
Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
coExpires :: Lens' CopyObject (Maybe UTCTime) Source
The date and time at which the object is no longer cacheable.
coSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text) Source
Specifies the algorithm to use to when encrypting the object (e.g., AES256).
coCopySourceIfNoneMatch :: Lens' CopyObject (Maybe Text) Source
Copies the object if its entity tag (ETag) is different than the specified ETag.
coGrantReadACP :: Lens' CopyObject (Maybe Text) Source
Allows grantee to read the object ACL.
coSSECustomerKey :: Lens' CopyObject (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.
coRequestPayer :: Lens' CopyObject (Maybe RequestPayer) Source
Undocumented member.
coGrantWriteACP :: Lens' CopyObject (Maybe Text) Source
Allows grantee to write the ACL for the applicable object.
coWebsiteRedirectLocation :: Lens' CopyObject (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.
coCopySourceIfMatch :: Lens' CopyObject (Maybe Text) Source
Copies the object if its entity tag (ETag) matches the specified tag.
coGrantRead :: Lens' CopyObject (Maybe Text) Source
Allows grantee to read the object data and its metadata.
coStorageClass :: Lens' CopyObject (Maybe StorageClass) Source
The type of storage to use for the object. Defaults to 'STANDARD'.
coContentEncoding :: Lens' CopyObject (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.
coSSEKMSKeyId :: Lens' CopyObject (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
coGrantFullControl :: Lens' CopyObject (Maybe Text) Source
Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
coSSECustomerKeyMD5 :: Lens' CopyObject (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.
coMetadata :: Lens' CopyObject (HashMap Text Text) Source
A map of metadata to store with the object in S3.
coCacheControl :: Lens' CopyObject (Maybe Text) Source
Specifies caching behavior along the request/reply chain.
coContentLanguage :: Lens' CopyObject (Maybe Text) Source
The language the content is in.
coACL :: Lens' CopyObject (Maybe ObjectCannedACL) Source
The canned ACL to apply to the object.
coCopySourceSSECustomerKey :: Lens' CopyObject (Maybe Text) Source
Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
coContentDisposition :: Lens' CopyObject (Maybe Text) Source
Specifies presentational information for the object.
coCopySourceSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text) Source
Specifies the algorithm to use when decrypting the source object (e.g., AES256).
coServerSideEncryption :: Lens' CopyObject (Maybe ServerSideEncryption) Source
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
coContentType :: Lens' CopyObject (Maybe Text) Source
A standard MIME type describing the format of the object data.
coBucket :: Lens' CopyObject BucketName Source
Undocumented member.
coCopySource :: Lens' CopyObject Text Source
The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.
coKey :: Lens' CopyObject ObjectKey Source
Undocumented member.
Destructuring the Response
Creates a value of CopyObjectResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CopyObjectResponse Source
See: copyObjectResponse
smart constructor.
Response Lenses
corsRequestCharged :: Lens' CopyObjectResponse (Maybe RequestCharged) Source
Undocumented member.
corsExpiration :: Lens' CopyObjectResponse (Maybe Text) Source
If the object expiration is configured, the response includes this header.
corsSSECustomerAlgorithm :: Lens' CopyObjectResponse (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.
corsCopySourceVersionId :: Lens' CopyObjectResponse (Maybe Text) Source
Undocumented member.
corsSSEKMSKeyId :: Lens' CopyObjectResponse (Maybe Text) Source
If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
corsSSECustomerKeyMD5 :: Lens' CopyObjectResponse (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.
corsServerSideEncryption :: Lens' CopyObjectResponse (Maybe ServerSideEncryption) Source
The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
corsCopyObjectResult :: Lens' CopyObjectResponse (Maybe CopyObjectResult) Source
Undocumented member.
corsStatus :: Lens' CopyObjectResponse Int Source
The response status code.