PutObject

Prev Next

Available in Classic and VPC

Save an object in a Ncloud Storage bucket.

Request

This section describes the request format. The method and URI are as follows:

Method URI
PUT /{Key}

Request headers

The following describes the request headers:

Note

For information about the request headers common to all Ncloud Storage APIs, see Ncloud Storage request headers.

Field Required Description
Cache-Control Optional Caching behavior
Content-Disposition Optional Display format of requested data
Content-Encoding Optional Encoding format of requested data
Content-Language Optional Request data language
Content-Type Optional Request data format
Content-MD5 Optional Base64-encoded 128-bit MD5 hash of the request body (object data)
  • Used to validate object data integrity.
x-amz-checksum-* Optional Checksum hash value
  • Enter the used algorithm in the * of the key.
    • Supported algorithms: crc32 | crc32c | sha1 | sha256 | crc64nvme
  • Used to validate object data integrity.
  • Only one algorithm can be specified.
x-amz-storage-class Optional Storage class
  • STANDARD (default) | ONEZONE_IA | DEEP_ARCHIVE
    • STANDARD: Standard Class
    • ONEZONE_IA: One Zone-IA (Infrequent Access) Class
    • DEEP_ARCHIVE: Archive Class
x-amz-server-side-encryption Optional Server-side encryption method
  • AES256: SSE-S3 (server-managed key)
  • aws:kms: SSE-KMS (KMS-managed key)
x-amz-server-side-encryption-customer-algorithm Optional User encryption algorithm (AES256)
x-amz-server-side-encryption-customer-key Optional User-provided encryption key
x-amz-server-side-encryption-customer-key-MD5 Optional User-provided encryption key's MD5 value
x-amz-object-lock-mode Optional Object retention mode
  • GOVERNANCE | COMPLIANCE
    • GOVERNANCE: Can be bypassed with special permissions.
    • COMPLIANCE: No one can bypass it.
  • Specify with x-amz-object-lock-retain-until-date.
  • Available only in buckets with object lock enabled.
x-amz-object-lock-retain-until-date Optional Object retention expiration date
  • ISO 8601 format.
  • Specify with x-amz-object-lock-mode.
  • Available only in buckets with object lock enabled.
x-amz-object-lock-legal-hold Optional Legal hold status
  • ON | OFF
  • Available only in buckets with object lock enabled

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
Key String Required Object name
  • When saving to a folder within the bucket, enter in the format of {folder name}/{file name}.

Request example

The request example is as follows:

PUT /object.csv HTTP/1.1
Host: {Bucket}.kr.ncloudstorage.com
Content-Length: 17423
x-amz-checksum-sha256: 2ecf9f32d97***********39aed87829=

<object.csv binary data>

Response

This section describes the response format.

Response headers

The following describes the response headers.

Note

For information about the request headers common to all Ncloud Storage APIs, see Ncloud Storage response headers.

Field Required Description
x-amz-checksum-* - Checksum value of the stored object
  • Displayed if a checksum was specified in the request.
  • The * of the key indicates the algorithm used (crc32 | crc32c | sha1 | sha256 | crc64nvme).
x-amz-checksum-type - Checksum type
  • FULL_OBJECT | COMPOSITE
  • Displayed if a checksum is specified in the request.

Response status codes

For information about the response status codes common to all Ncloud Storage APIs, see Common Ncloud Storage response status codes.

Response example

The response example is as follows:

HTTP/1.1 200 OK
ETag: "2dd********************4f6181"
x-amz-checksum-sha256: 2ecf9f32d97***********39aed87829=
x-amz-object-size: 17423