1
0
forked from docs/doc-exports
doc-exports/docs/obs/api-swift/obs_03_0009.html
zhangyue 894279c39a Object Storage Service API Reference Swift V1
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-02-02 08:50:48 +00:00

30 lines
4.1 KiB
HTML

<a name="obs_03_0009"></a><a name="obs_03_0009"></a>
<h1 class="topictitle1">Naming Rules</h1>
<div id="body12905972"><p id="obs_03_0009__p35916793">If a request contains a container name or an object name, OBS (compatible with OpenStack Swift) starts to process the request only after checking that the name conforms to the specified naming rules.</p>
<div class="section" id="obs_03_0009__section41516642152937"><h4 class="sectiontitle">Account Naming Rules</h4><p id="obs_03_0009__p128623118530">Account names must be:</p>
<ul id="obs_03_0009__ul686417125316"><li id="obs_03_0009__li88642135317">Globally unique.</li><li id="obs_03_0009__li128645155313">Strings of 1 to 256 characters.</li></ul>
<div class="note" id="obs_03_0009__note46194888154127"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0009__p13100812154127">OBS (compatible with OpenStack Swift) uses the IDs of tenants created in the IAM system as account names.</p>
</div></div>
</div>
<div class="section" id="obs_03_0009__section54815683"><h4 class="sectiontitle">Container Naming Rules</h4><p id="obs_03_0009__p6679113613535">Container names must:</p>
<ul id="obs_03_0009__ul868383611531"><li id="obs_03_0009__li1868383625312">Be strings of 1 to 256 characters.</li><li id="obs_03_0009__li468303675314">Contain only case-sensitive letters, digits, periods (.), underscores (_), and hyphens (-).</li><li id="obs_03_0009__li868311369533">Use UTF-8 encoding.</li></ul>
<div class="note" id="obs_03_0009__note57785432154251"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0009__p50306844154251">To ensure system security, in a container name, the types of characters that are prohibited by OBS (compatible with OpenStack Swift) are more than those prohibited by OpenStack Swift.</p>
</div></div>
</div>
<div class="section" id="obs_03_0009__section23579102"><a name="obs_03_0009__section23579102"></a><a name="section23579102"></a><h4 class="sectiontitle">Object Naming Rules</h4><p id="obs_03_0009__p1712713531341">A key specifies the name of an object, and each object in a container must have a unique object key. Object names must:</p>
<ul id="obs_03_0009__ul1497457195416"><li id="obs_03_0009__li13477117195416">Be strings of 1 to 1024 characters, but they can start with any character.</li><li id="obs_03_0009__li17904729195416">Use UTF-8 encoding.</li><li id="obs_03_0009__li5298349819566">Not contain spaces, question marks (?), or double quotation marks (").</li></ul>
</div>
<div class="section" id="obs_03_0009__section29391483104815"><h4 class="sectiontitle">Rules About Custom Metadata</h4><p id="obs_03_0009__p81894114514">The following rules apply to custom metadata of accounts, containers, and objects:</p>
<ul id="obs_03_0009__ul9195311754"><li id="obs_03_0009__li419417110515">The value of a custom metadata item cannot exceed 256 bytes.</li><li id="obs_03_0009__li1019414112512">The name of a custom metadata item cannot exceed 128 bytes.</li><li id="obs_03_0009__li91941411059">All custom metadata items (including their names and values) cannot exceed 4,096 bytes.</li><li id="obs_03_0009__li101941712513">There can be no more than 90 custom metadata items.</li><li id="obs_03_0009__li161941211356">The name of a custom metadata item can contain only letters, digits, and ASCII characters.</li><li id="obs_03_0009__li91941512518">Custom metadata values can use UTF-8 encoding.</li><li id="obs_03_0009__li13195818516">Tab or space characters appearing after the name of a custom metadata item are deleted by default.</li></ul>
<div class="note" id="obs_03_0009__note20924719153955"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0009__p54104744153955">In OpenStack Swift, tab and space characters before and after the name of a custom metadata item are not deleted.</p>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0006.html">Methods of Calling APIs</a></div>
</div>
</div>