Help Center> OBS GO SDK> API Reference> Data Types> Request Parameter of PUT Object - Copy
Updated on 2022-02-10 GMT+08:00

Request Parameter of PUT Object - Copy

Type Definition

type CopyObjectInput struct

Parameter Description

Field

Type

Optional or Mandatory

Description

Bucket

string

Mandatory

Target bucket name

Key

string

Mandatory

Target object name

CopySourceBucket

string

Mandatory

Source bucket name

CopySourceKey

string

Mandatory

Source object name

CopySourceVersionId

string

Optional

Source object version ID

ACL

AclType

Optional

ACL that can be pre-defined during the object copy

MetadataDirective

MetadataDirectiveType

Optional

Policy specifying that the source object's properties will also be copied

CopySourceIfMatch

string

Optional

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

CopySourceIfNoneMatch

string

Optional

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

CopySourceIfUnmodifiedSince

time.Time

Optional

Copies the source object if it is changed after the time specified by this parameter; otherwise, an error is returned.

CopySourceIfModifiedSince

time.Time

Optional

Copies the source object if it is changed before the time specified by this parameter; otherwise, an error is returned.

WebsiteRedirectLocation

string

Optional

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

SseHeader

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

string

Optional

Rewrites the Cache-Control header in the response.

ContentDisposition

string

Optional

Rewrites the Content-Disposition header in the response.

ContentEncoding

string

Optional

Rewrites the Content-Encoding header in the response.

ContentLanguage

string

Optional

Rewrites the Content-Language header in the response.

ContentType

string

Optional

Rewrites the Content-Type header in the response.

Expires

string

Optional

Rewrites the Expires header in the response.

StorageClass

StorageClassType

Optional

Object storage class set during the object copy

Metadata

map[string]string

Optional

Customized metadata of the target object

If the object copy request includes CopySourceIfUnmodifiedSince, CopySourceIfMatch, CopySourceIfModifiedSince, or CopySourceIfNoneMatch, and the specified condition is not met, the object copy will fail with error information 412 Precondition Failed returned.