PutObject

Uploads an object to the specified path. Object sizes are unlimited.

You must have Upload ACL to be able to call this action.

The following operations are related to PutObject:

Request Syntax

 1PUT /<KEY> HTTP/1.1
 2Host: <BUCKET>.datastream.tebi.io
 3Cache-Control: CacheControl
 4Content-Disposition: ContentDisposition
 5Content-Encoding: ContentEncoding
 6Content-Language: ContentLanguage
 7Content-Length: ContentLength
 8Content-MD5: ContentMD5
 9Content-Type: ContentType
10Expires: Expires
11x-amz-acl: ACL
12x-amz-storage-class: StorageClass
13x-amz-upload-availability: UploadAvailability
14x-amz-website-redirect-location: WebsiteRedirectLocation
15x-amz-server-side-encryption: ServerSideEncryption
16x-amz-server-side-encryption-customer-algorithm: SSECustomerAlgorithm
17x-amz-server-side-encryption-customer-key: SSECustomerKey
18x-amz-server-side-encryption-customer-key-MD5: SSECustomerKeyMD5
19
20Body

The request uses the following URI parameters:

  • <BUCKET>: Bucket name to which the PUT action was initiated. Required.

  • <KEY>: Object key for which the PUT action was initiated. Required.

The request uses the following headers.

  • Cache-Control: Can be used to specify caching behavior along the request/reply chain.

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

  • Content-Encoding: Specifies which content encodings have been applied to the object and thus which 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-Length: Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.

  • Content-MD5: The 128-bit MD5 digest encoded as 32-characters HEX or base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check.

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

  • 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-storage-class: User-defined storage class. For more information, see Storage Classes Overview.

  • UploadAvailability: Indicates the availability of an object while it is still uploading. If the value is set to streaming, the object is available for downloading before the object is uploaded completely with some initial buffering. If the value is set to standard, the object is available for downloading only when it is uploaded completely. The default value for this header is standard. To use this header, you must also set the HTTP Transfer-Encoding header to chunked. Valid Values: STANDARD | STREAMING.

  • 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.

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

  • x-amz-server-side-encryption-customer-algorithm: Specifies the algorithm to use to when encrypting the object (AES256).

  • x-amz-server-side-encryption-customer-key: Specifies the customer-provided encryption key for Tebi to use in encrypting data. This value is used to store the object and then it is discarded; Tebi 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.

  • x-amz-server-side-encryption-customer-key-MD5: Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Tebi uses this header for a message integrity check to ensure that the encryption key was transmitted without error.

The request accepts body as binary data.

Response Syntax

 1HTTP/1.1 200
 2Content-Length: ContentLength
 3Content-type: application/x-amz-json-1.1
 4ETag: ETag
 5
 6{
 7    "ContentSHA256": "string",
 8    "ETag": "string",
 9    "StorageClass": "string"
10}

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

The response returns the following HTTP headers:

  • Content-Length: Equal to the length of the JSON response.

  • ETag: Entity tag for the uploaded object.

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

  • ContentSHA256: SHA256 digest of the object that is persisted.

  • ETag: Unique identifier of the object in the container.

  • StorageClass: Storage class of the object.

See Also

Refer here for more information.