amazonka-s3-1.5.0: Amazon Simple Storage Service SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.S3.CopyObject

Contents

Description

Creates a copy of an object that is already stored in Amazon S3.

Synopsis

Creating a Request

copyObject Source #

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 - Copies the object if it has been modified since the specified time.
  • coCopySourceIfUnmodifiedSince - Copies the object if it hasn't been modified since the specified time.
  • coCopySourceSSECustomerKeyMD5 - 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.
  • coTaggingDirective - Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.
  • coMetadataDirective - Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
  • coExpires - The date and time at which the object is no longer cacheable.
  • coGrantReadACP - Allows grantee to read the object ACL.
  • coCopySourceIfNoneMatch - Copies the object if its entity tag (ETag) is different than the specified ETag.
  • coSSECustomerAlgorithm - Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  • coSSECustomerKey - 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 - Undocumented member.
  • coGrantWriteACP - Allows grantee to write the ACL for the applicable object.
  • coCopySourceIfMatch - Copies the object if its entity tag (ETag) matches the specified tag.
  • coWebsiteRedirectLocation - 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.
  • coGrantRead - Allows grantee to read the object data and its metadata.
  • coStorageClass - The type of storage to use for the object. Defaults to STANDARD.
  • coSSECustomerKeyMD5 - 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.
  • coSSEKMSKeyId - 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 - Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  • coContentEncoding - 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.
  • coTagging - The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters
  • coMetadata - A map of metadata to store with the object in S3.
  • coCacheControl - Specifies caching behavior along the request/reply chain.
  • coContentLanguage - The language the content is in.
  • coCopySourceSSECustomerKey - 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.
  • coCopySourceSSECustomerAlgorithm - Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  • coACL - The canned ACL to apply to the object.
  • coContentDisposition - Specifies presentational information for the object.
  • coServerSideEncryption - The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
  • coContentType - A standard MIME type describing the format of the object data.
  • coBucket - Undocumented member.
  • coCopySource - The name of the source bucket and key name of the source object, separated by a slash (/). Must be URL-encoded.
  • coKey - Undocumented member.

data CopyObject Source #

See: copyObject smart constructor.

Instances

Eq CopyObject Source # 
Data CopyObject Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CopyObject -> c CopyObject #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CopyObject #

toConstr :: CopyObject -> Constr #

dataTypeOf :: CopyObject -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CopyObject) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CopyObject) #

gmapT :: (forall b. Data b => b -> b) -> CopyObject -> CopyObject #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CopyObject -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CopyObject -> r #

gmapQ :: (forall d. Data d => d -> u) -> CopyObject -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CopyObject -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CopyObject -> m CopyObject #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CopyObject -> m CopyObject #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CopyObject -> m CopyObject #

Show CopyObject Source # 
Generic CopyObject Source # 

Associated Types

type Rep CopyObject :: * -> * #

Hashable CopyObject Source # 
NFData CopyObject Source # 

Methods

rnf :: CopyObject -> () #

AWSRequest CopyObject Source # 
ToQuery CopyObject Source # 
ToPath CopyObject Source # 
ToHeaders CopyObject Source # 

Methods

toHeaders :: CopyObject -> [Header] #

type Rep CopyObject Source # 
type Rep CopyObject = D1 (MetaData "CopyObject" "Network.AWS.S3.CopyObject" "amazonka-s3-1.5.0-4i2REsRgyXL98WvgynC9is" False) (C1 (MetaCons "CopyObject'" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coCopySourceIfModifiedSince") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822))) (S1 (MetaSel (Just Symbol "_coCopySourceIfUnmodifiedSince") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822)))) ((:*:) (S1 (MetaSel (Just Symbol "_coCopySourceSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coTaggingDirective") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe TaggingDirective))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coMetadataDirective") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe MetadataDirective))) (S1 (MetaSel (Just Symbol "_coExpires") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RFC822)))) ((:*:) (S1 (MetaSel (Just Symbol "_coGrantReadACP") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coCopySourceIfNoneMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coSSECustomerKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_coRequestPayer") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RequestPayer))) (S1 (MetaSel (Just Symbol "_coGrantWriteACP") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coCopySourceIfMatch") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coWebsiteRedirectLocation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_coGrantRead") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coStorageClass") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe StorageClass))))))) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coSSEKMSKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_coGrantFullControl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coContentEncoding") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coTagging") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coMetadata") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Map Text Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_coCacheControl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_coContentLanguage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coCopySourceSSECustomerKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text)))) (S1 (MetaSel (Just Symbol "_coCopySourceSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_coACL") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectCannedACL))) (S1 (MetaSel (Just Symbol "_coContentDisposition") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_coServerSideEncryption") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ServerSideEncryption))) (S1 (MetaSel (Just Symbol "_coContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_coBucket") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 BucketName)) ((:*:) (S1 (MetaSel (Just Symbol "_coCopySource") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_coKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ObjectKey)))))))))
type Rs CopyObject Source # 

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.

