CopyObject
Cria uma cópia de um objeto que já está armazenado no big file.
Request Syntax
PUT /Key+ HTTP/1.1 Host: bucket-name.bigfile.brascloud.com.br:443 x-amz-acl: ACL Cache-Control: CacheControl Content-Disposition: ContentDisposition Content-Encoding: ContentEncoding Content-Language: ContentLanguage Content-Type: ContentType x-amz-copy-source: CopySource x-amz-copy-source-if-match: CopySourceIfMatch x-amz-copy-source-if-modified-since: CopySourceIfModifiedSince x-amz-copy-source-if-none-match: CopySourceIfNoneMatch x-amz-copy-source-if-unmodified-since: CopySourceIfUnmodifiedSince Expires: Expires x-amz-grant-full-control: GrantFullControl x-amz-grant-read: GrantRead x-amz-grant-read-acp: GrantReadACP x-amz-grant-write-acp: GrantWriteACP x-amz-metadata-directive: MetadataDirective x-amz-tagging-directive: TaggingDirective x-amz-server-side-encryption: ServerSideEncryption x-amz-storage-class: StorageClass x-amz-website-redirect-location: WebsiteRedirectLocation x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm x-amz-server-side-encryption-customer-key: SSECustomerKey x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5 x-amz-server-side-encryption-aws-kms-key-id: SSEKMSKeyId x-amz-server-side-encryption-context: SSEKMSEncryptionContext x-amz-copy-source-server-side-encryption-customer-algorithm: CopySourceSSECustomerAlgorithm x-amz-copy-source-server-side-encryption-customer-key: CopySourceSSECustomerKey x-amz-copy-source-server-side-encryption-customer-key-MD5: CopySourceSSECustomerKeyMD5 x-amz-request-payer: RequestPayer x-amz-tagging: Tagging x-amz-object-lock-mode: ObjectLockMode x-amz-object-lock-retain-until-date: ObjectLockRetainUntilDate x-amz-object-lock-legal-hold: ObjectLockLegalHoldStatus
Response Syntax
HTTP/1.1 200 x-amz-expiration: Expiration x-amz-copy-source-version-id: CopySourceVersionId x-amz-version-id: VersionId x-amz-server-side-encryption: ServerSideEncryption x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5 x-amz-server-side-encryption-aws-kms-key-id: SSEKMSKeyId x-amz-server-side-encryption-context: SSEKMSEncryptionContext x-amz-request-charged: RequestCharged <?xml version="1.0" encoding="UTF-8"?> <CopyObjectResult> <ETag>string</ETag> <LastModified>timestamp</LastModified> </CopyObjectResult>
Exemplos
Este exemplo copia my-image.jpg
no bucket
, com o nome da chave my-second-image.jpg
.
Request
PUT /my-second-image.jpg HTTP/1.1 Host: bucket.bigfile.brascloud.com.br:443 Date: Wed, 28 Oct 2009 22:32:00 GMT x-amz-copy-source: /bucket/my-image.jpg Authorization: authorization string
Response
HTTP/1.1 200 OK x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-amz-request-id: 318BC8BC148832E5 x-amz-copy-source-version-id: 3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo x-amz-version-id: QUpfdndhfd8438MNFDN93jdnJFkdmqnh893 Date: Wed, 28 Oct 2009 22:32:00 GMT Connection: close Server: bigfile <CopyObjectResult> <LastModified>2009-10-28T22:32:00</LastModified> <ETag>"9b2cf535f27731c974343645a3985328"</ETag> <CopyObjectResult>