forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
154 lines
11 KiB
HTML
154 lines
11 KiB
HTML
<a name="obs_11_0010"></a><a name="obs_11_0010"></a>
|
|
|
|
<h1 class="topictitle1">Querying Bucket Properties</h1>
|
|
<div id="body1542440101580"><div class="section" id="obs_11_0010__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0010__p119916332368">You can use this command to query the basic properties of a bucket, including its default storage class, region, version ID, storage usage, bucket quota, whether it supports POSIX, and the number of objects in the bucket.</p>
|
|
</div>
|
|
<div class="section" id="obs_11_0010__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0010__ul16881135652116"><li id="obs_11_0010__li1688113567217">In Windows<pre class="screen" id="obs_11_0010__screen862114142213">obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] [-payer=xxx]</pre>
|
|
</li><li id="obs_11_0010__li24662114224">In Linux or macOS<pre class="screen" id="obs_11_0010__screen19225192119226">./obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx]
|
|
[-payer=xxx]</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0010__section1902103654319"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0010__ul99021136104310"><li id="obs_11_0010__li2902143644316">Take the Windows OS as an example. Run the <strong id="obs_11_0010__b1749332852013">obsutil stat obs://bucket-test</strong> command to query the basic properties of bucket <strong id="obs_11_0010__b1290120442537">bucket-test</strong>.<pre class="screen" id="obs_11_0010__screen19902113617433"><strong id="obs_11_0010__b190233618430">obsutil stat obs://bucket-test</strong>
|
|
|
|
Start at 2024-09-29 07:58:46.0506904 +0000 UTC
|
|
|
|
Bucket:
|
|
obs://bucket-test
|
|
StorageClass:
|
|
standard
|
|
|
|
ObsVersion:
|
|
3.0
|
|
BucketType:
|
|
OBJECTObjectNumber:
|
|
8005
|
|
Size:
|
|
320076506
|
|
Quota:
|
|
0</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0010__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0010__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0010__row683212154419"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0010__p118329219446">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0010__p15137125919108">Optional or Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.99999999999999%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0010__p12832121184414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0010__row108328217449"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p64495172515">bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p154316502519">Mandatory</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__p17425512259">The bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row141411953161116"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p814111533115">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p181412534110">Optional</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__p20141165311112">Queries the access control policies of the bucket while querying bucket properties.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row4947316184018"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p7947171615405">bf</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p10301510184317">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__p1930171012438">The display format of the used bucket capacity (in bytes). Possible values are:</p>
|
|
<ul id="obs_11_0010__ul1273864144412"><li id="obs_11_0010__li17738649445">human-readable</li><li id="obs_11_0010__li1551213137447">raw</li></ul>
|
|
<div class="note" id="obs_11_0010__note11602143394810"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0010__p6603633154818">If this parameter is not configured, the display format of the used bucket capacity (in bytes) is determined by the <strong id="obs_11_0010__b1712732920119">humanReadableFormat</strong> parameter in the configuration file.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row19538112913103"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p491218307109">bucket-cname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p391233019108">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__p19913330181012">The user-defined domain name bound to the bucket</p>
|
|
<div class="note" id="obs_11_0010__note15913130131019"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0010__p17913193051011">This parameter is only supported by obsutil 5.7.9 and later.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row10113026103410"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p153951131317">config</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p12395135316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__obs_11_0008_p1750111452317">The user-defined configuration file for executing the current command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row123662674010"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0010__p1966666191820">payer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0010__p1266611611820">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0010__p1166617619181">Specifies that requester pays is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_11_0010__section6926520122416"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0010__table992610203244" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0010__row892913208248"><th align="left" class="cellrowborder" valign="top" width="21.67%" id="mcps1.3.5.2.1.3.1.1"><p id="obs_11_0010__p1392992019245">Field</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="78.33%" id="mcps1.3.5.2.1.3.1.2"><p id="obs_11_0010__p19318207246">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0010__row79320208248"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p1093217203246">Bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p169337207245">The bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row1753615812247"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p15536155820245">StorageClass</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p3536758162410">The default storage class of the bucket</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row98643152253"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p8864415102517">Location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p1886416157252">The region where the bucket resides</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row116921551192713"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p0693195172712">ObsVersion</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p1269335113275">The version of the bucket</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row170790545"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p1579131745412">BucketType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p1979181716542">The type of the bucket. <strong id="obs_11_0010__b136051616179">OBJECT</strong> indicates a bucket for object storage. <strong id="obs_11_0010__b260512617172">POSIX</strong> indicates a bucket used as a parallel file system.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row14992172352513"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p69926234252">ObjectNumber</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p46322324">The number of objects in the bucket</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row1272082862513"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p4720528142516">Size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p872012286252">The storage usage of the bucket, in bytes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row48453315255"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p14845531172510">Quota</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p11845131182516">The bucket quota. Value <strong id="obs_11_0010__b29639372521">0</strong> indicates that no upper limit is set for the bucket quota.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0010__row16285968588"><td class="cellrowborder" valign="top" width="21.67%" headers="mcps1.3.5.2.1.3.1.1 "><p id="obs_11_0010__p5286146135817">Acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="78.33%" headers="mcps1.3.5.2.1.3.1.2 "><p id="obs_11_0010__p182864618582">The access control policy of the bucket</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0007.html">Bucket Commands</a></div>
|
|
</div>
|
|
</div>
|
|
|