coTaggingDirective :: Lens' CopyObject (Maybe TaggingDirective) Source #

Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.

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.

coGrantReadACP :: Lens' CopyObject (Maybe Text) Source #

Allows grantee to read the object ACL.

coCopySourceIfNoneMatch :: Lens' CopyObject (Maybe Text) Source #

Copies the object if its entity tag (ETag) is different than the specified ETag.

coSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text) Source #

Specifies the algorithm to use to when encrypting the object (e.g., AES256).

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.

coGrantWriteACP :: Lens' CopyObject (Maybe Text) Source #

Allows grantee to write the ACL for the applicable object.

coCopySourceIfMatch :: Lens' CopyObject (Maybe Text) Source #

Copies the object if its entity tag (ETag) matches the specified tag.

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.

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.

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.

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.

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.

coTagging :: Lens' CopyObject (Maybe Text) Source #

The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters

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.

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.

coCopySourceSSECustomerAlgorithm :: Lens' CopyObject (Maybe Text) Source #

Specifies the algorithm to use when decrypting the source object (e.g., AES256).

coACL :: Lens' CopyObject (Maybe ObjectCannedACL) Source #

The canned ACL to apply to the object.

coContentDisposition :: Lens' CopyObject (Maybe Text) Source #

Specifies presentational information for the object.

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

copyObjectResponse Source #

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:

  • corsRequestCharged - Undocumented member.
  • corsVersionId - Version ID of the newly created copy.
  • corsExpiration - If the object expiration is configured, the response includes this header.
  • corsSSECustomerAlgorithm - If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
  • corsCopySourceVersionId - Undocumented member.
  • corsSSECustomerKeyMD5 - 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.
  • corsSSEKMSKeyId - If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object.
  • corsServerSideEncryption - The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).
  • corsCopyObjectResult - Undocumented member.
  • corsResponseStatus - -- | The response status code.

data CopyObjectResponse Source #

See: copyObjectResponse smart constructor.

Instances

Eq CopyObjectResponse Source # 
Data CopyObjectResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CopyObjectResponse -> c CopyObjectResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CopyObjectResponse #

toConstr :: CopyObjectResponse -> Constr #

dataTypeOf :: CopyObjectResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CopyObjectResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CopyObjectResponse) #

gmapT :: (forall b. Data b => b -> b) -> CopyObjectResponse -> CopyObjectResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CopyObjectResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CopyObjectResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CopyObjectResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CopyObjectResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CopyObjectResponse -> m CopyObjectResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CopyObjectResponse -> m CopyObjectResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CopyObjectResponse -> m CopyObjectResponse #

Show CopyObjectResponse Source # 
Generic CopyObjectResponse Source # 
NFData CopyObjectResponse Source # 

Methods

rnf :: CopyObjectResponse -> () #

type Rep CopyObjectResponse Source # 
type Rep CopyObjectResponse = D1 (MetaData "CopyObjectResponse" "Network.AWS.S3.CopyObject" "amazonka-s3-1.5.0-4i2REsRgyXL98WvgynC9is" False) (C1 (MetaCons "CopyObjectResponse'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_corsRequestCharged") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RequestCharged))) (S1 (MetaSel (Just Symbol "_corsVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ObjectVersionId)))) ((:*:) (S1 (MetaSel (Just Symbol "_corsExpiration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_corsSSECustomerAlgorithm") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_corsCopySourceVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_corsSSECustomerKeyMD5") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_corsSSEKMSKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (Sensitive Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_corsServerSideEncryption") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ServerSideEncryption))) ((:*:) (S1 (MetaSel (Just Symbol "_corsCopyObjectResult") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CopyObjectResult))) (S1 (MetaSel (Just Symbol "_corsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))))

Response Lenses

corsVersionId :: Lens' CopyObjectResponse (Maybe ObjectVersionId) Source #

Version ID of the newly created copy.

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.

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.

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.

corsServerSideEncryption :: Lens' CopyObjectResponse (Maybe ServerSideEncryption) Source #

The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms).

corsResponseStatus :: Lens' CopyObjectResponse Int Source #

  • - | The response status code.