doc-exports/docs/config/api-ref/rms_04_0502.html
Wei, Hongmin da6ca4fb3c Config API First Version
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2024-08-22 10:49:27 +00:00

547 lines
35 KiB
HTML

<a name="rms_04_0502"></a><a name="rms_04_0502"></a>
<h1 class="topictitle1">Querying a Built-in Policy</h1>
<div id="body07191081363"><div class="section" id="rms_04_0502__section1272019810619"><h4 class="sectiontitle">Function</h4><p id="rms_04_0502__p157231083618">This API is used to query a built-in policy based on the policy ID.</p>
</div>
<div class="section" id="rms_04_0502__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p id="rms_04_0502__p7731381361">For details, see <a href="rms_03_0000.html">Calling APIs</a>.</p>
</div>
<div class="section" id="rms_04_0502__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="rms_04_0502__p573618812617">GET /v1/resource-manager/policy-definitions/{policy_definition_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__table1274417818615" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="rms_04_0502__row27391184619"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="rms_04_0502__p3745081564">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="rms_04_0502__p1574712815619">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="rms_04_0502__p1875018667">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="rms_04_0502__p875288664">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row974028363"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="rms_04_0502__p175498566">policy_definition_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="rms_04_0502__p4757381564">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="rms_04_0502__p107611181463">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="rms_04_0502__p5764285616">Specifies the policy ID.</p>
<p id="rms_04_0502__p376617817617">Maximum: <strong id="rms_04_0502__b10767128664">36</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0502__section27693820618"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rms_04_0502__row77731081067"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="rms_04_0502__p18777208266">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="rms_04_0502__p5779178967">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="rms_04_0502__p078278466">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="rms_04_0502__p27847811612">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row137731481662"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rms_04_0502__p4786148369">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rms_04_0502__p77901881162">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rms_04_0502__p15792184618">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rms_04_0502__p107951181763">Specifies the invoker's token.</p>
</td>
</tr>
<tr id="rms_04_0502__row0773128962"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rms_04_0502__p17797481967">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rms_04_0502__p1779918815613">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rms_04_0502__p380248963">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rms_04_0502__p8217721115915">Language of the returned message.</p>
<p id="rms_04_0502__p834520331955">Default: <strong id="rms_04_0502__b1943184110512">en-us</strong></p>
</td>
</tr>
<tr id="rms_04_0502__row147731481768"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rms_04_0502__p18127811613">X-Security-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rms_04_0502__p138143819614">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rms_04_0502__p12816138669">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rms_04_0502__p11819158463">Security token (session token) for temporary security credentials. This parameter is mandatory when you make an API call using temporary security credentials.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0502__section16824181560"><h4 class="sectiontitle">Response Parameters</h4><p id="rms_04_0502__p28271383612"><strong id="rms_04_0502__b382818562">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_PolicyDefinition" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0502__row98291081267"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="rms_04_0502__p148357812614">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="rms_04_0502__p6838486616">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="rms_04_0502__p10840981661">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row58306811611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p884219814618">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p1184638161">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p98481481865">Specifies the policy ID.</p>
</td>
</tr>
<tr id="rms_04_0502__row38302812612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p1851481462">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p138549816618">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p58570819619">Specifies the policy name.</p>
</td>
</tr>
<tr id="rms_04_0502__row9830128266"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p98591810618">display_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p17862881763">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p1286417812610">Specifies the policy display name.</p>
</td>
</tr>
<tr id="rms_04_0502__row0830881611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p0867178567">policy_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p98701481767">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p13873787617">Specifies the policy type.</p>
</td>
</tr>
<tr id="rms_04_0502__row5830281360"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p1087513812615">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p128771781561">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p18802820618">Specifies the description of the policy definition.</p>
</td>
</tr>
<tr id="rms_04_0502__row158301081864"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p38841581611">policy_rule_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p178871681361">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p2889208864">Specifies the syntax type of the policy.</p>
</td>
</tr>
<tr id="rms_04_0502__row783068465"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p88920812612">policy_rule</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p98951187616">Object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p98971813614">Specifies the policy rule.</p>
</td>
</tr>
<tr id="rms_04_0502__row38302081965"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p4901289614">trigger_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p199031281064">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p12906488620">Specifies the trigger type. The value can be <strong id="rms_04_0502__b1780014512481">resource</strong> or <strong id="rms_04_0502__b1480075194817">period</strong>.</p>
</td>
</tr>
<tr id="rms_04_0502__row88303819620"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p4908081764">keywords</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p109101281266">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p891338664">Specifies keywords.</p>
</td>
</tr>
<tr id="rms_04_0502__row12831581618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p179161183617">default_resource_types</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p99191181163">Array of <a href="#rms_04_0502__response_default_resource_types">default_resource_types</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p189221987610">Specifies the list of default resource types.</p>
</td>
</tr>
<tr id="rms_04_0502__row138316818612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0502__p11924988611">parameters</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0502__p49281181461">Map&lt;String,<a href="#rms_04_0502__response_PolicyParameterDefinition">PolicyParameterDefinition</a>&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0502__p493113810618">Specifies the policy parameter.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0502__response_default_resource_types"></a><a name="response_default_resource_types"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_default_resource_types" frame="border" border="1" rules="all"><caption><b>Table 4 </b>default_resource_types</caption><thead align="left"><tr id="rms_04_0502__row4934781869"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="rms_04_0502__p49381781668">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="rms_04_0502__p59401283614">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="rms_04_0502__p1194317811614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row39346816620"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0502__p109460811612">provider</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0502__p209481987612">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0502__p795110817614">Specifies the cloud service name.</p>
</td>
</tr>
<tr id="rms_04_0502__row39341181162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0502__p595378368">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0502__p195618261">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0502__p15958286620">Specifies the resource type.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__table3344101317252" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter description of the example policy</caption><thead align="left"><tr id="rms_04_0502__row143451513132518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="rms_04_0502__p11470144413816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="rms_04_0502__p184701044163810">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="rms_04_0502__p74706448385">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row13345191382516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="rms_04_0502__p1862010082717">specifiedTagKey</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="rms_04_0502__p63451413172514">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="rms_04_0502__p20345113172514">Indicates the tag key.</p>
</td>
</tr>
<tr id="rms_04_0502__row1934561332518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="rms_04_0502__p3345141318250">specifiedTagValue</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="rms_04_0502__p153468139250">Array</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="rms_04_0502__p8346913132512">Indicates tag values. If the value list is left empty, all values are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0502__response_PolicyParameterDefinition"></a><a name="response_PolicyParameterDefinition"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_PolicyParameterDefinition" frame="border" border="1" rules="all"><caption><b>Table 6 </b>PolicyParameterDefinition</caption><thead align="left"><tr id="rms_04_0502__row14961181166"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="rms_04_0502__p2096712820616">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="rms_04_0502__p297014817618">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="rms_04_0502__p7972118463">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row7961138269"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p797420811615">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p19977981062">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p1098016813619">Specifies the name of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row209621182613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p1898348464">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p1898518361">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p09871281611">Specifies the description of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row1596288963"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p7990882617">allowed_values</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p1599318760">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p1999519812618">Specifies the allowed values of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row209621285616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p1399818867">default_value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p8110914618">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p10313915611">Specifies the default value of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row179628818612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p116895616">minimum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p5811918615">Float</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p191117918615">Specifies the minimum value of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row49621881968"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p914498614">maximum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p20166910618">Float</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p181919920618">Specifies the maximum value of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row139621283610"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p14221593612">min_items</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p182416916611">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p727991465">Specifies the minimum number of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row7962888614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p1629119966">max_items</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p14321095615">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p7351694620">Specifies the maximum number of the policy parameter.</p>
</td>
</tr>
<tr id="rms_04_0502__row4962148761"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p938697610">min_length</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p19411494619">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p19445911614">Specifies the minimum string length for policy parameters or for each item.</p>
</td>
</tr>
<tr id="rms_04_0502__row496358563"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p15461396619">max_length</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p7497910616">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p18511493614">Specifies the maximum string length for policy parameters or for each item.</p>
</td>
</tr>
<tr id="rms_04_0502__row129638817618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p45413913614">pattern</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p105617918615">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p17588914618">Specifies the pattern for policy parameters or for each item.</p>
</td>
</tr>
<tr id="rms_04_0502__row19963785614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0502__p1161391614">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0502__p1063394613">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0502__p46618915616">Specifies the type of the policy parameter.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0502__p15681912613"><strong id="rms_04_0502__b769492620">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_ErrorResp" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0502__row1871691861"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="rms_04_0502__p127599269">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p id="rms_04_0502__p1578991612">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p id="rms_04_0502__p1811298612">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row27117916619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="rms_04_0502__p58312914613">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="rms_04_0502__p1186891669">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="rms_04_0502__p178911917610">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0502__row371391064"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="rms_04_0502__p15917910617">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="rms_04_0502__p15948915612">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="rms_04_0502__p49659467">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0502__p189814917619"><strong id="rms_04_0502__b1699109463">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_ErrorResp_1" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0502__row61071698610"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.4.1.1"><p id="rms_04_0502__p18111899613">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.4.1.2"><p id="rms_04_0502__p2011315911612">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.10.2.4.1.3"><p id="rms_04_0502__p181161199619">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row141071891464"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="rms_04_0502__p91184911614">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="rms_04_0502__p81201891063">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="rms_04_0502__p161231291566">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0502__row6107891962"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="rms_04_0502__p5125696611">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="rms_04_0502__p61281893617">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="rms_04_0502__p121301799618">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0502__p41326918617"><strong id="rms_04_0502__b12134591269">Status code: 404</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_ErrorResp_2" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0502__row5135391466"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.12.2.4.1.1"><p id="rms_04_0502__p91395913611">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.12.2.4.1.2"><p id="rms_04_0502__p12141391268">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.12.2.4.1.3"><p id="rms_04_0502__p15143109068">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row17135396617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="rms_04_0502__p614649760">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="rms_04_0502__p81487914615">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="rms_04_0502__p71523917618">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0502__row13135791864"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="rms_04_0502__p515579762">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="rms_04_0502__p1415713914617">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="rms_04_0502__p8160491663">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0502__p141631291064"><strong id="rms_04_0502__b10164694610">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__response_ErrorResp_3" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0502__row1916519167"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.14.2.4.1.1"><p id="rms_04_0502__p101700916613">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.14.2.4.1.2"><p id="rms_04_0502__p171724919620">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.14.2.4.1.3"><p id="rms_04_0502__p817512912615">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row1216611911611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="rms_04_0502__p131776910617">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="rms_04_0502__p151811791866">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="rms_04_0502__p111841591262">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0502__row216629763"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="rms_04_0502__p2186892065">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="rms_04_0502__p151889913619">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="rms_04_0502__p1219110916612">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0502__section4193391865"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="rms_04_0502__screen13197493611">GET https://{endpoint}/v1/resource-manager/policy-definitions/5f8d5428ffeecc14f1fb5205</pre>
</div>
<div class="section" id="rms_04_0502__section6201191612"><h4 class="sectiontitle">Example Responses</h4><p id="rms_04_0502__p5203697612"><strong id="rms_04_0502__b920409867">Status code: 200</strong></p>
<p id="rms_04_0502__p11205109661">Operation succeeded.</p>
<pre class="screen" id="rms_04_0502__screen12996236185714">{
"id": "5fa9f89b6eed194ccb2c04db",
"name": "required-tag-check",
"display_name": "required-tag-check",
"policy_type": "builtin",
"description": "If a resource is not attached with the specified tag, this resource is considered noncompliant.",
"policy_rule_type": "dsl",
"policy_rule": {
"anyOf": [
{
"value": "${contains(resource().tags, parameters('specifiedTagKey'))}",
"comparator": "equals",
"pattern": false
},
{
"allOf": [
{
"value": "${length(parameters('specifiedTagValue'))}",
"comparator": "greater",
"pattern": 0
},
{
"value": "${getValue(resource().tags, parameters('specifiedTagKey'))}",
"comparator": "notIn",
"pattern": "${parameters('specifiedTagValue')}"
}
]
}
]
},
"trigger_type": "resource",
"keywords": [
"tag"
],
"default_resource_types": [],
"parameters": {
"specifiedTagKey": {
"name": null,
"description": "The specified tag key.",
"allowed_values": null,
"default_value": null,
"minimum": null,
"maximum": null,
"min_items": null,
"max_items": null,
"min_length": 1,
"max_length": 128,
"pattern": null,
"type": "String"
},
"specifiedTagValue": {
"name": null,
"description": "The list of allowed tag value, permit all if empty.",
"allowed_values": null,
"default_value": null,
"minimum": null,
"maximum": null,
"min_items": 0,
"max_items": 40,
"min_length": 0,
"max_length": 255,
"pattern": null,
"type": "Array"
}
}
}</pre>
<div class="note" id="rms_04_0502__note986410613418"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rms_04_0502__p109671231582"><strong id="rms_04_0502__b5453174593218">allOf</strong> and <strong id="rms_04_0502__b1422718487326">anyOf</strong> in the response example are logical operators. The following describes these two operators in detail:</p>
<p id="rms_04_0502__p2771418332"><strong id="rms_04_0502__b970191414336">allOf</strong> evaluates true only if all included conditions are true, and evaluates false as long as one included condition is false.</p>
<p id="rms_04_0502__p1278174183315"><strong id="rms_04_0502__b1280641643310">anyOf</strong> evaluates true as long as one included condition is true, and evaluates false if all included conditions are false.</p>
<p id="rms_04_0502__p1786414336"><strong id="rms_04_0502__b13304102193319">allOf</strong> and <strong id="rms_04_0502__b588482519333">anyOf</strong> both implement short-circuit evaluation. They evaluate the conditions in the subsequent list in sequence.</p>
<p id="rms_04_0502__p157810419336">If the return result of a condition is false, <strong id="rms_04_0502__b587023463318">allOf</strong> returns false and the subsequent conditions are not calculated.</p>
<p id="rms_04_0502__p14784423313">If the return result of a condition is true, <strong id="rms_04_0502__b763173733319">anyOf</strong> returns true and the subsequent conditions are not calculated.</p>
</div></div>
</div>
<div class="section" id="rms_04_0502__section111721219668"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0502__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="rms_04_0502__row12430492068"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="rms_04_0502__p1717411193615">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="rms_04_0502__p1517551912610">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0502__row114308919618"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0502__p71768197619">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0502__p41784191560">Operation succeeded.</p>
</td>
</tr>
<tr id="rms_04_0502__row114319917614"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0502__p817921910618">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0502__p8180919766">Invalid parameters.</p>
</td>
</tr>
<tr id="rms_04_0502__row1043169160"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0502__p918218191611">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0502__p1918316196619">Authentication failed or you do not have the operation permissions.</p>
</td>
</tr>
<tr id="rms_04_0502__row1343117920615"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0502__p1218410192060">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0502__p61857191762">Policy not found.</p>
</td>
</tr>
<tr id="rms_04_0502__row184311191261"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0502__p01865191869">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0502__p01876191766">Server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0502__section1518816198613"><h4 class="sectiontitle">Error Codes</h4><p id="rms_04_0502__p5190619568">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rms_04_0500.html">Compliance</a></div>
</div>
</div>