doc-exports/docs/config/api-ref/rms_04_0506.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

552 lines
37 KiB
HTML

<a name="rms_04_0506"></a><a name="rms_04_0506"></a>
<h1 class="topictitle1">Querying a Rule</h1>
<div id="body1579052184513"><div class="section" id="rms_04_0506__section1079017216459"><h4 class="sectiontitle">Function</h4><p id="rms_04_0506__p779052112459">This API is used to query a rule based on the rule ID.</p>
</div>
<div class="section" id="rms_04_0506__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p id="rms_04_0506__p67902212452">For details, see <a href="rms_03_0000.html">Calling APIs</a>.</p>
</div>
<div class="section" id="rms_04_0506__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="rms_04_0506__p6791122164517">GET /v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__table8792142154518" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="rms_04_0506__row879112116455"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="rms_04_0506__p10792921184520">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_0506__p1679382110455">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_0506__p1479342114458">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_0506__p117931521194512">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row1379112219459"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="rms_04_0506__p18794142110454">domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="rms_04_0506__p1079411217455">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="rms_04_0506__p379432111458">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="rms_04_0506__p15794202112454">Specifies tags.</p>
<p id="rms_04_0506__p5794021124518">Maximum: <strong id="rms_04_0506__b6795132194515">36</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row47921821194518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="rms_04_0506__p11795142110459">policy_assignment_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="rms_04_0506__p47956216454">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="rms_04_0506__p6795112124520">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="rms_04_0506__p107961721164520">Specifies the rule ID.</p>
<p id="rms_04_0506__p197961021104512">Maximum: <strong id="rms_04_0506__b177962218456">36</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0506__section19796182174515"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rms_04_0506__row11797421184510"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="rms_04_0506__p1779814219459">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_0506__p1798182124517">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_0506__p20798321104514">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_0506__p67987212456">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row12797421204513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rms_04_0506__p779915216452">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_0506__p1479962194519">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rms_04_0506__p1879992134512">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rms_04_0506__p1279910212457">Specifies the invoker's token.</p>
</td>
</tr>
<tr id="rms_04_0506__row27971921164519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rms_04_0506__p1379992184514">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_0506__p1480052111455">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rms_04_0506__p128001821204518">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rms_04_0506__p3800102114518">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_0506__section15800112194513"><h4 class="sectiontitle">Response Parameters</h4><p id="rms_04_0506__p1780132124518"><strong id="rms_04_0506__b2801112112459">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_PolicyAssignment" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0506__row108017211452"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="rms_04_0506__p1580562117453">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_0506__p178051321114512">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_0506__p38052218452">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row88011221184511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p8805421104512">policy_assignment_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p14805221164517">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p198062219452">Specifies the rule type, which can be <strong id="rms_04_0506__b880642174510">builtin</strong> or <strong id="rms_04_0506__b28061421134513">custom</strong>.</p>
</td>
</tr>
<tr id="rms_04_0506__row15801162124515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p0806112184513">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p480622118454">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p7806192111450">Specifies the rule ID.</p>
</td>
</tr>
<tr id="rms_04_0506__row48039214452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p48071216453">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p5807182118453">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p88084214456">Specifies the rule name.</p>
</td>
</tr>
<tr id="rms_04_0506__row480392112450"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p38091121194514">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p17809172184516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p580922184513">Specifies the rule description.</p>
</td>
</tr>
<tr id="rms_04_0506__row20803132116454"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p17809202114456">policy_filter</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p8809321184510"><a href="#rms_04_0506__response_PolicyFilterDefinition">PolicyFilterDefinition</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p0810721184514">Specifies the policy filter of a rule.</p>
</td>
</tr>
<tr id="rms_04_0506__row680342144510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p1381072120451">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p118101213452">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p9810122110456">Specifies how often the rule is triggered, which can be <strong id="rms_04_0506__b1281017212457">One_Hour</strong>, <strong id="rms_04_0506__b98103219454">Three_Hours</strong>, <strong id="rms_04_0506__b181162134516">Six_Hours</strong>, <strong id="rms_04_0506__b48111921134512">Twelve_Hours</strong>, or <strong id="rms_04_0506__b12811162112453">TwentyFour_Hours</strong>.</p>
</td>
</tr>
<tr id="rms_04_0506__row6803521104519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p181117219457">state</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p38111421114513">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p88111721174518">Specifies the rule status.</p>
</td>
</tr>
<tr id="rms_04_0506__row380432144518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p17811621114511">created</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p158128219451">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p14812021194516">Specifies the time when the rule was added.</p>
</td>
</tr>
<tr id="rms_04_0506__row13804192134516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p1281282113452">updated</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p8812122115454">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p9812102154520">Specifies the time when the rule was modified.</p>
</td>
</tr>
<tr id="rms_04_0506__row7804321204513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p18131321204517">policy_definition_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p18131921134516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p281322111451">Specifies the ID of the policy used by the rule.</p>
</td>
</tr>
<tr id="rms_04_0506__row8804112184512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p148135216455">custom_policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p108133218451"><a href="#rms_04_0506__response_CustomPolicy">CustomPolicy</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p5814132114510">Specifies the custom rule.</p>
</td>
</tr>
<tr id="rms_04_0506__row3804821114520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p128141021104512">parameters</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p481452114517">Map&lt;String,<a href="#rms_04_0506__response_PolicyParameterValue">PolicyParameterValue</a>&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p5814321194519">Specifies the rule parameters.</p>
</td>
</tr>
<tr id="rms_04_0506__row080422117451"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p1681517212451">tags</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p12815202154513">Array of <a href="#rms_04_0506__response_ResourceTag">ResourceTag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p1281572144520">Tags</p>
</td>
</tr>
<tr id="rms_04_0506__row1680452115451"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p78151921174511">created_by</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p15815162194510">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p181617216450">Specifies the person who created the rule.</p>
</td>
</tr>
<tr id="rms_04_0506__row0336154118256"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p17489723141214">target_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p2490162319124">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p3491723101217"><strong id="rms_04_0506__b14598352155015">traget_type</strong> is reserved for new features usage. In current version the result is null.</p>
</td>
</tr>
<tr id="rms_04_0506__row1233694117258"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rms_04_0506__p2493112361214">target_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rms_04_0506__p11494162319121">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rms_04_0506__p1549682371219"><strong id="rms_04_0506__b796105514502">target_id</strong> is reserved for new features usage. In current version the result is null.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0506__response_PolicyFilterDefinition"></a><a name="response_PolicyFilterDefinition"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_PolicyFilterDefinition" frame="border" border="1" rules="all"><caption><b>Table 4 </b>PolicyFilterDefinition</caption><thead align="left"><tr id="rms_04_0506__row14816172115456"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="rms_04_0506__p181711216456">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_0506__p18818182111455">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_0506__p48188213453">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row11816121184519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p5818162174520">region_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p0818021194519">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p108181421194513">Specifies the region ID.</p>
<p id="rms_04_0506__p11819192104516">Maximum: <strong id="rms_04_0506__b0819172116452">128</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row1481616217459"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p16819162124513">resource_provider</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p8819142144510">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p9819112115457">Specifies the cloud service name.</p>
<p id="rms_04_0506__p1581918216452">Maximum: <strong id="rms_04_0506__b11819172113458">128</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row13816142174516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p1282072194514">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p1182082164516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p148205217457">Specifies the resource type.</p>
<p id="rms_04_0506__p682082117453">Maximum: <strong id="rms_04_0506__b2820132124512">128</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row1817152164510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p14820112114454">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p4821121164517">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p1082112114518">Specifies the resource ID.</p>
<p id="rms_04_0506__p11821321124513">Maximum: <strong id="rms_04_0506__b4822102144514">512</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row28171021144519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p182210213451">tag_key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p08221321204516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p38231821184516">Specifies the tag key.</p>
<p id="rms_04_0506__p182302114518">Maximum: <strong id="rms_04_0506__b1782313217455">128</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row1681716210451"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rms_04_0506__p138231021114512">tag_value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rms_04_0506__p88247219458">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rms_04_0506__p2082442116456">Specifies the tag value.</p>
<p id="rms_04_0506__p1482452194516">Maximum: <strong id="rms_04_0506__b16824132134512">256</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0506__response_CustomPolicy"></a><a name="response_CustomPolicy"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_CustomPolicy" frame="border" border="1" rules="all"><caption><b>Table 5 </b>CustomPolicy</caption><thead align="left"><tr id="rms_04_0506__row148254216457"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="rms_04_0506__p12826182134513">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_0506__p7826142174510">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_0506__p108269213457">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row2082562184518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="rms_04_0506__p1827192164518">function_urn</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="rms_04_0506__p1182715219452">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="rms_04_0506__p1082710215451">Specifies the URN of a custom function.</p>
<p id="rms_04_0506__p18271121124514">Maximum: <strong id="rms_04_0506__b1282719218455">1024</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row9825182164518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="rms_04_0506__p6827172154511">auth_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="rms_04_0506__p11828182144516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="rms_04_0506__p182882104517">Specifies how <strong id="rms_04_0506__b782816211457">function</strong> is called by a custom rule.</p>
</td>
</tr>
<tr id="rms_04_0506__row382502117456"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="rms_04_0506__p12828172154512">auth_value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="rms_04_0506__p5828132134513">Map&lt;String,Object&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="rms_04_0506__p4829112164519">Specifies the parameter value for invoking a function by a custom rule.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__table3344101317252" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Parameter description of the example policy</caption><thead align="left"><tr id="rms_04_0506__row143451513132518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="rms_04_0506__p3190736143613">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_0506__p4190436183618">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_0506__p17190103618363">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row13345191382516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="rms_04_0506__p1862010082717">listOfAllowedFlavors</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="rms_04_0506__p63451413172514">Array</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="rms_04_0506__p20345113172514">Indicates the list of allowed ECS flavors. The value must be an array with up to 10 elements. Example ECS flavors are as follows: s6.small.1, s6.xlarge.2, m7.large.8, and t6.small.1. To get more details, see ECS documentation.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0506__response_PolicyParameterValue"></a><a name="response_PolicyParameterValue"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_PolicyParameterValue" frame="border" border="1" rules="all"><caption><b>Table 7 </b>PolicyParameterValue</caption><thead align="left"><tr id="rms_04_0506__row1382922117451"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p id="rms_04_0506__p1830162119453">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p id="rms_04_0506__p8830521124516">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p id="rms_04_0506__p183082115451">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row10829182134517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="rms_04_0506__p5830921104510">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="rms_04_0506__p98311214455">Object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="rms_04_0506__p13831721154512">Specifies the value of the rule parameter.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rms_04_0506__response_ResourceTag"></a><a name="response_ResourceTag"></a><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_ResourceTag" frame="border" border="1" rules="all"><caption><b>Table 8 </b>ResourceTag</caption><thead align="left"><tr id="rms_04_0506__row1183115210453"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="rms_04_0506__p3832021104512">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_0506__p118321521114519">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_0506__p18833132118455">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row12832821184519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="rms_04_0506__p78335211459">key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="rms_04_0506__p883317214452">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="rms_04_0506__p148331221154517">Tag key. A tag key can contain up to 128 Unicode characters and must complay with the character set specifications in section 3.1.</p>
<p id="rms_04_0506__p11833321114511">Minimum: <strong id="rms_04_0506__b15834172112451">1</strong></p>
<p id="rms_04_0506__p28344211457">Maximum: <strong id="rms_04_0506__b20834152117453">128</strong></p>
</td>
</tr>
<tr id="rms_04_0506__row13832142114516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="rms_04_0506__p983432111459">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="rms_04_0506__p683412119451">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="rms_04_0506__p1683515216455">Tag value. A tag value can contain up to 255 Unicode characters and must comply with the character set specifications in section 3.2.</p>
<p id="rms_04_0506__p283518210453">Minimum: <strong id="rms_04_0506__b11835421194512">0</strong></p>
<p id="rms_04_0506__p19835921134513">Maximum: <strong id="rms_04_0506__b883514215458">255</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0506__p19835121114517"><strong id="rms_04_0506__b10835162119452">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_ErrorResp" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0506__row3836621134516"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.4.1.1"><p id="rms_04_0506__p18839921154515">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_0506__p1840162111454">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_0506__p13840162184517">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row583662116451"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="rms_04_0506__p78404213454">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="rms_04_0506__p10840152115459">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="rms_04_0506__p18412219458">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0506__row983914212455"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.1 "><p id="rms_04_0506__p18841152194511">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.4.1.2 "><p id="rms_04_0506__p108411121134515">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.10.2.4.1.3 "><p id="rms_04_0506__p8841112119456">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0506__p1884222118454"><strong id="rms_04_0506__b2842821104516">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_ErrorResp_1" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0506__row1084210215452"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.12.2.4.1.1"><p id="rms_04_0506__p16843221114516">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_0506__p6843182154519">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_0506__p084382112456">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row12842112117452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="rms_04_0506__p5844021154510">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="rms_04_0506__p9844221174516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="rms_04_0506__p1844621174511">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0506__row158428213450"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.1 "><p id="rms_04_0506__p984412210453">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.12.2.4.1.2 "><p id="rms_04_0506__p168441621194516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.12.2.4.1.3 "><p id="rms_04_0506__p1084542114453">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0506__p19845192104517"><strong id="rms_04_0506__b1084562184518">Status code: 404</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_ErrorResp_2" frame="border" border="1" rules="all"><caption><b>Table 11 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0506__row184512164510"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.14.2.4.1.1"><p id="rms_04_0506__p1484616216458">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_0506__p1846221154514">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_0506__p784642154513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row584514212452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="rms_04_0506__p1284712214459">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="rms_04_0506__p12847142194516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="rms_04_0506__p3847221104513">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0506__row1284582110459"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.1 "><p id="rms_04_0506__p984792174520">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.14.2.4.1.2 "><p id="rms_04_0506__p15848182112457">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.14.2.4.1.3 "><p id="rms_04_0506__p1284814214457">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="rms_04_0506__p0848152116459"><strong id="rms_04_0506__b15848112124519">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__response_ErrorResp_3" frame="border" border="1" rules="all"><caption><b>Table 12 </b>Response body parameters</caption><thead align="left"><tr id="rms_04_0506__row2848172118457"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.16.2.4.1.1"><p id="rms_04_0506__p19849122194515">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.16.2.4.1.2"><p id="rms_04_0506__p88491921194514">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.16.2.4.1.3"><p id="rms_04_0506__p58501321154519">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row78491021144511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.16.2.4.1.1 "><p id="rms_04_0506__p385018219453">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.16.2.4.1.2 "><p id="rms_04_0506__p18850192124515">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.16.2.4.1.3 "><p id="rms_04_0506__p5850112144519">Specifies the error code.</p>
</td>
</tr>
<tr id="rms_04_0506__row88494218452"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.16.2.4.1.1 "><p id="rms_04_0506__p1785192113451">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.16.2.4.1.2 "><p id="rms_04_0506__p3969152154513">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.16.2.4.1.3 "><p id="rms_04_0506__p6969182119454">Specifies the error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0506__section20969162118453"><h4 class="sectiontitle">Example Requests</h4><p id="rms_04_0506__p1496922117451">None</p>
</div>
<div class="section" id="rms_04_0506__section179691221124510"><h4 class="sectiontitle">Example Responses</h4><p id="rms_04_0506__p129692217458"><strong id="rms_04_0506__b129691621114517">Status code: 200</strong></p>
<p id="rms_04_0506__p1096912119458">Operation succeeded.</p>
<pre class="screen" id="rms_04_0506__screen20481476344">{
"policy_assignment_type": "builtin",
"id": "6672d83777c56f4aeb50b892",
"name": "allowed-ecs-flavorss3",
"description": "An ECS is noncompliant if its flavor is not in the specified flavor list TEST.",
"policy_filter": {
"region_id": null,
"resource_provider": "ecs",
"resource_type": "cloudservers",
"resource_id": null,
"tag_key": null,
"tag_value": null
},
"period": null,
"state": "Enabled",
"created": "2024-06-19T13:08:07.771Z",
"updated": "2024-07-08T10:25:40.816Z",
"policy_definition_id": "5f8d549bffeecc14f1fb522a",
"custom_policy": null,
"parameters": {
"listOfAllowedFlavors": {
"value": []
}
},
"tags": [],
"created_by": "custom",
"target_type": null,
"target_id": null
}</pre>
</div>
<div class="section" id="rms_04_0506__section129721211456"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rms_04_0506__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="rms_04_0506__row4871192117456"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="rms_04_0506__p4972192164514">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_0506__p1597242113454">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rms_04_0506__row188721216457"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0506__p8973142174511">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0506__p19731721114519">Operation succeeded.</p>
</td>
</tr>
<tr id="rms_04_0506__row1872421134518"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0506__p199737210453">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0506__p149734212456">Invalid parameters.</p>
</td>
</tr>
<tr id="rms_04_0506__row1487222164519"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0506__p49731821104513">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0506__p17973202184511">Authentication failed or you do not have the operation permissions.</p>
</td>
</tr>
<tr id="rms_04_0506__row187252184512"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0506__p29731321114511">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0506__p139731021154514">No rules found.</p>
</td>
</tr>
<tr id="rms_04_0506__row8872192110457"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="rms_04_0506__p1497392113453">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="rms_04_0506__p1197382113453">Server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rms_04_0506__section7973721144519"><h4 class="sectiontitle">Error Codes</h4><p id="rms_04_0506__p797362104513">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>