• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Python SDK)
  4. Data Types
  5. Additional Headers in PUT Object - Copy

Additional Headers in PUT Object - Copy

Namespace

Class

Module

CopyObjectHeader

com.obs.models.copy_object_header

Parameter Description

Field

Type

Optional or Mandatory

Description

acl

str

Optional

Pre-defined access policy specified for the to-be-copied object. Possible values are:

  • private
  • public-read
  • public-read-write
  • authenticated-read
  • bucket-owner-read
  • bucket-owner-full-control

directive

str

Optional

Whether to copy source object attributes to the target object. Possible values are:

  • COPY (Default value; Attributes of the target object are copied from the source object.)
  • REPLACE (Attributes of the target object are replaced with values specified in the request parameter.)

if_match

str

Optional

Copies the source object if its ETag is the same as the one specified by this parameter; otherwise, an error code is returned.

if_none_match

str

Optional

Copies the source object if its ETag is different from the one specified by this parameter; otherwise, an error code is returned.

if_modified_since

str

or

DateTime

Optional

Copies the source object if it is changed after the time specified by this parameter; otherwise, an error code is returned. If this parameter value is a character string, it must conform to the HTTP time format specified in http://www.ietf.org/rfc/rfc2616.txt.

if_unmodified_since

str

or

DateTime

Optional

Copies the source object if it is changed before the time specified by this parameter; otherwise, an error code is returned. If this parameter value is a character string, it must conform to the HTTP time format specified in http://www.ietf.org/rfc/rfc2616.txt.

location

str

Optional

Location where the object is redirected to, when the bucket is configured with website hosting.

destSseHeader

SseCHeader

or

SseKmsHeader

Optional

Header for server-side encryption. It is used to encrypt the target object.

sourceSseHeader

SseCHeader

Optional

Header for server-side decryption. It is used to decrypt the source object.

cacheControl

str

Optional

Rewrites the Cache-Control header in the response.

contentDisposition

str

Optional

Rewrites the Content-Disposition header in the response.

contentEncoding

str

Optional

Rewrites the Content-Encoding header in the response.

contentLanguage

str

Optional

Rewrites the Content-Language header in the response.

contentType

str

Optional

Rewrites the Content-Type header in the response.

expires

str

Optional

Rewrites the Expires header in the response.

storageClass

str

Optional

Storage class of the object. Possible values are:

  • STANDARD
  • STANDARD_IA
  • GLACIER
NOTE:
  • If the object copy request includes if_unmodified_since, if_match, if_modified_since, or if_none_match, and the specified condition is not met, the object copy will fail with error code 412 Precondition Failed returned.
  • if_modified_since and if_none_match can be used together. So do if_unmodified_since and if_match.