HCP Tenant Management Help


Request headers (PUT object copy)

The table below describes the headers you can use in a request to copy an object.

Request header Description Required
Authorization See Authentication. Yes
Content-Type Specifies the Internet media type of the data being copied. Valid values are Internet media types (for example, text/plain, application/xml, or image/jpeg). No
Date See Common request headers. Date or
x-amz-date
Host See Common request headers. Yes
x-amz-acl

Adds a canned ACL to the target object.

This header is used only to add a canned ACL to an object. If you’re using individual x-amz-grant- headers to add the ACL, the x-amz-acl header is invalid.

For valid values for this header, see Canned ACLs.

No
x-amz-copy-source

Specifies the source bucket and object or object version, in this format:

/bucket-name/source-object-name
  [?versionId=source-object-version-id]

The initial forward slash (/) is required.

Valid values for source-object-version-id are the IDs of versions of the source object specified in the request.

The versionId query parameter is not case sensitive.

If you include the versionId query parameter in the x-amz-copy-source header with an invalid value while versioning is enabled, HCP returns a 404 (Not Found) status code and does not copy the object.

If you include the versionId query parameter in the x-amz-copy-source header while versioning is disabled, the parameter is ignored, and the current version of the specified object is used as the source for the copy operation.

Yes
x-amz-copy-source-if-
  match

Specifies one or more values for comparison with the ETag of the specified source object or object version. If the ETag matches one of the specified values, HCP continues processing the request. If the ETag doesn’t match any of the specified values, HCP returns a 412 (Precondition Failed) status code and does not copy the object.

To specify the values for this header, use this format:

"value"[, "value"]...

In this format, each value can be any string of one or more characters and must be enclosed in double quotation marks (").

Alternatively, you can specify a single asterisk (*) as the value for the x-amz-copy-source-if-match header. All ETags match an asterisk in an x-amz-copy-source-if-match header.

 
x-amz-copy-source-if-
  modified-since

Specifies a date and time, in Greenwich Mean Time (GMT), for comparison with the date and time the specified source object or object version was last modified. If the modification date and time is later than the specified date and time, HCP continues processing the request. If the modification date and time is equal to or earlier than the specified date and time, HCP returns a 412 (Precondition Failed) status code and does not copy the object.

To specify the date and time for this header, use one of these formats:

DDD, dd MMM yyyy HH:mm:ss (+0000|GMT)

For example: Tue, 07 Feb 2017 14:27:05 +0000

DDDD, dd-MMM-yyyy HH:mm:ss (+0000|GMT)

For example: Tuesday, 07-Feb-17 14:27:05 +0000

DDD MMM d HH:mm:ss yyyy

For example: Tue Feb 7 14:27:05 2017

In these formats:

DDD is the three-letter abbreviation for the day of the week, with an uppercase first letter (for example, Mon).

DDDD is the day of the week fully spelled out, with an uppercase first letter (for example, Monday).

d is the one- or two-digit day of the month, as applicable.

dd is the two-digit day of the month.

MMM is the three-letter abbreviation for the month, with an uppercase first letter (for example, Feb).

yy is the last two digits of the year. HCP assumes that the intended year is within 80 years before or 20 years after the current year.

yyyy is the four-digit year.

HH is the hour on a 24-hour clock.

mm is the number of minutes.

ss is the number of seconds.

If the value specified by the x-amz-copy-source-if-modified-since header doesn’t conform to one of the formats shown above, the header is ignored.

No
x-amz-copy-source-if-
  none-match

Specifies one or more values for comparison with the ETag of the specified source object or object version. If the ETag doesn’t match any of the specified values, HCP continues processing the request. If the ETag matches any of the specified values, HCP returns a 412 (Precondition Failed) status code and does not copy the object.

To specify the values for this header, use this format:

"value"[, "value"]...

In this format, each value can be any string of one or more characters and must be enclosed in double quotation marks (").

Alternatively, you can specify a single asterisk (*) as the value for the x-amz-copy-source-if-match header. No ETags match an asterisk in an x-amz-copy-source-if-match header.

No
x-amz-copy-source-if-
  unmodified-since

Specifies a date and time, in Greenwich Mean Time (GMT), for comparison with the date and time the specified source object or object version was last modified. If the modification date and time is equal to or earlier than the specified date and time, HCP continues processing the request. If the modification date and time is later than the specified date and time, HCP returns a 412 (Precondition Failed) status code and does not copy the object.

For valid values for this header, see the description of the x-amz-copy-source-if-modified-since header above.

No
x-amz-date See Common request headers. x-amz-date or Date
x-amz-grant-full-
  control

Grants full control over the target object to one or more specified grantees.

If you’re using a canned ACL to add an ACL to an object, the x-amz-grant-full-control header is invalid.

For valid values for this and the following x-amz-grant- headers, see Specifying an ACL with headers.

No
x-amz-grant-read

Grants the browse and read data access permissions for the target object to one or more specified grantees.

If you’re using a canned ACL to add an ACL to an object, the x-amz-grant-read header is invalid.

No
x-amz-grant-read-acp

Grants the read ACL data access permission for the target object to one or more specified grantees.

If you’re using a canned ACL to add an ACL to an object, the x-amz-grant-read-acp header is invalid.

No
x-amz-grant-write

Grants the write and delete data access permissions for the target object to one or more specified grantees.

If you’re using a canned ACL to add an ACL to an object, the x-amz-grant-write header is invalid.

No
x-amz-grant-write-acp

Grants the write ACL data access permission for the target object to one or more specified grantees.

If you’re using a canned ACL to add an ACL to an object, the x-amz-grant-write-acp header is invalid.

No
x-amz-meta-

Adds custom metadata to the target object.

For information about using this header, see Storing custom metadata with the S3 compatible API.

No
x-amz-metadata-
  directive

Tells HCP whether to use the custom metadata, if any, for the source object or object version as the custom metadata for the target object or to use the custom metadata, if any, specified in the copy request. Valid values are:

COPY — Use the custom metadata for the source object or object version.

REPLACE — Use the custom metadata specified in the copy request.

These values are case sensitive.

The default is COPY.

No
x-amz-server-side-
  encryption
Requests that the response headers include x-amz-server-side-encryption, which indicates whether objects stored in HCP are encrypted. The value of the x-amz-server-side-encryption request header can be any character string. No
x-hcp-pretty-print

Optionally, requests that the XML response body be formatted for readability. Valid values are:

true — Format the XML response body for readability.

false — Do not apply any special formatting to the XML response body.

The default is false.

The values true and false are not case sensitive.

No
x-hcp-retention Specifies the retention value for the object being stored. This value can be a fixed date, an offset, a retention class, or a special value. No
x-hcp-retentionhold Specifies whether the object is on hold. This value can be either true or false. No

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.