Custom metadata usage considerations

These following considerations apply to using custom metadata with the HS3 API.

Property names

When naming properties, you should use names that, when concatenated with meta-, result in valid XML element names. That way, the x-amz-meta- headers returned when you retrieve or check the existence of an object match the x-amz-meta- headers you specified when you stored or copied the object.

If HCP has to modify a property name to create a valid element name, the returned x-amz-meta- header won’t match the x-amz-meta- header specified when the object was stored or copied. For example, if the specified header is x-amz-meta-city/town, the returned header is x-amz-meta-city_town.

Custom metadata size

When you use HS3 to store or copy an object, you can specify at most two KB of custom metadata. The size of the custom metadata you specify is the sum of the number of bytes in the UTF-8 encoding of each property name and value.

Allowed operations

Whether you can add, replace, or delete custom metadata for objects under retention depends on a bucket setting. When you create a bucket, it’s set to allow only the addition of custom metadata for objects under retention. You cannot use the HS3 API to change this setting. However, tenant administrators can change this setting for the buckets you create.

.metapairs annotations with unexpected content

You should not use HCP interfaces other than HS3 to store annotations named .metapairs. However, HCP does not prevent you from doing this. As a result, annotations named .metapairs are not guaranteed to be compatible with HS3.

Here are some ways in which HCP responds to HS3 requests for objects that have .metapairs annotations with unexpected content:

If the .metapairs annotation doesn’t contain valid XML or if the first line in the annotation doesn’t begin with the metapairs element, HCP returns an x-amz-missing-meta header with a value of 1 (one) and does not return any x-amz-meta- headers.

If an element name doesn’t start with meta-, HCP doesn’t return an x-amz-meta- header for the element.

If a meta- element has no value, HCP doesn’t return an x-amz-meta- header for the element.

If a meta- element has an attribute, HCP ignores the attribute and returns the applicable x-amz-meta- header.

If the XML contains nested elements and the lowest-level element is a meta- element, HCP returns an x-amz-header for that element. It does not return x-amz-headers for any other elements in that nested structure.

Trademarks and Legal Disclaimer

© 2017 Hitachi Data Systems Corporation. All rights reserved.