Files
doc-exports/docs/cbr/api-ref/CreatePolicy.html
tanweixi 56ef54c8ee cbr_api0219 version(worm)
Reviewed-by: Muller, Martin <martin.muller@t-systems.com>
Co-authored-by: tanweixi <tanweixi@huawei.com>
Co-committed-by: tanweixi <tanweixi@huawei.com>
2025-03-04 16:09:32 +00:00

688 lines
56 KiB
HTML

<a name="CreatePolicy"></a><a name="CreatePolicy"></a>
<h1 class="topictitle1">Creating a Policy</h1>
<div id="body1708331107508"><div class="section" id="CreatePolicy__section556129174911"><h4 class="sectiontitle">Function</h4><p id="CreatePolicy__p156109114916">This API is used to create a backup policy.</p>
</div>
<div class="section" id="CreatePolicy__section456292499"><h4 class="sectiontitle">URI</h4><p id="CreatePolicy__p195619964919">POST /v3/{project_id}/policies</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__table11571891492" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreatePolicy__row185710917492"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreatePolicy__p1357899498">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreatePolicy__p35759174919">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreatePolicy__p12581914918">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreatePolicy__p135811994911">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row5574910495"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreatePolicy__p858149144914">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreatePolicy__p9581594498">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreatePolicy__p105818944910">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreatePolicy__p2581796490">Project ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreatePolicy__section2588918494"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreatePolicy__row2583910497"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreatePolicy__p7593910493">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreatePolicy__p14591492498">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreatePolicy__p359096496">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreatePolicy__p155912944910">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row158169114910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreatePolicy__p11591194496">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreatePolicy__p6592924911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreatePolicy__p1659992492">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreatePolicy__p159139124918">User token</p>
<p id="CreatePolicy__p459159104916">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="CreatePolicy__b4601491496">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="CreatePolicy__request_PolicyCreateReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreatePolicy__row1360999492"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreatePolicy__p86016934917">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreatePolicy__p186089174918">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreatePolicy__p2601915491">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreatePolicy__p106012914915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row1960696493"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreatePolicy__p6618911499">policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreatePolicy__p56111954911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreatePolicy__p36119910499"><a href="#CreatePolicy__request_PolicyCreate">PolicyCreate</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreatePolicy__p12616913491">Request body for creating a policy</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__request_PolicyCreate"></a><a name="request_PolicyCreate"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__request_PolicyCreate" frame="border" border="1" rules="all"><caption><b>Table 4 </b>PolicyCreate</caption><thead align="left"><tr id="CreatePolicy__row961692495"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="CreatePolicy__p96212913494">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="CreatePolicy__p762697492">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="CreatePolicy__p3636915497">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="CreatePolicy__p1163169114914">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row196117917494"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreatePolicy__p0639916494">enabled</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreatePolicy__p126369124912">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreatePolicy__p96399164913">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreatePolicy__p46311994911">Whether to enable the policy</p>
<p id="CreatePolicy__p76359134918">Default: <strong id="CreatePolicy__b10635924917">true</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row126129154920"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreatePolicy__p126319984915">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreatePolicy__p863109114919">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreatePolicy__p4641394492">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreatePolicy__p4641917493">Specifies the policy name. The value consists of 1 to 64 characters and can contain only letters, digits, underscores (_), and hyphens (-).</p>
<p id="CreatePolicy__p364194497">Minimum: <strong id="CreatePolicy__b13641299498">1</strong></p>
<p id="CreatePolicy__p116410918496">Maximum: <strong id="CreatePolicy__b8640917498">64</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row26119904915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreatePolicy__p9648964918">operation_definition</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreatePolicy__p76416924917">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreatePolicy__p86419124911"><a href="#CreatePolicy__request_PolicyoODCreate">PolicyoODCreate</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreatePolicy__p66419174915">Scheduling parameter</p>
</td>
</tr>
<tr id="CreatePolicy__row66119917493"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreatePolicy__p146416912495">operation_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreatePolicy__p7646924918">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreatePolicy__p6645911499">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreatePolicy__p196499154914">Protection type, which can be <strong id="CreatePolicy__b96579154910">backup</strong> or <strong id="CreatePolicy__b965139194918">replication</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row8621904910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreatePolicy__p865109114912">trigger</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreatePolicy__p86519911497">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreatePolicy__p465149204919"><a href="#CreatePolicy__request_PolicyTriggerReq">PolicyTriggerReq</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreatePolicy__p176514911493">Time rule for the policy execution</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__request_PolicyoODCreate"></a><a name="request_PolicyoODCreate"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__request_PolicyoODCreate" frame="border" border="1" rules="all"><caption><b>Table 5 </b>PolicyoODCreate</caption><thead align="left"><tr id="CreatePolicy__row11650910491"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="CreatePolicy__p0673917493">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="CreatePolicy__p2671491494">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="CreatePolicy__p16675984916">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="CreatePolicy__p06710919496">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row66616954920"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p56716994920">day_backups</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p156713944915">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p166711916492">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p1267149114917">Maximum number of daily backups that can be retained. The latest backup of each day is saved in the long term. This parameter and <strong id="CreatePolicy__b767196495">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b1967296490">0</strong> to <strong id="CreatePolicy__b367119114916">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b106712954916">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b96718914910">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p4672974912">Minimum: <strong id="CreatePolicy__b567189184910">0</strong></p>
<p id="CreatePolicy__p66769154919">Maximum: <strong id="CreatePolicy__b186712924911">100</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row16663912498"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p116715924912">destination_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p1568596494">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p1168691493">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p166817944911">ID of the replication destination project, which is mandatory for cross-region replication</p>
</td>
</tr>
<tr id="CreatePolicy__row966179144915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p206889114917">destination_region</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p19687934917">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p2683918490">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p46899174919">Replication destination region, which is mandatory for cross-region replication The destination region cannot be the same as the current region. The value contains 0 to 255 characters, including only letters, digits, underscores (_), and hyphens (-).</p>
</td>
</tr>
<tr id="CreatePolicy__row46620917497"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p3683974917">max_backups</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p13694994913">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p15691498497">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p6697974914">Maximum number of backups that can be automatically created for a backup object. The value can be <strong id="CreatePolicy__b369169114919">-1</strong> or ranges from <strong id="CreatePolicy__b2694914495">0</strong> to <strong id="CreatePolicy__b7699934918">99999</strong>. If the value is set to <strong id="CreatePolicy__b66916918496">-1</strong>, backups will not be cleared by quantity limit. If this parameter and <strong id="CreatePolicy__b116909154917">retention_duration_days</strong> are left blank at the same time, the backups will be retained permanently. This parameter and <strong id="CreatePolicy__b17692096491">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p26969164916">Minimum: <strong id="CreatePolicy__b17691991491">1</strong></p>
<p id="CreatePolicy__p19696912497">Maximum: <strong id="CreatePolicy__b36918912494">99999</strong></p>
<p id="CreatePolicy__p10691993497">Default: <strong id="CreatePolicy__b17691796498">-1</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row7667918497"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p1369189144917">month_backups</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p1069179174911">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p106920918495">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p1769995496">Maximum number of monthly backups that can be retained. The latest backup of each month is saved in the long term. This parameter and <strong id="CreatePolicy__b2692974912">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b13691898499">0</strong> to <strong id="CreatePolicy__b470159114919">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b13701396498">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b2701097494">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p2708918494">Minimum: <strong id="CreatePolicy__b87089204919">0</strong></p>
<p id="CreatePolicy__p87019913493">Maximum: <strong id="CreatePolicy__b070892495">100</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row4661499492"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p1370179114912">retention_duration_days</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p177017934915">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p117039124920">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p157029164911">Duration of retaining a backup, in days. The maximum value is <strong id="CreatePolicy__b1770491491">99999</strong>. If the value is set to <strong id="CreatePolicy__b6701393498">-1</strong>, backups will not be cleared by retention duration. If this parameter and <strong id="CreatePolicy__b470492495">max_backups</strong> are left blank at the same time, the backups will be retained permanently. This parameter cannot be applied together with <strong id="CreatePolicy__b1070493492">max_backups</strong>, <strong id="CreatePolicy__b157011934918">day_backups</strong>, <strong id="CreatePolicy__b1970891490">week_backups</strong>, <strong id="CreatePolicy__b177018964919">month_backups</strong>, and <strong id="CreatePolicy__b07012911493">year_backups</strong>.</p>
<p id="CreatePolicy__p157019194920">Minimum: <strong id="CreatePolicy__b10701397495">1</strong></p>
<p id="CreatePolicy__p87039144911">Maximum: <strong id="CreatePolicy__b18705984916">99999</strong></p>
<p id="CreatePolicy__p1370169124918">Default: <strong id="CreatePolicy__b170590495">-1</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row1566129204912"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p070594492">timezone</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p1470119104910">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p197110910499">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p197110934919">Time zone where the user is located, for example, UTC+01:00. Set this parameter if you have configured any of the parameters: <strong id="CreatePolicy__b167113920497">day_backups</strong>, <strong id="CreatePolicy__b6718914499">week_backups</strong>, <strong id="CreatePolicy__b14713910498">month_backups</strong>, <strong id="CreatePolicy__b5717934911">year_backups</strong>.</p>
</td>
</tr>
<tr id="CreatePolicy__row136699174918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p4710920493">week_backups</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p4712913490">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p77199184913">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p16711898499">Maximum number of weekly backups that can be retained. The latest backup of each week is saved in the long term. This parameter and <strong id="CreatePolicy__b18710974914">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b187219964917">0</strong> to <strong id="CreatePolicy__b167210916495">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b1072199497">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b5724994914">retention_duration_days</strong> cannot be both applied.</p>
</td>
</tr>
<tr id="CreatePolicy__row18665934914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreatePolicy__p187249124911">year_backups</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreatePolicy__p11722924912">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreatePolicy__p1721954918">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreatePolicy__p14727913496">Maximum number of yearly backups that can be retained. The latest backup of each year is saved in the long term. This parameter and <strong id="CreatePolicy__b97219984916">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b572498497">0</strong> to <strong id="CreatePolicy__b87259144918">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b37217924918">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b1872139134914">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p172395495">Minimum: <strong id="CreatePolicy__b19725924913">0</strong></p>
<p id="CreatePolicy__p18722944916">Maximum: <strong id="CreatePolicy__b107239104919">100</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__request_PolicyTriggerReq"></a><a name="request_PolicyTriggerReq"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__request_PolicyTriggerReq" frame="border" border="1" rules="all"><caption><b>Table 6 </b>PolicyTriggerReq</caption><thead align="left"><tr id="CreatePolicy__row5723904918"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.1"><p id="CreatePolicy__p675199174910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.2"><p id="CreatePolicy__p1751198493">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.3"><p id="CreatePolicy__p17751693492">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.6.2.5.1.4"><p id="CreatePolicy__p97518919493">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row13721796499"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.1 "><p id="CreatePolicy__p97509104918">properties</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.2 "><p id="CreatePolicy__p37519914490">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.3 "><p id="CreatePolicy__p187569174910"><a href="#CreatePolicy__request_PolicyTriggerPropertiesReq">PolicyTriggerPropertiesReq</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.6.2.5.1.4 "><p id="CreatePolicy__p167518944910">Scheduler attributes</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__request_PolicyTriggerPropertiesReq"></a><a name="request_PolicyTriggerPropertiesReq"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__request_PolicyTriggerPropertiesReq" frame="border" border="1" rules="all"><caption><b>Table 7 </b>PolicyTriggerPropertiesReq</caption><thead align="left"><tr id="CreatePolicy__row676590491"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.1"><p id="CreatePolicy__p8765916499">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.2"><p id="CreatePolicy__p137613924911">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.3"><p id="CreatePolicy__p157615915494">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.7.2.5.1.4"><p id="CreatePolicy__p37618915498">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row1276199174914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.1 "><p id="CreatePolicy__p477179144917">pattern</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.2 "><p id="CreatePolicy__p9771994913">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.3 "><p id="CreatePolicy__p4771799497">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.7.2.5.1.4 "><p id="CreatePolicy__p87799124918">Scheduling rule of the scheduler. A maximum of 24 rules can be configured. The scheduling rule complies with iCalendar RFC 2445, but it supports only the <strong id="CreatePolicy__b167715920497">FREQ</strong>, <strong id="CreatePolicy__b117715914920">BYDAY</strong>, <strong id="CreatePolicy__b37769184911">BYHOUR</strong>, <strong id="CreatePolicy__b167789124920">BYMINUTE</strong>, and <strong id="CreatePolicy__b2774994910">INTERVAL</strong> parameters. <strong id="CreatePolicy__b1377179184914">FREQ</strong> can be set only to <strong id="CreatePolicy__b15771944919">WEEKLY</strong> or <strong id="CreatePolicy__b4775915498">DAILY</strong>. <strong id="CreatePolicy__b167717914916">BYDAY</strong> can be set to <strong id="CreatePolicy__b1977129184911">MO</strong>, <strong id="CreatePolicy__b13778918492">TU</strong>, <strong id="CreatePolicy__b12775904918">WE</strong>, <strong id="CreatePolicy__b37749184912">TH</strong>, <strong id="CreatePolicy__b1977179184914">FR</strong>, <strong id="CreatePolicy__b17775914490">SA</strong>, and <strong id="CreatePolicy__b127789144913">SU</strong> (seven days of a week). <strong id="CreatePolicy__b11772944911">BYHOUR</strong> ranges from 0 to 23 hours. <strong id="CreatePolicy__b17712914916">BYMINUTE</strong> ranges from 0 to 59 minutes. The scheduling interval cannot be less than 1 hour. A maximum of 24 time points are allowed in a day. For example, if the scheduling time is 14:00 (UTC) from Monday to Sunday, set the scheduling rule as follows: <strong id="CreatePolicy__b1277189174915">FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00</strong>. If the scheduling time is 14:00 (UTC+8) every day, set the scheduling rule as follows: <strong id="CreatePolicy__b1077695493">FREQ=DAILY;INTERVAL=1;BYHOUR=6;BYMINUTE=00</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreatePolicy__section117719974912"><h4 class="sectiontitle">Response Parameters</h4><p id="CreatePolicy__p37713917491"><strong id="CreatePolicy__b1477490496">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_PolicyCreateResp" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreatePolicy__row167819174917"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CreatePolicy__p07811912498">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CreatePolicy__p679189164915">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CreatePolicy__p77919934912">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row197879124915"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreatePolicy__p1379179124910">policy</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreatePolicy__p12795920495"><a href="#CreatePolicy__response_Policy">Policy</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreatePolicy__p47939124910">Response to the request for creating a policy</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__response_Policy"></a><a name="response_Policy"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_Policy" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Policy</caption><thead align="left"><tr id="CreatePolicy__row16801994492"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="CreatePolicy__p14811296492">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="CreatePolicy__p118117912491">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="CreatePolicy__p15813910497">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row1380095491"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p1782199124917">enabled</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p128269164911">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p2821398495">Whether the policy is enabled</p>
</td>
</tr>
<tr id="CreatePolicy__row17803974913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p782139134914">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p158219114915">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p19823954912">Policy ID</p>
</td>
</tr>
<tr id="CreatePolicy__row1180899497"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p48210914917">name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p1182199114916">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p18823916491">Policy Name</p>
</td>
</tr>
<tr id="CreatePolicy__row198014919495"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p583109184917">operation_definition</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p178314919499"><a href="#CreatePolicy__response_PolicyoODCreate">PolicyoODCreate</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p158316915493">Policy attributes</p>
</td>
</tr>
<tr id="CreatePolicy__row158016984916"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p18835974910">operation_type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p2837917496">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p11837910491">Protection type, which can be <strong id="CreatePolicy__b13831964917">backup</strong> or <strong id="CreatePolicy__b118316974912">replication</strong></p>
<p id="CreatePolicy__p58315917495">Enumeration values:</p>
<ul id="CreatePolicy__ul6832944912"><li id="CreatePolicy__li128312911498"><strong id="CreatePolicy__b15835914913">backup</strong></li><li id="CreatePolicy__li12831597492"><strong id="CreatePolicy__b883793499">replication</strong></li></ul>
</td>
</tr>
<tr id="CreatePolicy__row168018984911"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p18349104915">trigger</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p1184392493"><a href="#CreatePolicy__response_PolicyTriggerResp">PolicyTriggerResp</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p208418914495">Time scheduling rule for the policy</p>
</td>
</tr>
<tr id="CreatePolicy__row178119144916"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreatePolicy__p5847920495">associated_vaults</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreatePolicy__p1884189154919">Array of <a href="#CreatePolicy__response_PolicyAssociateVault">PolicyAssociateVault</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreatePolicy__p178489114919">Associated vault</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__response_PolicyoODCreate"></a><a name="response_PolicyoODCreate"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_PolicyoODCreate" frame="border" border="1" rules="all"><caption><b>Table 10 </b>PolicyoODCreate</caption><thead align="left"><tr id="CreatePolicy__row128414910495"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="CreatePolicy__p98529204910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="CreatePolicy__p78615964910">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="CreatePolicy__p1386294494">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row11851191493"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p1861694496">day_backups</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p198619144912">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p08613919497">Maximum number of daily backups that can be retained. The latest backup of each day is saved in the long term. This parameter and <strong id="CreatePolicy__b1586139134920">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b68619934912">0</strong> to <strong id="CreatePolicy__b0864954912">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b158614914497">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b6860924920">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p188620919492">Minimum: <strong id="CreatePolicy__b128699154910">0</strong></p>
<p id="CreatePolicy__p48699134918">Maximum: <strong id="CreatePolicy__b118615944911">100</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row1851944920"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p1186169134916">destination_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p486497490">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p118669194915">ID of the replication destination project, which is mandatory for cross-region replication</p>
</td>
</tr>
<tr id="CreatePolicy__row4853944913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p12873914912">destination_region</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p78709184914">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p15871595497">Replication destination region, which is mandatory for cross-region replication The destination region cannot be the same as the current region. The value contains 0 to 255 characters, including only letters, digits, underscores (_), and hyphens (-).</p>
</td>
</tr>
<tr id="CreatePolicy__row785139174918"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p2342397494">max_backups</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p12342159174918">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p1034229134914">Maximum number of backups that can be automatically created for a backup object. The value can be <strong id="CreatePolicy__b163421793499">-1</strong> or ranges from <strong id="CreatePolicy__b123429915493">0</strong> to <strong id="CreatePolicy__b4342895496">99999</strong>. If the value is set to <strong id="CreatePolicy__b123421944911">-1</strong>, backups will not be cleared by quantity limit. If this parameter and <strong id="CreatePolicy__b8342399493">retention_duration_days</strong> are left blank at the same time, the backups will be retained permanently. This parameter and <strong id="CreatePolicy__b2034211994918">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p93435904919">Minimum: <strong id="CreatePolicy__b1734369164910">1</strong></p>
<p id="CreatePolicy__p10343798498">Maximum: <strong id="CreatePolicy__b1434359174911">99999</strong></p>
<p id="CreatePolicy__p113435918497">Default: <strong id="CreatePolicy__b134379144913">-1</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row1856994916"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p123433917494">month_backups</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p134314916499">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p133431692499">Maximum number of monthly backups that can be retained. The latest backup of each month is saved in the long term. This parameter and <strong id="CreatePolicy__b1734313984917">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b103437919497">0</strong> to <strong id="CreatePolicy__b03431093497">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b534319114919">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b1034399114918">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p834399134916">Minimum: <strong id="CreatePolicy__b93431396494">0</strong></p>
<p id="CreatePolicy__p1434310934910">Maximum: <strong id="CreatePolicy__b19343792494">100</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row285199134916"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p103431094497">retention_duration_days</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p134359114919">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p634379184915">Duration of retaining a backup, in days. The maximum value is <strong id="CreatePolicy__b163431892499">99999</strong>. If the value is set to <strong id="CreatePolicy__b1734319154918">-1</strong>, backups will not be cleared by retention duration. If this parameter and <strong id="CreatePolicy__b634312919495">max_backups</strong> are left blank at the same time, the backups will be retained permanently. This parameter cannot be applied together with <strong id="CreatePolicy__b193431096493">max_backups</strong>, <strong id="CreatePolicy__b1234310914917">day_backups</strong>, <strong id="CreatePolicy__b163431995491">week_backups</strong>, <strong id="CreatePolicy__b934318910497">month_backups</strong>, and <strong id="CreatePolicy__b9343490493">year_backups</strong>.</p>
<p id="CreatePolicy__p12343794493">Minimum: <strong id="CreatePolicy__b1334339104910">1</strong></p>
<p id="CreatePolicy__p173430919499">Maximum: <strong id="CreatePolicy__b234310917492">99999</strong></p>
<p id="CreatePolicy__p3343149184916">Default: <strong id="CreatePolicy__b834313913492">-1</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row19859919495"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p1734317919494">timezone</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p1334313913491">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p33432097499">Time zone where the user is located, for example, UTC+01:00. Set this parameter if you have configured any of the parameters: <strong id="CreatePolicy__b15343119104919">day_backups</strong>, <strong id="CreatePolicy__b6343169104914">week_backups</strong>, <strong id="CreatePolicy__b734315917490">month_backups</strong>, <strong id="CreatePolicy__b103436944914">year_backups</strong>.</p>
</td>
</tr>
<tr id="CreatePolicy__row20851924915"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p434316944918">week_backups</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p234311916496">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p3343798496">Maximum number of weekly backups that can be retained. The latest backup of each week is saved in the long term. This parameter and <strong id="CreatePolicy__b1034315944911">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b14343179104916">0</strong> to <strong id="CreatePolicy__b1934319984913">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b234314974918">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b19343691499">retention_duration_days</strong> cannot be both applied.</p>
</td>
</tr>
<tr id="CreatePolicy__row785149194919"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreatePolicy__p18344129164916">year_backups</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreatePolicy__p4344292493">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreatePolicy__p133447934910">Maximum number of yearly backups that can be retained. The latest backup of each year is saved in the long term. This parameter and <strong id="CreatePolicy__b43441995494">max_backups</strong> will both be applied. The value ranges from <strong id="CreatePolicy__b13441990497">0</strong> to <strong id="CreatePolicy__b03445994912">100</strong>. If this parameter is configured, <strong id="CreatePolicy__b334417944916">timezone</strong> is mandatory. This parameter and <strong id="CreatePolicy__b11344109184915">retention_duration_days</strong> cannot be both applied.</p>
<p id="CreatePolicy__p1434414944917">Minimum: <strong id="CreatePolicy__b1634429174919">0</strong></p>
<p id="CreatePolicy__p1634429124911">Maximum: <strong id="CreatePolicy__b33441394491">100</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__response_PolicyTriggerResp"></a><a name="response_PolicyTriggerResp"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_PolicyTriggerResp" frame="border" border="1" rules="all"><caption><b>Table 11 </b>PolicyTriggerResp</caption><thead align="left"><tr id="CreatePolicy__row79118974914"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.1"><p id="CreatePolicy__p13344179104920">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.2"><p id="CreatePolicy__p8344189184913">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.6.2.4.1.3"><p id="CreatePolicy__p1734419164915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row891169194918"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreatePolicy__p7344169184914">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreatePolicy__p03441091492">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreatePolicy__p63449920490">Scheduler ID</p>
</td>
</tr>
<tr id="CreatePolicy__row189112914913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreatePolicy__p193441294498">name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreatePolicy__p163445914911">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreatePolicy__p1534469104917">Scheduler name</p>
</td>
</tr>
<tr id="CreatePolicy__row89112912496"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreatePolicy__p934420914497">properties</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreatePolicy__p17344792495"><a href="#CreatePolicy__response_PolicyTriggerPropertiesResp">PolicyTriggerPropertiesResp</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreatePolicy__p43441920497">Scheduler attributes</p>
</td>
</tr>
<tr id="CreatePolicy__row1291999493"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreatePolicy__p43441904917">type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreatePolicy__p1134419954912">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreatePolicy__p434412919491">Scheduler type. Currently, only <strong id="CreatePolicy__b734489174912">time</strong> (periodic scheduling) is supported.</p>
<p id="CreatePolicy__p93442964920">Enumeration values:</p>
<ul id="CreatePolicy__ul63447944918"><li id="CreatePolicy__li113451392494"><strong id="CreatePolicy__b23453914911">time</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__response_PolicyTriggerPropertiesResp"></a><a name="response_PolicyTriggerPropertiesResp"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_PolicyTriggerPropertiesResp" frame="border" border="1" rules="all"><caption><b>Table 12 </b>PolicyTriggerPropertiesResp</caption><thead align="left"><tr id="CreatePolicy__row0931891497"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="CreatePolicy__p834579194912">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="CreatePolicy__p183453994911">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="CreatePolicy__p23458944910">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row293994490"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreatePolicy__p1734529104917">pattern</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreatePolicy__p83456919499">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreatePolicy__p43454944910">Scheduling rule of the scheduler. A maximum of 24 rules can be configured. The scheduling rule complies with iCalendar RFC 2445, but it supports only the <strong id="CreatePolicy__b93451596498">FREQ</strong>, <strong id="CreatePolicy__b734518915499">BYDAY</strong>, <strong id="CreatePolicy__b1434549154919">BYHOUR</strong>, <strong id="CreatePolicy__b4345096499">BYMINUTE</strong>, and <strong id="CreatePolicy__b0345592493">INTERVAL</strong> parameters. <strong id="CreatePolicy__b1134510954910">FREQ</strong> can be set only to <strong id="CreatePolicy__b1034517913496">WEEKLY</strong> or <strong id="CreatePolicy__b193451298496">DAILY</strong>. <strong id="CreatePolicy__b534519194912">BYDAY</strong> can be set to <strong id="CreatePolicy__b143456919492">MO</strong>, <strong id="CreatePolicy__b934516924917">TU</strong>, <strong id="CreatePolicy__b1234511964917">WE</strong>, <strong id="CreatePolicy__b234559134915">TH</strong>, <strong id="CreatePolicy__b6345199144916">FR</strong>, <strong id="CreatePolicy__b10346139154917">SA</strong>, and <strong id="CreatePolicy__b434612934919">SU</strong> (seven days of a week). <strong id="CreatePolicy__b163465934912">BYHOUR</strong> ranges from 0 to 23 hours. <strong id="CreatePolicy__b9346119104910">BYMINUTE</strong> ranges from 0 to 59 minutes. The scheduling interval cannot be less than 1 hour. A maximum of 24 time points are allowed in a day. For example, if the scheduling time is 14:00 (UTC) from Monday to Sunday, set the scheduling rule as follows: <strong id="CreatePolicy__b3346149114918">FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00</strong>. If the scheduling time is 14:00 (UTC+8) every day, set the scheduling rule as follows: <strong id="CreatePolicy__b173461594495">FREQ=DAILY;INTERVAL=1;BYHOUR=6;BYMINUTE=00</strong></p>
</td>
</tr>
<tr id="CreatePolicy__row8931496495"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreatePolicy__p16346119154919">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreatePolicy__p2346996494">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreatePolicy__p3346794492">Start time of the scheduler, for example, <strong id="CreatePolicy__b3346999496">2020-01-08 09:59:49</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreatePolicy__response_PolicyAssociateVault"></a><a name="response_PolicyAssociateVault"></a><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__response_PolicyAssociateVault" frame="border" border="1" rules="all"><caption><b>Table 13 </b>PolicyAssociateVault</caption><thead align="left"><tr id="CreatePolicy__row1694119174916"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.1"><p id="CreatePolicy__p634616994916">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.2"><p id="CreatePolicy__p113463944911">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.8.2.4.1.3"><p id="CreatePolicy__p153461912496">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row7950954913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="CreatePolicy__p1734617916492">destination_vault_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="CreatePolicy__p7346209124915">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="CreatePolicy__p23469918490">ID of the associated remote vault</p>
</td>
</tr>
<tr id="CreatePolicy__row11952974913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="CreatePolicy__p4346499491">vault_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="CreatePolicy__p103461091495">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="CreatePolicy__p234659154917">Vault ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreatePolicy__section53469910493"><h4 class="sectiontitle">Example Requests</h4><ul id="CreatePolicy__ul53465918491"><li id="CreatePolicy__li834614918496">Creating a backup policy with backups automatically executed at 14:00 everyday and with each backup saved for one day<pre class="screen" id="CreatePolicy__screen33471934911">POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/policies
{
"policy" : {
"enabled" : true,
"name" : "policy001",
"operation_definition" : {
"day_backups" : 0,
"month_backups" : 0,
"retention_duration_days" : 1,
"timezone" : "UTC+01:00",
"week_backups" : 0,
"year_backups" : 0
},
"operation_type" : "backup",
"trigger" : {
"properties" : {
"pattern" : [ "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00" ]
}
}
}
}</pre>
</li><li id="CreatePolicy__li8347129144918">Creating a replication policy with backups automatically replicated at 14:00 everyday and with each backup saved for one day<pre class="screen" id="CreatePolicy__screen1734809194916">POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/policies
{
"policy" : {
"enabled" : true,
"name" : "policy002",
"operation_definition" : {
"retention_duration_days" : 1,
"day_backups" : 0,
"week_backups" : 0,
"month_backups" : 0,
"year_backups" : 0,
"timezone" : "UTC+01:00",
"destination_region" : "eu-nl",
"destination_project_id" : "fcf6cb26c3bf4402869792207ad3dce4"
},
"operation_type" : "replication",
"trigger" : {
"properties" : {
"pattern" : [ "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00" ]
}
}
}
}</pre>
</li></ul>
</div>
<div class="section" id="CreatePolicy__section83489974910"><h4 class="sectiontitle">Example Responses</h4><p id="CreatePolicy__p634899194915"><strong id="CreatePolicy__b534819944911">Status code: 200</strong></p>
<p id="CreatePolicy__p1134810994911">OK</p>
<ul id="CreatePolicy__ul18349169154917"><li id="CreatePolicy__li63491692495">The backup policy is created. The backup policy is to automatically perform backup at 14:00 everyday and save each backup for one day.<pre class="screen" id="CreatePolicy__screen93491897498">{
"policy" : {
"name" : "policy001",
"enabled" : true,
"trigger" : {
"properties" : {
"pattern" : [ "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00" ],
"start_time" : "2019-05-08T06:57:05.000+00:00"
},
"type" : "time",
"id" : "d67269a6-5369-42d7-8150-5254bd446328",
"name" : "default"
},
"operation_definition" : {
"retention_duration_days" : 1,
"year_backups" : 0,
"day_backups" : 0,
"month_backups" : 0,
"week_backups" : 0,
"timezone" : "UTC+01:00"
},
"operation_type" : "backup",
"id" : "cbb3ce6f-3332-4e7c-b98e-77290d8471ff"
}
}</pre>
</li><li id="CreatePolicy__li234910914919">The replication policy is created. The replication policy is to automatically replicate backups at 14:00 everyday and save each backup for one day.<pre class="screen" id="CreatePolicy__screen3349199134911">{
"policy" : {
"name" : "policy002",
"enabled" : true,
"trigger" : {
"id" : "b37cf79e-5cfa-4a84-99a3-91d60a314c46",
"name" : "default",
"type" : "time",
"properties" : {
"pattern" : [ "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00" ],
"start_time" : "2019-05-08T06:58:05.000+00:00"
}
},
"operation_definition" : {
"retention_duration_days" : 1,
"day_backups" : 0,
"week_backups" : 0,
"month_backups" : 0,
"year_backups" : 0,
"timezone" : "UTC+01:00",
"destination_region" : "eu-nl",
"destination_project_id" : "fcf6cb26c3bf4402869792207ad3dce4"
},
"operation_type" : "replication",
"id" : "e47e4916-481a-4d10-95a2-165bcfe598c5"
}
}</pre>
</li></ul>
</div>
<div class="section" id="CreatePolicy__section535059194920"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreatePolicy__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreatePolicy__row1410412904913"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreatePolicy__p53501920490">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreatePolicy__p14350139164915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreatePolicy__row81041099492"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreatePolicy__p1635015964919">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreatePolicy__p18350149204912">OK</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreatePolicy__section6350189154918"><h4 class="sectiontitle">Error Codes</h4><p id="CreatePolicy__p7350895498">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000003.html">Policies</a></div>
</div>
</div>