Go to main content

Oracle® ZFS Storage Appliance Object API Guide for Amazon S3 Service Support, Release OS8.8.0

Exit Print View

Updated: January 2019
 
 

PUT Object

The PUT Object operation adds an object to a bucket. To add an object to a bucket, you must have WRITE permissions on the bucket. To ensure data is not corrupted when using the PUT Object operation, you should use the Content-MD5 header. To configure your application to send the Request Headers prior to sending the request body, use the 100-continue HTTP status code. For more details about using this operation, see the following:

Storage Class Options

Oracle ZFS Storage Appliance only supports the STANDARD storage class option.

Access Permissions

To grant specific permission on an object using a request header, you can either:

Syntax Example

PUT https://<appliance>:443/s3/v1/export/<share_mount_point_path>/<bucketname>/<objectname>

Object Versioning

If you enable versioning for a bucket, S3 automatically generates a unique version ID for the object being stored. S3 returns this ID in the response using the x-amz-version-id response header. If versioning is suspended, S3 always uses null as the version ID for the object stored. If you enable versioning for a bucket, when S3 receives multiple write requests for the same object simultaneously, it stores all of the objects as separate versions.

Request Parameters

This implementation of the PUT Object operation does not support the use of request parameters.

Request Headers

The PUT Object operation supports the use of following request headers:

Request Elements

The PUT Object operation does not support the use of request elements.

Response Headers

The PUT Object operation supports the use of the following response headers:

Response Elements

This implementation of the PUT Object operation does not return response elements.

Expected HTTP Response Code

200 OK

Error Response Code

The PUT Object API does not return special errors. For general information about S3 errors and a list of error codes, see S3 Client Error Handling Reference.

Example

PUT /my-image.jpg
Date: Wed, 12 Oct 2018 17:50:00 GMT
Authorization: authorization string
Content-Type: text/plain
Content-Length: 11434
x-amz-grant-full-control: id="michael"
x-amz-meta-author: Janet
Expect: 100-continue

 
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
x-amz-request-id: tx0A49CE4060975EAC
Date: Wed, 12 Oct 2018 17:50:00 GMT
ETag: "1b2cf535f27731c974343645a3985328"
Content-Length: 0
Connection: close
Server: Apache

When versioning is enabled on the bucket, the response includes the x-amz-version-id header:

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
x-amz-request-id: tx0A49CE4060975EAC
x-amz-version-id: 0075
Date: Wed, 12 Oct 2018 17:50:00 GMT
ETag: "fbacf535f27731c9771645a39863328"
Content-Length: 0
Connection: close