doc-exports/docs/obs/api-ref/obs_04_0055.html
zhangyue 7d2a7ec198 OBS API DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-11-05 16:37:11 +00:00

346 lines
26 KiB
HTML

<a name="obs_04_0055"></a><a name="obs_04_0055"></a>
<h1 class="topictitle1">Configuring Bucket Inventories</h1>
<div id="body1546933383180"><div class="section" id="obs_04_0055__section9919104763114"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0055__p145830425518">OBS uses the PUT method to configure bucket inventories. Each bucket can have a maximum of 10 inventories.</p>
<p id="obs_04_0055__p146389301523">To perform this operation, ensure that you have the <strong id="obs_04_0055__b184217311411">PutBucketInventoryConfiguration</strong> permission. By default, the bucket owner has this permission and can grant it to others.</p>
<p id="obs_04_0055__p57619271074">In order for inventory files to be successfully generated in a target bucket, it is necessary to configure a custom policy for this target bucket. For details, see <a href="obs_04_0027.html">Configuring a Bucket Policy</a>.</p>
<p id="obs_04_0055__p1153375713486">Policy body:</p>
<pre class="screen" id="obs_04_0055__screen929025689">{
"Sid": "bucktetInventoryPolicyStatementId",
"Effect": "Allow",
"Principal": {
"Service": "obs"
},
"Action": "PutObject",
"Resource": "target-bucket-name/*"
}</pre>
</div>
<div class="section" id="obs_04_0055__section20347124652614"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="obs_04_0055__screen656246211548">PUT /?inventory&amp;id=<em id="obs_04_0055__i17219118102211">configuration-id</em> HTTP/1.1
User-Agent: curl/7.29.0
Host: <em id="obs_04_0055__i123441746202313">bucketname</em>.obs.<em id="obs_04_0055__i034434682311">region</em>.example.com
Accept: */*
Date: <em id="obs_04_0055__i1258557112116">date</em>
Authorization: <em id="obs_04_0055__i2681718221">authorization string</em>
Content-Length: <em id="obs_04_0055__i10566104811315">length</em>
Expect: 100-continue
&lt;InventoryConfiguration&gt;
&lt;Id&gt;<em id="obs_04_0055__i1923310194612">configuration-id</em>&lt;/Id&gt;
&lt;IsEnabled&gt;true&lt;/IsEnabled&gt;
&lt;Filter&gt;
&lt;Prefix&gt;inventoryTestPrefix&lt;/Prefix&gt;
&lt;/Filter&gt;
&lt;Destination&gt;
&lt;Format&gt;CSV&lt;/Format&gt;
&lt;Bucket&gt;destbucket&lt;/Bucket&gt;
&lt;Prefix&gt;dest-prefix&lt;/Prefix&gt;
&lt;/Destination&gt;
&lt;Schedule&gt;
&lt;Frequency&gt;Daily&lt;/Frequency&gt;
&lt;/Schedule&gt;
&lt;IncludedObjectVersions&gt;All&lt;/IncludedObjectVersions&gt;
&lt;OptionalFields&gt;
&lt;Field&gt;Size&lt;/Field&gt;
&lt;Field&gt;LastModifiedDate&lt;/Field&gt;
&lt;Field&gt;ETag&lt;/Field&gt;
&lt;Field&gt;StorageClass&lt;/Field&gt;
&lt;Field&gt;IsMultipartUploaded&lt;/Field&gt;
&lt;Field&gt;ReplicationStatus&lt;/Field&gt;
&lt;Field&gt;EncryptionStatus&lt;/Field&gt;
&lt;/OptionalFields&gt;
&lt;/InventoryConfiguration&gt;</pre>
</div>
<div class="section" id="obs_04_0055__section6834183343213"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0055__table34931235193212" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0055__row195001352328"><th align="left" class="cellrowborder" valign="top" width="22.430000000000003%" id="mcps1.3.3.2.2.4.1.1"><p id="obs_04_0055__p750214358321">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.260000000000005%" id="mcps1.3.3.2.2.4.1.2"><p id="obs_04_0055__p95049355327">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.310000000000002%" id="mcps1.3.3.2.2.4.1.3"><p id="obs_04_0055__p185061235143215">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0055__row175081135133212"><td class="cellrowborder" valign="top" width="22.430000000000003%" headers="mcps1.3.3.2.2.4.1.1 "><p id="obs_04_0055__p19510123510324">id</p>
</td>
<td class="cellrowborder" valign="top" width="53.260000000000005%" headers="mcps1.3.3.2.2.4.1.2 "><p id="obs_04_0055__p16551024153319">ID of the inventory configuration, which must be consistent with the inventory configuration ID in the message body.</p>
<p id="obs_04_0055__p3653204810576">Type: string</p>
<p id="obs_04_0055__p154809270334">Specifications: A maximum of 64 characters</p>
<p id="obs_04_0055__p163341526203219">There is no default value.</p>
<p id="obs_04_0055__p11655141563317">Valid characters: letters, digits, hyphens (-), periods (.) and underscores (_)</p>
</td>
<td class="cellrowborder" valign="top" width="24.310000000000002%" headers="mcps1.3.3.2.2.4.1.3 "><p id="obs_04_0055__p853293516321">Yes</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0055__section386944113319"><h4 class="sectiontitle">Request Headers</h4><p id="obs_04_0055__p146681635112411">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
</div>
<div class="section" id="obs_04_0055__section1373213918368"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0055__p15861131883617">In this request, you must configure the bucket inventory in the request body. Upload the inventory configuration information in an XML file. <a href="#obs_04_0055__table1181123018399">Table 2</a> lists the configuration elements.</p>
<div class="tablenoborder"><a name="obs_04_0055__table1181123018399"></a><a name="table1181123018399"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0055__table1181123018399" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Bucket inventory configuration elements</caption><thead align="left"><tr id="obs_04_0055__row2018917307393"><th align="left" class="cellrowborder" valign="top" width="26.080000000000002%" id="mcps1.3.5.3.2.4.1.1"><p id="obs_04_0055__p19190143043913">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.10000000000001%" id="mcps1.3.5.3.2.4.1.2"><p id="obs_04_0055__p019273012397">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.820000000000002%" id="mcps1.3.5.3.2.4.1.3"><p id="obs_04_0055__p2195113033915">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0055__row7197230193913"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p176001015203813">InventoryConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p665619351384">Inventory configuration.</p>
<p id="obs_04_0055__p450903913382">Type: container</p>
<p id="obs_04_0055__p157618416385">Parent: none</p>
<p id="obs_04_0055__p13496330153815">Child: Id, IsEnabled, Filter, Destination, Schedule, IncludedObjectVersions, and OptionalFields</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p553681720423">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row12641636422"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p174466540382">Id</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p81961473914">ID of an inventory configuration, which must be consistent with the inventory configuration ID specified in the request.</p>
<p id="obs_04_0055__p1764841711396">Type: string</p>
<p id="obs_04_0055__p2640113418323">Specifications: A maximum of 64 characters</p>
<p id="obs_04_0055__p163501020133917">There is no default value.</p>
<p id="obs_04_0055__p328016581374">Valid characters: letters, digits, hyphens (-), periods (.) and underscores (_)</p>
<p id="obs_04_0055__p17751171123910">Parent: InventoryConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p3912326144211">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row944320444211"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p163325395428">IsEnabled</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p9673164618396">Indicates whether the rule is enabled. If this parameter is set to <strong id="obs_04_0055__b9758185664318">true</strong>, the inventory is generated. If not, the inventory will not be generated.</p>
<p id="obs_04_0055__p66066428103">Type: boolean</p>
<p id="obs_04_0055__p1049515233912">Value options: <strong id="obs_04_0055__b59967403164459">true</strong>, <strong id="obs_04_0055__b263109916453">false</strong></p>
<p id="obs_04_0055__p8142124218394">Parent: InventoryConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p333319390424">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row1263281464219"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p96324141421">Filter</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p1788311532428">Inventory filter configuration. The inventory contains only objects that meet the filter criteria (filtering by object name prefix). If no filter criteria is configured, all objects are included.</p>
<p id="obs_04_0055__p7709135515426">Type: container</p>
<p id="obs_04_0055__p1522165854218">Parent: InventoryConfiguration</p>
<p id="obs_04_0055__p16849124613424">Child: Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p13633121434214">No</p>
</td>
</tr>
<tr id="obs_04_0055__row133054344316"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p1306439432">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p099081724310">Filtering by name prefix. Only objects with the specified name prefix are included in the inventory.</p>
<p id="obs_04_0055__p87904196433">Type: string</p>
<p id="obs_04_0055__p1630633104317">Parent: Filter</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p830611315435">No</p>
</td>
</tr>
<tr id="obs_04_0055__row15875124915436"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p1487634964320">Schedule</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p642921364419">Time scheduled for generation of inventories.</p>
<p id="obs_04_0055__p8502615144411">Type: container</p>
<p id="obs_04_0055__p0192191710448">Parent: InventoryConfiguration</p>
<p id="obs_04_0055__p98761849174314">Child: Frequency</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p487674915438">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row1567585417434"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p18675145419430">Frequency</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p08381333134411">Intervals when inventories are generated. You can set this parameter to <strong id="obs_04_0055__b7794154219151">Daily</strong> or <strong id="obs_04_0055__b157941342101515">Weekly</strong>. An inventory is generated within one hour after it is configured for the first time. Then it is generated at the specified intervals.</p>
<p id="obs_04_0055__p10828835124415">Type: string</p>
<p id="obs_04_0055__p193074374448">Parent: Schedule</p>
<p id="obs_04_0055__p167515419436">Value options: <strong id="obs_04_0055__b25941415124512">Daily</strong>, <strong id="obs_04_0055__b16832192254511">Weekly</strong></p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p86752549430">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row1314615104218"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p11495174818425">Destination</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p1730418142404">Destination bucket of an inventory.</p>
<p id="obs_04_0055__p716617165400">Type: container</p>
<p id="obs_04_0055__p94761510144019">Parent: InventoryConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p18495154864216">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row13866105154213"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p547423118409">Format</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p17731342114010">Inventory format. Only the CSV format is supported.</p>
<p id="obs_04_0055__p52821444409">Type: string</p>
<p id="obs_04_0055__p776294554017">Parent: Destination</p>
<p id="obs_04_0055__p15614440134017">Value options: <strong id="obs_04_0055__b18243205516468">CSV</strong></p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p11616115484210">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row19414130154115"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p1841510094118">Bucket</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p366981484113">Name of the bucket for saving inventories.</p>
<p id="obs_04_0055__p112431684117">Type: string</p>
<p id="obs_04_0055__p5415150154112">Parent: Destination</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p124151907416">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row0319172613416"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p8320112610417">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p827075012418">The name prefix of inventory files. If no prefix is configured, the names of inventory files will start with the <strong id="obs_04_0055__b261519477549">BucketInventory</strong> by default.</p>
<p id="obs_04_0055__p17167165254116">Type: string</p>
<p id="obs_04_0055__p1032052664111">Parent: Destination</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p203201626134110">No</p>
</td>
</tr>
<tr id="obs_04_0055__row083813115416"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p38391531174113">IncludedObjectVersions</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p174160104511">Indicates whether versions of objects are included in an inventory.</p>
<ul id="obs_04_0055__ul155971349101420"><li id="obs_04_0055__li027695219145">If this parameter is set to <strong id="obs_04_0055__b2644874565">All</strong>, all the versions of objects are included in the inventory, and versioning related fields are added to the inventory, including: <strong id="obs_04_0055__b19269919135718">VersionId</strong>, <strong id="obs_04_0055__b77614226575">IsLatest</strong>, and <strong id="obs_04_0055__b1512202645712">DeleteMarker</strong>.</li><li id="obs_04_0055__li55975499147">If this parameter is set to <strong id="obs_04_0055__b7712194425712">Current</strong>, the inventory contains only the current objects versions at the time when the inventory is generated. No versioning fields are displayed in the inventory.</li></ul>
<p id="obs_04_0055__p995091414454">Type: string</p>
<p id="obs_04_0055__p17836131604515">Parent: InventoryConfiguration</p>
<p id="obs_04_0055__p198391131144112">Value options: <strong id="obs_04_0055__b5771142485916">All</strong>, <strong id="obs_04_0055__b499414284598">Current</strong></p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p98392313418">Yes</p>
</td>
</tr>
<tr id="obs_04_0055__row28041430154517"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p138041630134512">OptionalFields</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p732104434512">Extra metadata fields that can be added to an inventory. If this parameter is configured, fields specified in this parameter are contained in the inventory.</p>
<p id="obs_04_0055__p17134945174510">Type: container</p>
<p id="obs_04_0055__p12803194617458">Parent: InventoryConfiguration</p>
<p id="obs_04_0055__p580413010454">Child: Field</p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p680413074513">No</p>
</td>
</tr>
<tr id="obs_04_0055__row141118556453"><td class="cellrowborder" valign="top" width="26.080000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0055__p91111155134510">Field</p>
</td>
<td class="cellrowborder" valign="top" width="59.10000000000001%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0055__p148706881811">Optional fields. The <strong id="obs_04_0055__b1288013420">OptionalFields</strong> can contain multiple field elements.</p>
<p id="obs_04_0055__p88371610164613">Type: string</p>
<p id="obs_04_0055__p484213166469">Parent: OptionalFields</p>
<p id="obs_04_0055__p1911155511455">Value options: <strong id="obs_04_0055__b3784640522">Size</strong>, <strong id="obs_04_0055__b220016445220">LastModifiedDate</strong>, <strong id="obs_04_0055__b18521147026">StorageClass</strong>, <strong id="obs_04_0055__b197381949722">ETag</strong>, <strong id="obs_04_0055__b6321205411214">IsMultipartUploaded</strong>, <strong id="obs_04_0055__b93822581426">ReplicationStatus</strong>, <strong id="obs_04_0055__b143137318318">EncryptionStatus</strong></p>
</td>
<td class="cellrowborder" valign="top" width="14.820000000000002%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0055__p1011165594511">No</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0055__section52164611437"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0055__screen58137431151033"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
x-obs-request-id:<span class="w"> </span>request<span class="w"> </span>id
x-obs-id-2:<span class="w"> </span>id
Date:<span class="w"> </span>date
Content-Length:<span class="w"> </span>length
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0055__section1253385718430"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0055__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
</div>
<div class="section" id="obs_04_0055__section7363166184419"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0055__p1281810185018">This response contains no elements.</p>
</div>
<div class="section" id="obs_04_0055__section8123191694414"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0055__p45601120165018">In addition to common error codes, this API also returns other error codes. The following lists some common errors and possible causes of this API. For details, see <a href="#obs_04_0055__table12876123320500">Table 3</a>.</p>
<div class="tablenoborder"><a name="obs_04_0055__table12876123320500"></a><a name="table12876123320500"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0055__table12876123320500" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Inventory configuration error codes</caption><thead align="left"><tr id="obs_04_0055__row6301134115016"><th align="left" class="cellrowborder" valign="top" width="33.67%" id="mcps1.3.9.3.2.4.1.1"><p id="obs_04_0055__p183043420504">Error Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.98%" id="mcps1.3.9.3.2.4.1.2"><p id="obs_04_0055__p2303340505">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.349999999999998%" id="mcps1.3.9.3.2.4.1.3"><p id="obs_04_0055__p330834115019">HTTP Status Code</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0055__row1233516280010"><td class="cellrowborder" valign="top" width="33.67%" headers="mcps1.3.9.3.2.4.1.1 "><p id="obs_04_0055__p113361928904">MalformedXML</p>
</td>
<td class="cellrowborder" valign="top" width="45.98%" headers="mcps1.3.9.3.2.4.1.2 "><p id="obs_04_0055__p53362286012">Incorrect XML format of the inventory.</p>
</td>
<td class="cellrowborder" valign="top" width="20.349999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="obs_04_0055__p73369286010">400 Bad Request</p>
</td>
</tr>
<tr id="obs_04_0055__row5311834135013"><td class="cellrowborder" valign="top" width="33.67%" headers="mcps1.3.9.3.2.4.1.1 "><p id="obs_04_0055__p5311234185014">InvalidArgument</p>
</td>
<td class="cellrowborder" valign="top" width="45.98%" headers="mcps1.3.9.3.2.4.1.2 "><p id="obs_04_0055__p1231143405016">Invalid parameter.</p>
</td>
<td class="cellrowborder" valign="top" width="20.349999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="obs_04_0055__p631134165012">400 Bad Request</p>
</td>
</tr>
<tr id="obs_04_0055__row173123414508"><td class="cellrowborder" valign="top" width="33.67%" headers="mcps1.3.9.3.2.4.1.1 "><p id="obs_04_0055__p15318348500">InventoryCountOverLimit</p>
</td>
<td class="cellrowborder" valign="top" width="45.98%" headers="mcps1.3.9.3.2.4.1.2 "><p id="obs_04_0055__p431103465016">The number of inventories reached the upper limit.</p>
</td>
<td class="cellrowborder" valign="top" width="20.349999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="obs_04_0055__p12323342506">400 Bad Request</p>
</td>
</tr>
<tr id="obs_04_0055__row14505135525811"><td class="cellrowborder" valign="top" width="33.67%" headers="mcps1.3.9.3.2.4.1.1 "><p id="obs_04_0055__p1250585525812">PrefixExistInclusionRelationship</p>
</td>
<td class="cellrowborder" valign="top" width="45.98%" headers="mcps1.3.9.3.2.4.1.2 "><p id="obs_04_0055__p3505175565820">The prefix configured for this inventory overlaps with prefixes of existing inventories.</p>
</td>
<td class="cellrowborder" valign="top" width="20.349999999999998%" headers="mcps1.3.9.3.2.4.1.3 "><p id="obs_04_0055__p17505655125817">400 Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0055__section14819157124617"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="obs_04_0055__screen42901510155312">PUT /?inventory&amp;id=test_id HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.<em id="obs_04_0055__i12367117502">region</em>.example.com
Accept: */*
Date: Tue, 08 Jan 2019 08:17:10 +0000
Authorization: OBS UDSIAMSTUBTEST000001:/e2fqSfzLDb+0M36D4Op/s5KKr0=
Content-Length: 600
Expect: 100-continue
&lt;InventoryConfiguration&gt;
&lt;Id&gt;test_id&lt;/Id&gt;
&lt;IsEnabled&gt;true&lt;/IsEnabled&gt;
&lt;Filter&gt;
&lt;Prefix&gt;inventoryTestPrefix&lt;/Prefix&gt;
&lt;/Filter&gt;
&lt;Destination&gt;
&lt;Format&gt;CSV&lt;/Format&gt;
&lt;Bucket&gt;destbucket&lt;/Bucket&gt;
&lt;Prefix&gt;dest-prefix&lt;/Prefix&gt;
&lt;/Destination&gt;
&lt;Schedule&gt;
&lt;Frequency&gt;Daily&lt;/Frequency&gt;
&lt;/Schedule&gt;
&lt;IncludedObjectVersions&gt;All&lt;/IncludedObjectVersions&gt;
&lt;OptionalFields&gt;
&lt;Field&gt;Size&lt;/Field&gt;
&lt;Field&gt;LastModifiedDate&lt;/Field&gt;
&lt;Field&gt;ETag&lt;/Field&gt;
&lt;Field&gt;StorageClass&lt;/Field&gt;
&lt;Field&gt;IsMultipartUploaded&lt;/Field&gt;
&lt;Field&gt;ReplicationStatus&lt;/Field&gt;
&lt;Field&gt;EncryptionStatus&lt;/Field&gt;
&lt;/OptionalFields&gt;
&lt;/InventoryConfiguration&gt;</pre>
</div>
<div class="section" id="obs_04_0055__section13755536443"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0055__screen18548202314552"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span>
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
Server:<span class="w"> </span>OBS
x-obs-request-id:<span class="w"> </span>000001682C8545B0680893425D60AB83
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSIGTuRtBfo7lpHSt0ZknhdDHmllwd/p
Date:<span class="w"> </span>Tue,<span class="w"> </span>08<span class="w"> </span>Jan<span class="w"> </span>2019<span class="w"> </span>08:12:38<span class="w"> </span>GMT
Content-Length:<span class="w"> </span>0
</pre></div></td></tr></table></div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0026.html">Advanced Bucket Settings</a></div>
</div>
</div>