forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
262 lines
23 KiB
HTML
262 lines
23 KiB
HTML
<a name="swr_02_0056"></a><a name="swr_02_0056"></a>
|
|
|
|
<h1 class="topictitle1">Modifying an Image Retention Policy</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section173173133412"><h4 class="sectiontitle">Description</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p4321531143410">Modify an image retention policy.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section23233153416"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p03353173410">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section17345314349"><h4 class="sectiontitle">URI</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p1235163118349">PATCH /v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_table1737831153413" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row6361831193415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p938143143411">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p15388318346">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="swr_02_0056__en-us_topic_0000001185914360_p83993119349">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="swr_02_0056__en-us_topic_0000001185914360_p1391831183415">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row10369312343"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p184003112349">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p94019317349">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p8411731143412">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p174283103415">Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row13663119343"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p2431831163412">repository</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p44363143417">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p6441231203415">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1833713588245">Image repository name. Enter 1 to 128 characters. It must start and end with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Replace a slash (/) with a dollar sign ($) before you send the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row1537143163416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p245431173410">retention_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p144553113348">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p114633173417">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p646331143417">Image retention policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section94753123416"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row164813315340"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p049431163414">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p105043110346">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="swr_02_0056__en-us_topic_0000001185914360_p3501316348">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="swr_02_0056__en-us_topic_0000001185914360_p251131193410">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row54873113345"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p115153103411">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p4521131113418">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p25293113415">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p35333123415">Message body type (format). The value can be <strong id="swr_02_0056__en-us_topic_0000001185914360_b113431821431">application/json</strong> or <strong id="swr_02_0056__en-us_topic_0000001185914360_b93431423314">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0056__en-us_topic_0000001185914360_p1153931183418">Default value: <strong id="swr_02_0056__en-us_topic_0000001185914360_b1815018511318">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row144883118346"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p14541831173417">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p155411314347">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p9551431113410">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1655193114344">User token.</p>
|
|
<p id="swr_02_0056__en-us_topic_0000001185914360_p65603118347">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0056__en-us_topic_0000001185914360_b122236836311933">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_request_UpdateRetentionRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row135753110343"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p9581312345">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p175953116348">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="swr_02_0056__en-us_topic_0000001185914360_p659143153418">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="swr_02_0056__en-us_topic_0000001185914360_p136011310344">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row1457193116341"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p12601331183417">algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p12616312343">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p166123103418">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1862143103415">Retention policy matching rule. The value is <strong id="swr_02_0056__en-us_topic_0000001185914360_b145571326193110">or</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row1057203163416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p166373113349">rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p146312311345">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p9646310343">Array of <a href="#swr_02_0056__en-us_topic_0000001185914360_request_Rule">Rule</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p26533120345">Image retention policy.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0056__en-us_topic_0000001185914360_request_Rule"></a><a name="en-us_topic_0000001185914360_request_Rule"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_request_Rule" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Rule</caption><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row18651631183415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p16676315344">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p967231113412">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="swr_02_0056__en-us_topic_0000001185914360_p136816312349">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="swr_02_0056__en-us_topic_0000001185914360_p166915313345">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row56523113412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p3701131153410">template</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p071133112348">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p127263110347">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p177211311341">Retention policy type. The value can be <strong id="swr_02_0056__en-us_topic_0000001185914360_b21841128174818">date_rule</strong> and <strong id="swr_02_0056__en-us_topic_0000001185914360_b418482804820">tag_rule</strong>. This parameter cannot be changed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row566183113420"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p11734312342">params</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p873731203419">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p774131133413">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p17573112346">If <strong id="swr_02_0056__en-us_topic_0000001185914360_b143331715213355">template</strong> is set to <strong id="swr_02_0056__en-us_topic_0000001185914360_b98842658813355">date_rule</strong>, set <strong id="swr_02_0056__en-us_topic_0000001185914360_b175098633713355">params</strong> to <strong id="swr_02_0056__en-us_topic_0000001185914360_b190430690713355">{"days": "xxx"}</strong>. If <strong id="swr_02_0056__en-us_topic_0000001185914360_b137093846813355">template</strong> is set to <strong id="swr_02_0056__en-us_topic_0000001185914360_b97710281513355">tag_rule</strong>, set <strong id="swr_02_0056__en-us_topic_0000001185914360_b103315663913355">params</strong> to <strong id="swr_02_0056__en-us_topic_0000001185914360_b119497389213355">{"num": "xxx"}</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row19661031153412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p197543115345">tag_selectors</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p147620312348">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p147633163415">Array of <a href="#swr_02_0056__en-us_topic_0000001185914360_request_TagSelector">TagSelector</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p77716319342">Exception images.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0056__en-us_topic_0000001185914360_request_TagSelector"></a><a name="en-us_topic_0000001185914360_request_TagSelector"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_request_TagSelector" frame="border" border="1" rules="all"><caption><b>Table 5 </b>TagSelector</caption><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row97863115344"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p117915312341">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p12801831113411">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.3"><p id="swr_02_0056__en-us_topic_0000001185914360_p980193110344">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.5.2.5.1.4"><p id="swr_02_0056__en-us_topic_0000001185914360_p1781173193410">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row978831113416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p12821631133414">kind</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1482331163413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p158373119343">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p18333153413">Matching rule. The value can be <strong id="swr_02_0056__en-us_topic_0000001185914360_b155366311831637">label</strong> or <strong id="swr_02_0056__en-us_topic_0000001185914360_b31429290031637">regexp</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row6781931193410"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p08453153415">pattern</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p7854313346">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="swr_02_0056__en-us_topic_0000001185914360_p386143133417">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="swr_02_0056__en-us_topic_0000001185914360_p178783133418">If <strong id="swr_02_0056__en-us_topic_0000001185914360_b105437160931730">kind</strong> is set to <strong id="swr_02_0056__en-us_topic_0000001185914360_b167817128031730">label</strong>, set this parameter to the image tag. If <strong id="swr_02_0056__en-us_topic_0000001185914360_b83610611631730">kind</strong> is set to <strong id="swr_02_0056__en-us_topic_0000001185914360_b28660858231730">regexp</strong>, set this parameter to a regular expression.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section88713113420"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p4882317341">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section989193113418"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0056__en-us_topic_0000001185914360_screen69020310346">PATCH https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/retentions/{retention_id}
|
|
|
|
{
|
|
"algorithm" : "or",
|
|
"rules" : [ {
|
|
"params" : {
|
|
"days" : "30"
|
|
},
|
|
"tag_selectors" : [ {
|
|
"kind" : "label",
|
|
"pattern" : "v5"
|
|
}, {
|
|
"kind" : "label",
|
|
"pattern" : "1.0.1"
|
|
}, {
|
|
"kind" : "regexp",
|
|
"pattern" : "^123$"
|
|
} ],
|
|
"template" : "date_rule"
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section131081731133416"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p7109153111347">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section23941931103410"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0056__en-us_topic_0000001185914360_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0056__en-us_topic_0000001185914360_row2183123123418"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0056__en-us_topic_0000001185914360_p639563117346">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="swr_02_0056__en-us_topic_0000001185914360_p1839593112345">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0056__en-us_topic_0000001185914360_row2183431193411"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1395133133415">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p2395731203415">Update succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row918318317347"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p10396103133412">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p1739663120346">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row8183831133412"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p12396163193419">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p12396173103414">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row1618393173411"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p2397531153414">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p123971331153418">The organization, image repository, or policy was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0056__en-us_topic_0000001185914360_row9183183193417"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0056__en-us_topic_0000001185914360_p6397431143414">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0056__en-us_topic_0000001185914360_p8397143163412">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0056__en-us_topic_0000001185914360_section103981531193413"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0056__en-us_topic_0000001185914360_p639813111341">For details, see <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_02_0094.html">Image Retention Policy Management</a></div>
|
|
</div>
|
|
</div>
|
|
|