forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
336 lines
28 KiB
HTML
336 lines
28 KiB
HTML
<a name="obs_03_0120"></a><a name="obs_03_0120"></a>
|
|
|
|
<h1 class="topictitle1">Conditions</h1>
|
|
<div id="body1557026128761"><p id="obs_03_0120__p175010131315">In addition to effect, principals, resources, and actions, you can specify conditions for a bucket policy. A bucket policy takes effect only when its condition expressions match values contained in the request. <strong id="obs_03_0120__b133342121719">Conditions</strong> is an optional parameter. You can determine whether to use this parameter based on service requirements.</p>
|
|
<p id="obs_03_0120__p192962645715">For example, if account <strong id="obs_03_0120__b962665018176">A</strong> needs to be granted with full control permissions for an object uploaded by account <strong id="obs_03_0120__b563117505171">B</strong> in bucket <strong id="obs_03_0120__b66328501172">example</strong>, you can specify that the upload request must contain the <strong id="obs_03_0120__b16632850191716">acl</strong> key and set the policy effect to <strong id="obs_03_0120__b1463255010178">Allow</strong> for account <strong id="obs_03_0120__b1863313501175">A</strong>. The complete condition expression is as follows:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0120__table4665122635716" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_03_0120__row18929192605713"><th align="left" class="cellrowborder" valign="top" width="26.529999999999998%" id="mcps1.3.3.1.4.1.1"><p id="obs_03_0120__p1692982625718">Condition Operator</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="35.709999999999994%" id="mcps1.3.3.1.4.1.2"><p id="obs_03_0120__p1192982612571">Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="37.76%" id="mcps1.3.3.1.4.1.3"><p id="obs_03_0120__p792920265579">Value</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0120__row1793012695713"><td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.1.4.1.1 "><p id="obs_03_0120__p09301626135716">StringEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.709999999999994%" headers="mcps1.3.3.1.4.1.2 "><p id="obs_03_0120__p12930192616574">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.76%" headers="mcps1.3.3.1.4.1.3 "><p id="obs_03_0120__p693019269573">bucket-owner-full-control</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_03_0120__p2093052665712">A condition consists of three parts: condition operator, key, and value. Condition operators and keys are associated with each other. For example:</p>
|
|
<ul id="obs_03_0120__ul2928191410501"><li id="obs_03_0120__li9928101465017">If a string type condition operator is selected, such as <strong id="obs_03_0120__b390655973018">StringEquals</strong>, the key can only be of the string type, such as <strong id="obs_03_0120__b6906185914304">UserAgent</strong>.</li><li id="obs_03_0120__li916352425717">If a date type key is selected, such as <strong id="obs_03_0120__b79065599305">CurrentTime</strong>, the condition operator can only be of the date type, such as <strong id="obs_03_0120__b18906145913013">DateEquals</strong>.</li></ul>
|
|
<p id="obs_03_0120__p91971956124516"><a href="#obs_03_0120__table16670126115713">Table 1</a> describes the predefined condition operators provided by OBS.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_03_0120__table16670126115713"></a><a name="table16670126115713"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0120__table16670126115713" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Condition operators</caption><thead align="left"><tr id="obs_03_0120__row15930026105710"><th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.7.2.4.1.1"><p id="obs_03_0120__p18930526125711">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.69%" id="mcps1.3.7.2.4.1.2"><p id="obs_03_0120__p2930326195720">Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="47.96%" id="mcps1.3.7.2.4.1.3"><p id="obs_03_0120__p11930826135715">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0120__row4930826175711"><td class="cellrowborder" rowspan="6" valign="top" width="17.349999999999998%" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p993072619572">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.69%" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p1393042619575">StringEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.96%" headers="mcps1.3.7.2.4.1.3 "><p id="obs_03_0120__p109301126185714">Strict matching. Short version: streq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row129306265578"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p13930112613578">StringNotEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p6930926185718">Strict negated matching. Short version: strneq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row15930172675712"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1293032614572">StringEqualsIgnoreCase</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p20930526205719">Strict matching, ignoring case. Short version: streqi</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1393082612571"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p9930726115720">StringNotEqualsIgnoreCase</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p49314263574">Strict negated matching, ignoring case. Short version: strneqi</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row19931626165720"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p0931122625713">StringLike</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p1693112615575">Loose case-sensitive matching. The values can include a multi-character match wildcard (*) or a single-character match wildcard (?) anywhere in the string. Short version: strl</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1993192617571"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p8931526155711">StringNotLike</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p1393116268577">Negated loose case-sensitive matching. The values can include a multi-character match wildcard (*) or a single-character match wildcard (?) anywhere in the string. Short version: strnl</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1093132635715"><td class="cellrowborder" rowspan="6" valign="top" width="17.349999999999998%" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p18931626155713">Numeric</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.69%" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p199311126105710">NumericEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.96%" headers="mcps1.3.7.2.4.1.3 "><p id="obs_03_0120__p139316261570">Strict matching. Short version: numeq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row9931192612579"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p8931826185719">NumericNotEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p69311426125717">Strict negated matching. Short version: numneq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1893119263574"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p169314269573">NumericLessThan</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p793152615579">"Less than" matching. Short version: numlt</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row8931626175713"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1293162612577">NumericLessThanEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p13931026105713">"Less than or equals" matching. Short version: numlteq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1593117265574"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p129311265575">NumericGreaterThan</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p11931192605715">"Greater than" matching. Short version: numgt</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row11931102611577"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1693262617575">NumericGreaterThanEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p2932526165713">"Greater than or equals" matching. Short version: numgteq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1993272655712"><td class="cellrowborder" rowspan="6" valign="top" width="17.349999999999998%" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p39327261574">Date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.69%" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p14932826105710">DateEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.96%" headers="mcps1.3.7.2.4.1.3 "><p id="obs_03_0120__p493220267579">Strict matching. Short version: dateeq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row17932132675710"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1693252695711">DateNotEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p119321826185717">Strict negated matching. Short version: dateneq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row5932926145714"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1593215265571">DateLessThan</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p29322026115711">Indicates that the date is earlier than a specific date. Short version: datelt</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row13932926155717"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p209328269579">DateLessThanEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p19321267573">Indicates that the date is earlier than or equal to a specific date. Short version: datelteq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row293292635719"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p17934102685717">DateGreaterThan</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p20934126185717">Indicates that the date is later than a specific date. Short version: dategt</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row59341726195716"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p19341826105716">DateGreaterThanEquals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p1293572625720">Indicates that the date is later than or equal to a specific date. Short version: dategteq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row2935026205719"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1293582695717">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.69%" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p793572615710">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.96%" headers="mcps1.3.7.2.4.1.3 "><p id="obs_03_0120__p1793542616575">Strict Boolean matching</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row14935112613574"><td class="cellrowborder" rowspan="2" valign="top" width="17.349999999999998%" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p1893512695720">IP address</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.69%" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p39351726205718">IpAddress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.96%" headers="mcps1.3.7.2.4.1.3 "><p id="obs_03_0120__p13935426185714">Takes effect only on a specified IP address or IP address range. Example: <strong id="obs_03_0120__b173971220179">x.x.x.x/24</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1193542665711"><td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.1 "><p id="obs_03_0120__p9935142635716">NotIpAddress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.7.2.4.1.2 "><p id="obs_03_0120__p15935826105715">Takes effect only on all except the specified IP address or IP address range. Example: <strong id="obs_03_0120__b117663565187">x.x.x.x/24</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_03_0120__p89351026185714">A condition can contain any of the three types of keys: general keys, keys related to bucket actions, and keys related to object actions.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_03_0120__table6707152645718"></a><a name="table6707152645718"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0120__table6707152645718" frame="border" border="1" rules="all"><caption><b>Table 2 </b>General keys</caption><thead align="left"><tr id="obs_03_0120__row1935926135711"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.9.2.4.1.1"><p id="obs_03_0120__p1793592611576">Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.9.2.4.1.2"><p id="obs_03_0120__p793514267571">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48%" id="mcps1.3.9.2.4.1.3"><p id="obs_03_0120__p3935122615719">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0120__row3935172613579"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p89351926115716">CurrentTime</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p8935226155711">Date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p129353268579">Indicates the date when the request is received by the server. The date format must comply with ISO 8601.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row99361826135711"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p893662675713">EpochTime</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p17936626155716">Numeric</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p893610266576">Indicates the time when the request is received by the server, which is expressed as seconds since 1970.01.01 00:00:00 UTC, regardless of the leap seconds.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row159361226145714"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p893692618570">SecureTransport</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p4936182635719">Bool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p1936172613574">Requests whether to use SSL.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1936326155719"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p1693616267579">SourceIp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p1993652625717">IP address</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p1693692615716">Source IP address from which the request is sent</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1193652695714"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p129361426125712">UserAgent</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p393662612574">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p159364265574">Requested client software agent</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row293620261576"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.9.2.4.1.1 "><p id="obs_03_0120__p493602675716">Referer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.2.4.1.2 "><p id="obs_03_0120__p14936172685719">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48%" headers="mcps1.3.9.2.4.1.3 "><p id="obs_03_0120__p893617261578">Indicates the link from which the request is sent.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="obs_03_0120__table1972610267573"></a><a name="table1972610267573"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0120__table1972610267573" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Keys related to bucket actions</caption><thead align="left"><tr id="obs_03_0120__row6936152645711"><th align="left" class="cellrowborder" valign="top" width="19.608039196080394%" id="mcps1.3.10.2.5.1.1"><p id="obs_03_0120__p8937726175712">Action</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.788521147885211%" id="mcps1.3.10.2.5.1.2"><p id="obs_03_0120__p9937182635715">Optional Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.05569443055695%" id="mcps1.3.10.2.5.1.3"><p id="obs_03_0120__p10937826175712">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.547745225477453%" id="mcps1.3.10.2.5.1.4"><p id="obs_03_0120__p1096873771416">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0120__row593712616576"><td class="cellrowborder" rowspan="2" valign="top" width="19.608039196080394%" headers="mcps1.3.10.2.5.1.1 "><p id="obs_03_0120__p59379267576">ListBucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.788521147885211%" headers="mcps1.3.10.2.5.1.2 "><p id="obs_03_0120__p13937182675716">prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.05569443055695%" headers="mcps1.3.10.2.5.1.3 "><p id="obs_03_0120__p9937926155719">Type: String. Lists objects that begin with the specified prefix.</p>
|
|
</td>
|
|
<td class="cellrowborder" rowspan="4" valign="top" width="22.547745225477453%" headers="mcps1.3.10.2.5.1.4 "><p id="obs_03_0120__p175983818155">If <strong id="obs_03_0120__b109811736173113">prefix</strong>, <strong id="obs_03_0120__b17829438173110">delimiter</strong>, and <strong id="obs_03_0120__b6878104412310">max-keys</strong> are configured, the key-value pair meeting the conditions must be specified in the List operation for the bucket policy to take effect.</p>
|
|
<p id="obs_03_0120__p153725312183">For example, if a bucket policy (with the conditional operator set to <strong id="obs_03_0120__b24591820143620">NumericEquals</strong>, the key to <strong id="obs_03_0120__b9954740183611">max-keys</strong>, and the value to <strong id="obs_03_0120__b885925315368">100</strong>) that allows anonymous users to read data is configured for a bucket, the anonymous users must add <strong id="obs_03_0120__b1622310170423">?max-keys=100</strong> to the end of the bucket domain name for listing objects. The listed objects are the first 100 objects in alphabetic order.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row13937226115711"><td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.1 "><p id="obs_03_0120__p293712266579">max-keys</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.2 "><p id="obs_03_0120__p2093752619576">Type: Numeric. Sets the maximum number of objects. Returned objects are listed in alphabetic order.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row8937926195711"><td class="cellrowborder" rowspan="2" valign="top" headers="mcps1.3.10.2.5.1.1 "><p id="obs_03_0120__p393712675711">ListBucketVersions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.2 "><p id="obs_03_0120__p09372264575">prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.3 "><p id="obs_03_0120__p693772615577">Type: String. Lists multi-version objects whose name starts with the specified prefix.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row693722612571"><td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.1 "><p id="obs_03_0120__p15937326155717">max-keys</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.10.2.5.1.2 "><p id="obs_03_0120__p12938122617571">Type: Numeric. Sets the maximum number of objects. Returned objects are listed in alphabetic order.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row193842612574"><td class="cellrowborder" valign="top" width="19.608039196080394%" headers="mcps1.3.10.2.5.1.1 "><p id="obs_03_0120__p1793819263575">PutBucketAcl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.788521147885211%" headers="mcps1.3.10.2.5.1.2 "><p id="obs_03_0120__p139381226195719">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.05569443055695%" headers="mcps1.3.10.2.5.1.3 "><p id="obs_03_0120__p793892605711">Type: String. Configures the bucket ACL. When modifying a bucket ACL, you can use the request that contains a canned ACL setting in its header. Value options of a canned ACL setting: <strong id="obs_03_0120__b316331120554">private|public-read|public-read-write|authenticated-read|bucket-owner-read|bucket-owner-full-control|log-delivery-write</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.547745225477453%" headers="mcps1.3.10.2.5.1.4 "><p id="obs_03_0120__p9968173791419">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="obs_03_0120__table14742526145718"></a><a name="table14742526145718"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0120__table14742526145718" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Keys related to object actions</caption><thead align="left"><tr id="obs_03_0120__row293802635716"><th align="left" class="cellrowborder" valign="top" width="23.47%" id="mcps1.3.11.2.4.1.1"><p id="obs_03_0120__p99381026135710">Action</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="27.55%" id="mcps1.3.11.2.4.1.2"><p id="obs_03_0120__p2938132618576">Optional Key</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48.980000000000004%" id="mcps1.3.11.2.4.1.3"><p id="obs_03_0120__p19938726175710">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_03_0120__row19939182618579"><td class="cellrowborder" rowspan="3" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p893942695710">PutObject</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p493902613571">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p861813885512">Type: String. Configures the object ACL. When uploading an object, you can use the request that contains a canned ACL setting in its header. Value options of a canned ACL setting: <strong id="obs_03_0120__b890214564120">private|public-read|public-read-write|authenticated-read|bucketowner-read|bucket-owner-full-control|log-delivery-write</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row293932619571"><td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p19391026155720">copysource</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p393942620578">Type: String. Specifies names of the source bucket and the source object. Format: <strong id="obs_03_0120__b1808605689113241">/bucketname/keyname</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row3939626125711"><td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p15939726165718">metadata-directive</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p1293962614575">Type: String. Specifies whether to copy the metadata from the source object or replace with the metadata in the request. Values: <strong id="obs_03_0120__b1896711215184">COPY|REPLACE</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row159391126185711"><td class="cellrowborder" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p6939202611579">PutObjectAcl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p293992675713">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p26111442185511">Type: String. Configures the object ACL. When uploading an object, you can use the request that contains a canned ACL setting in its header. Value options of a canned ACL setting: <strong id="obs_03_0120__b114629269218">private|public-read|public-read-write|authenticated-read|bucketowner-read|bucket-owner-full-control|log-delivery-write</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row14939172645713"><td class="cellrowborder" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p16939142613573">GetObjectVersion</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p1294002655714">VersionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p1494016264579">Type: String. Obtains the object with the specified version ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row19940172645714"><td class="cellrowborder" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p2094002613577">GetObjectVersionAcl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p14940162685715">VersionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p13940192615574">Type: String. Obtains the ACL of the object with specified version ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row99401326105715"><td class="cellrowborder" rowspan="2" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p994016263575">PutObjectVersionAcl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p7940122655716">VersionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p1394042615579">Type: String. Specifies a version ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1794032615574"><td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p10940162695719">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p1392195113554">Type: String. Configures the ACL of the object with the specified version ID. When uploading an object, you can use the request that contains a canned ACL setting in its header. Value options of a canned ACL setting: <strong id="obs_03_0120__b39801571463">private|public-read|public-read-write|authenticated-read|bucketowner-read|bucket-owner-full-control|log-delivery-write</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_03_0120__row1394092635717"><td class="cellrowborder" valign="top" width="23.47%" headers="mcps1.3.11.2.4.1.1 "><p id="obs_03_0120__p179406267573">DeleteObjectVersion</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="27.55%" headers="mcps1.3.11.2.4.1.2 "><p id="obs_03_0120__p16940192615577">VersionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.980000000000004%" headers="mcps1.3.11.2.4.1.3 "><p id="obs_03_0120__p13941726185718">Type: String. Deletes the object with the specified version ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0074.html">Bucket Policy Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|