CopyObject

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

Note

Tebi does not limit the size of objects that can be uploaded and stored. All COPY operations are atomic.

You must have Copy ACL to the source and destination buckets to be able to call this action.

The following operations are related to CopyObject:

Request Syntax

 1PUT /<KEY> HTTP/1.1
 2Host: <BUCKET>.s3.tebi.io
 3Cache-Control: CacheControl
 4Content-Disposition: ContentDisposition
 5Content-Encoding: ContentEncoding
 6Content-Language: ContentLanguage
 7Content-Type: ContentType
 8Expires: Expires
 9x-amz-acl: ACL
10x-amz-copy-source: CopySource
11x-amz-metadata-directive: MetadataDirective
12x-amz-storage-class: StorageClass
13x-amz-website-redirect-location: WebsiteRedirectLocation

The request uses the following URI parameters:

  • <BUCKET>: Name of the destination bucket. Required.

  • <KEY>: Key of the destination object. Required.

The request uses the following headers:

  • Cache-Control: Specifies caching behavior along the request/reply chain.

  • Content-Disposition: Specifies presentational information for the object.

  • Content-Encoding: 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.

  • Content-Language: Language the content is in.

  • Content-Type: Standard MIME type describing the format of the object data.

  • Expires: Date and time at which the object is no longer cacheable.

  • x-amz-acl: Canned ACL to apply to the object. Valid Values: private | public-read | public-read-write.

  • x-amz-copy-source: Specifies the source object for the copy operation. Specify the name of the source bucket and the key of the source object – separate by a slash (/).

  • x-amz-metadata-directive: Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. Valid Values: COPY | REPLACE.

  • x-amz-storage-class: User-defined storage class.

  • x-amz-website-redirect-location: 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.

The request does not have a request body.

Response Syntax

 1HTTP/1.1 200
 2Content-Type: application/xml
 3Content-Length: ContentLength
 4x-amz-expiration: Expiration
 5x-amz-server-side-encryption: ServerSideEncryption
 6
 7<?xml version="1.0" encoding="UTF-8"?>
 8<CopyObjectResult>
 9    <ETag>string</ETag>
10    <LastModified>timestamp</LastModified>
11</CopyObjectResult>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers:

  • x-amz-expiration: If the object expiration is configured, the response includes this header.

  • x-amz-server-side-encryption: Server-side encryption algorithm used when storing this object (AES256).

The following data is returned in XML format by the service:

  • CopyObjectResult: Root level tag for the CopyObjectResult parameters.

  • ETag: Returns the ETag of the new object.

  • LastModified: Creation date of the object.

See Also

Refer here for more information.