Files
doc-exports/docs/ces/api-ref/CreateAlarmRules.html
qiujiandong1 e9265fb6b0 CES API Update -20250521 version
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-12-05 10:48:24 +00:00

676 lines
72 KiB
HTML

<a name="CreateAlarmRules"></a><a name="CreateAlarmRules"></a>
<h1 class="topictitle1">Creating an Alarm Rule (Recommended)</h1>
<div id="body8662426"><div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section14290831144418"><h4 class="sectiontitle">Function</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1329013315449">This API is used to create an alarm rule (recommended).</p>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section6290123116449"><h4 class="sectiontitle">URI</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p16290143184413">POST /v2/{project_id}/alarms</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_table42911131184414" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row8290123164410"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p3291163134417">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p329193184417">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p102912031124414">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p029103119441">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row12906311440"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p15291131134413">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12911831114410">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p829123117449">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateAlarmRules__p42316702175455">Project ID.</p>
<p id="CreateAlarmRules__p191415137612">For details about how to obtain the project ID, see <a href="ces_03_0057.html">Obtaining a Project ID</a>.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899046_p18100524114814">Minimum: <strong id="CreateAlarmRules__b79242580043844">1</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899046_p81001524104817">Maximum: <strong id="CreateAlarmRules__b142919633213">64</strong></p>
<p id="CreateAlarmRules__p4697184133915"><strong id="CreateAlarmRules__b80880711625054">Regular expression matching</strong>: ^[a-zA-Z0-9-]{1,64}$</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section929114316449"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row19292931194420"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p192921831144416">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2292133164410">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p42921531164417">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p20292531134411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1029216318442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p13292183117444">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p5292103118445">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p11292103113443">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p029315313446">MIME type of the request body.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p629373124413">Default: <strong id="CreateAlarmRules__b47244386952924">application/json; charset=UTF-8</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p72932031164415">Minimum: <strong id="CreateAlarmRules__b162907292343844">1</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p129383144412">Maximum: <strong id="CreateAlarmRules__b194338653215">64</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1629253119448"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p3293331134413">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1029363115441">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p11293031174412">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateAlarmRules__p24785814494">User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of <strong id="CreateAlarmRules__b5130194418384">X-Subject-Token</strong> in the response header is the token.</p>
<p id="CreateAlarmRules__p11471958134918">Minimum: <strong id="CreateAlarmRules__b1345604517401">1</strong></p>
<p id="CreateAlarmRules__p847058194912">Maximum: <strong id="CreateAlarmRules__b53751588802011">16384</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_request_PostAlarmsReqV2" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row162941931194420"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1295103110446">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.97%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p18295173144419">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.03%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p16295103144417">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p152958311442">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row729418319445"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p72955312442">name</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p16295113115445">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p8295153134418">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p182956312449">Name of an alarm rule. The name allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-).</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row029483134413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p102951931194411">description</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p229693111441">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2029673110441">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p7296133134414">Alarm rule description. The value can contain 0 to 256 characters.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row82941831154413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12296103118445">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p112969314446">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p202966315446">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__p11862543114814">Namespace of a service. For details about the namespace of each service, see <a href="ces_03_0059.html">Service Namespaces</a>. The namespace must be in the service.item format and contain 3 to 32 characters. The values of <strong id="CreateAlarmRules__b674775202319">service</strong> and <strong id="CreateAlarmRules__b2074735216238">item</strong> must start with a letter and can only contain letters, digits, and underscores (_).</p>
<p id="CreateAlarmRules__p1786284394811">Minimum: <strong id="CreateAlarmRules__b116653146981638">3</strong></p>
<p id="CreateAlarmRules__p1186264311481">Maximum: <strong id="CreateAlarmRules__b2134026227826">32</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1529414315440"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p72961831174410">resource_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p729612319447">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p92968312448">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p132962031114411">Resource group ID. This parameter is mandatory when the monitoring scope is set to <strong id="CreateAlarmRules__b789542611245">Resource groups</strong>.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row16294183111443"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p729693144415">resources</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p172969319446">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__p11436910203613">Array of arrays of <a href="#CreateAlarmRules__en-us_topic_0000001646899038_request_Dimension">Dimension</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p529683194414">Resource list. If an alarm rule is created for all resources or resources in a resource group, leave the resource dimension blank. If the alarm rule is created for specified resources, the resource dimension value is mandatory, and you can specify multiple resources to be monitored at a time.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p029753194417">Array length: <strong id="CreateAlarmRules__b1015453694520">0</strong> to <strong id="CreateAlarmRules__b56313234794520">1000</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row2294193117441"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p112977317446">policies</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p529783104411">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1829733114445">Array of <a href="#CreateAlarmRules__en-us_topic_0000001646899038_request_Policy">Policy</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p162974316441">Alarm policies.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p0297103184416">Array length: <strong id="CreateAlarmRules__b19489652555053">1</strong> to <strong id="CreateAlarmRules__b174486264755053">50</strong></p>
<div class="note" id="CreateAlarmRules__note736312812179"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="CreateAlarmRules__p1536319812170">Either <strong id="CreateAlarmRules__b128001251121316">policies</strong> or <strong id="CreateAlarmRules__b98007510138">alarm_template_id</strong> must be set. If both are specified, the policy in the alarm template is used.</p>
</div></div>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row172948314448"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p129703110441">type</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2297103116449">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1729710316441">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__p1648194914812">Alarm rule type.</p>
<p id="CreateAlarmRules__p37761959584">The value can be:</p>
<ul id="CreateAlarmRules__ul6181217895"><li id="CreateAlarmRules__li1667820207919"><strong id="CreateAlarmRules__b123889519462">ALL_INSTANCE</strong>: alarms for all resources</li><li id="CreateAlarmRules__li66016281493"><strong id="CreateAlarmRules__b95311858184617">RESOURCE_GROUP</strong>: alarms for resource groups</li><li id="CreateAlarmRules__li127412328914"><strong id="CreateAlarmRules__b1180514619476">MULTI_INSTANCE</strong>: alarms for specified resources</li><li id="CreateAlarmRules__li18230113719913"><strong id="CreateAlarmRules__b120338355434543">EVENT.SYS</strong>: system event alarms</li><li id="CreateAlarmRules__li165620401794"><strong id="CreateAlarmRules__b58251625151116">EVENT.CUSTOM</strong>: custom event alarms</li></ul>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row11294431174419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1829813134418">alarm_notifications</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2298183174418">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10298163119445">Array of <a href="#CreateAlarmRules__en-us_topic_0000001646899038_request_Notification">Notification</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p629814312448">Action to be triggered by the alarm. Array length: <strong id="CreateAlarmRules__b180526483635235">0</strong> to <strong id="CreateAlarmRules__b111833961535235">10</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1729443184414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p72982312444">ok_notifications</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p0298153184412">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p22983319448">Array of <a href="#CreateAlarmRules__en-us_topic_0000001646899038_request_Notification">Notification</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p132981931134414">Action to be triggered after an alarm is cleared. Array length: <strong id="CreateAlarmRules__b146485424735235">0</strong> to <strong id="CreateAlarmRules__b108586357935235">10</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row18294113118448"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p929823112443">notification_begin_time</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p52981231194410">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12981631154418">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p329993184415">Time when the alarm notification was enabled. Example: <strong id="CreateAlarmRules__b4417234123719">12:00</strong></p>
<p id="CreateAlarmRules__p02672135119">Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row429413110445"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1529943184417">notification_end_time</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2299193110441">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p13299183184411">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10299131194411">Time when the alarm notification was disabled. Example: <strong id="CreateAlarmRules__b136149398384">12:00</strong></p>
<p id="CreateAlarmRules__p246544715516">Regular expression matching: ^([1][0-9]|2[0-3]):([0-5][0-9])$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1329412315443"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p929973104413">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p73001831164411">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2300931164417">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1930018315446">Enterprise project ID. The value allows 36 characters. It can only contain lowercase letters, hyphens (-), and underscores (_). You can customize an enterprise project ID. The value can also be <strong id="CreateAlarmRules__b85049782745145">0</strong> (default enterprise project ID).</p>
<p id="CreateAlarmRules__p148091023185216">Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row172944312444"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p13000316449">enabled</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1630143114415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10301331144419">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12301193112449">Whether to generate alarms when the alarm triggering conditions are met.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row10294203110449"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10301831154415">notification_enabled</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p130133174420">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1430173134410">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p830163114449">Whether to enable alarm notification.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row112941631144417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1930183174410">alarm_template_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p18301431134416">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p163011631104419">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12301173116445">ID of an alarm template associated with an alarm rule. If this parameter is specified, the policy associated with the alarm rule changes accordingly with the alarm template policy.</p>
<p id="CreateAlarmRules__en-us_topic_0000001822039557_p4953936125110">Minimum: <strong id="CreateAlarmRules__b156883385374745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001822039557_p149531036155118">Maximum: <strong id="CreateAlarmRules__b141851119323">64</strong></p>
<p id="CreateAlarmRules__p156258181351"><strong id="CreateAlarmRules__b1448312456548">Regular expression matching:</strong> ^at([0-9A-Za-z]){0,62}$</p>
<div class="note" id="CreateAlarmRules__note315144831919"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="CreateAlarmRules__p1535135561913">Either <strong id="CreateAlarmRules__b163293169131">policies</strong> or <strong id="CreateAlarmRules__b15329416111317">alarm_template_id</strong> must be set. If both are specified, the policy in the alarm template is used.</p>
</div></div>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row12295143164419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p33011731154416">tags</p>
</td>
<td class="cellrowborder" valign="top" width="19.97%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1630193110444">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p113011631104416">Array of <a href="#CreateAlarmRules__en-us_topic_0000001646899038_request_ResourceTag">ResourceTag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p7302231144410">Tenant tags.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p030213116448">Array length: <strong id="CreateAlarmRules__b137073593175954">0</strong> to <strong id="CreateAlarmRules__b21099591875954">20</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateAlarmRules__en-us_topic_0000001646899038_request_Dimension"></a><a name="en-us_topic_0000001646899038_request_Dimension"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_request_Dimension" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Dimension</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row5302173116448"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10302113119447">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p43022031184413">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p0302133114415">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p15302831144410">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row16302931174411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p63021731204418">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p15303113194419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p430333110441">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p183038316449">Dimension of a resource. For example, the dimension of an ECS can be <strong id="CreateAlarmRules__b163494669994543">instance_id</strong>. A maximum of four dimensions are supported. For the metric dimension of each resource, see <a href="ces_03_0059.html">Service Metric Dimensions</a>.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p143039314441"><strong id="CreateAlarmRules__b16939957842949">Regular expression matching:</strong> ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row230243144419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p830313314449">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p123033316443">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p230314312441">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p5303173115440">Resource dimension value, which is an instance ID, for example, <strong id="CreateAlarmRules__b19956728839465">4270ff17-aba3-4138-89fa-820594c39755</strong>.</p>
<p id="CreateAlarmRules__p1920131712316"><strong id="CreateAlarmRules__b9513324855222">Regular expression matching</strong>:</p>
<pre class="codeblock" id="CreateAlarmRules__codeblock1229215232232">^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateAlarmRules__en-us_topic_0000001646899038_request_Policy"></a><a name="en-us_topic_0000001646899038_request_Policy"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_request_Policy" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Policy</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row8303113134418"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1330403120449">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p130453110442">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p73041931204416">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p17304231154420">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row130320313447"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p17304331104418">metric_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2304113115445">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1930533119445">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p330593104412">Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, <strong id="CreateAlarmRules__b125733177952530">cpu_util</strong> of an ECS indicates the CPU usage of the ECS. <strong id="CreateAlarmRules__b137809357252530">mongo001_command_ps</strong> in DDS indicates the command execution frequency. For details about the metric name of each service, see <a href="ces_03_0059.html">Service Metric Names</a>.</p>
<p id="CreateAlarmRules__p11245355111017"><strong id="CreateAlarmRules__b145347971115">Regular expression matching:</strong> ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1930413318441"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p13305631144417">period</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1230533174411">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1305183115445">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p930543110448">Monitoring period of a metric, in seconds. The default value is <strong id="CreateAlarmRules__b146622465353951">0</strong>. For an event alarm, set this parameter to <strong id="CreateAlarmRules__b59277189653951">0</strong>. <strong id="CreateAlarmRules__b121631970153951">1</strong> indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see <a href="ces_03_0059.html">Services Interconnected with Cloud Eye</a>. <strong id="CreateAlarmRules__b204394950853951">300</strong> indicates that the metric aggregation period is 5 minutes.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1130518319448">Minimum: <strong id="CreateAlarmRules__b1215141814408">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p18305831144414">Maximum: <strong id="CreateAlarmRules__b16861822185817">86400</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p630533112447">The value can be:</p>
<ul id="CreateAlarmRules__en-us_topic_0000001646899038_ul193055311443"><li id="CreateAlarmRules__en-us_topic_0000001646899038_li1630553114417"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1830583194414"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li1630553114417"></a><a name="en-us_topic_0000001646899038_li1630553114417"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b1530523110442">0</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li11305173174419"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p630513184414"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li11305173174419"></a><a name="en-us_topic_0000001646899038_li11305173174419"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b16305163184420">1</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li7305103144415"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1630523144414"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li7305103144415"></a><a name="en-us_topic_0000001646899038_li7305103144415"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b3305103124410">300</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li1930543184418"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p23055310449"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li1930543184418"></a><a name="en-us_topic_0000001646899038_li1930543184418"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b10305731154416">1200</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li1530514314444"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p930512318441"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li1530514314444"></a><a name="en-us_topic_0000001646899038_li1530514314444"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b1130513312445">3600</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li33052317447"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p163061531174413"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li33052317447"></a><a name="en-us_topic_0000001646899038_li33052317447"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b12306153114419">14400</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li7306113144418"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p183066316449"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li7306113144418"></a><a name="en-us_topic_0000001646899038_li7306113144418"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b12306131124411">86400</strong></p>
</li></ul>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1930433184416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p130673184410">filter</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p9306531174412">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p173065312444">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__p19461631174712">Data aggregation method. The value can be:</p>
<ul id="CreateAlarmRules__ul16946431154710"><li id="CreateAlarmRules__li1694673118479"><strong id="CreateAlarmRules__b104321390723318">average</strong>: average value of metric data within an aggregation period.</li><li id="CreateAlarmRules__li13946143115479"><strong id="CreateAlarmRules__b124845024423412">max</strong>: maximum value of metric data within an aggregation period.</li><li id="CreateAlarmRules__li12946631184713"><strong id="CreateAlarmRules__b69922739124339">min</strong>: minimum value of metric data within an aggregation period.</li><li id="CreateAlarmRules__li594613184714"><strong id="CreateAlarmRules__b148018077632217">sum</strong>: sum of metric data within an aggregation period.</li><li id="CreateAlarmRules__li1946193119470"><strong id="CreateAlarmRules__b77958654833238">variance</strong>: variance value of metric data within an aggregation period.</li></ul>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row330463119442"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p730618314442">comparison_operator</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1306231124419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1730610317448">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__p72097919584">Operator of an alarm threshold.</p>
<p id="CreateAlarmRules__p1320910955813"><strong id="CreateAlarmRules__b43501412105818">Regular expression matching:</strong> ^(&gt;|&lt;|&gt;=|&lt;=|=|!=)$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1530413154415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p143062031164418">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p15306931104412">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p53061231124418">Number</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__p4988143614415">Alarm threshold. Supported range: <strong id="CreateAlarmRules__b1581665744545">0</strong> to <strong id="CreateAlarmRules__b1868842712556">Number.MAX_VALUE</strong> (<strong id="CreateAlarmRules__b1461143745518">1.7976931348623157e+108</strong>) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS <strong id="CreateAlarmRules__b45067309754113">cpu_util</strong> to <strong id="CreateAlarmRules__b20274241554113">80</strong>.</p>
<p id="CreateAlarmRules__p109881836548">Minimum: <strong id="CreateAlarmRules__b229111814012">0</strong></p>
<p id="CreateAlarmRules__p1498814361046">Maximum: <strong id="CreateAlarmRules__b1698843618416">1.7976931348623157e+108</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1230414318444"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p11306103174416">unit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p18307203114440">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p73076313445">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__p1351917643114">Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs.</p>
<p id="CreateAlarmRules__p25196603116">Minimum: <strong id="CreateAlarmRules__b201258568274745">0</strong></p>
<p id="CreateAlarmRules__p05191861314">Maximum: <strong id="CreateAlarmRules__b728473804826">32</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row13304531184420"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p17307331124418">count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1730703111446">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p83074315440">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p18307203134417">Number of times that the alarm triggering conditions are met. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be <strong id="CreateAlarmRules__b150118003545549">1</strong>, <strong id="CreateAlarmRules__b177329521045549">2</strong>, <strong id="CreateAlarmRules__b169458259945549">3</strong>, <strong id="CreateAlarmRules__b161443994145549">4</strong>, <strong id="CreateAlarmRules__b174985540145549">5</strong>, <strong id="CreateAlarmRules__b33073735645549">10</strong>, <strong id="CreateAlarmRules__b208685888245549">15</strong>, <strong id="CreateAlarmRules__b133141178145549">30</strong>, <strong id="CreateAlarmRules__b111565206745549">60</strong>, <strong id="CreateAlarmRules__b169195562245549">90</strong>, <strong id="CreateAlarmRules__b25717846345549">120</strong>, or <strong id="CreateAlarmRules__b49120265945549">180</strong>.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row103046310447"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p11307931134414">suppress_duration</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p830713117441">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p14307173184413">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p73076316446">Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. <strong id="CreateAlarmRules__b133093336954839">0</strong> indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. <strong id="CreateAlarmRules__b149729291654839">300</strong> indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p143078318447">Minimum: <strong id="CreateAlarmRules__b5161618144015">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p8307231124417">Maximum: <strong id="CreateAlarmRules__en-us_topic_0000001646899038_b18307231154415">86400</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p3307193114447">The value can be:</p>
<ul id="CreateAlarmRules__en-us_topic_0000001646899038_ul930712318449"><li id="CreateAlarmRules__en-us_topic_0000001646899038_li73071431194417"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p73071231164417"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li73071431194417"></a><a name="en-us_topic_0000001646899038_li73071431194417"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b123077317441">0</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li153071231144415"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p030713314444"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li153071231144415"></a><a name="en-us_topic_0000001646899038_li153071231144415"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b7308143164420">300</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li530815319444"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p530853114440"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li530815319444"></a><a name="en-us_topic_0000001646899038_li530815319444"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b173081631154414">600</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li7308193114416"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p113081131134411"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li7308193114416"></a><a name="en-us_topic_0000001646899038_li7308193114416"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b03080318446">900</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li1530873116449"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1830893114441"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li1530873116449"></a><a name="en-us_topic_0000001646899038_li1530873116449"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b9308133117444">1800</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li2308163115445"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p143081631114416"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li2308163115445"></a><a name="en-us_topic_0000001646899038_li2308163115445"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b030863116445">3600</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li230853184413"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p7308103114446"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li230853184413"></a><a name="en-us_topic_0000001646899038_li230853184413"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b93081631144410">10800</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li1630813164416"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12308113116447"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li1630813164416"></a><a name="en-us_topic_0000001646899038_li1630813164416"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b63081731184413">21600</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li63081531114415"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p19308163117445"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li63081531114415"></a><a name="en-us_topic_0000001646899038_li63081531114415"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b030893119449">43200</strong></p>
</li><li id="CreateAlarmRules__en-us_topic_0000001646899038_li4308931144417"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1630814313447"><a name="CreateAlarmRules__en-us_topic_0000001646899038_li4308931144417"></a><a name="en-us_topic_0000001646899038_li4308931144417"></a><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b430873116443">86400</strong></p>
</li></ul>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row030443134414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p12308731164413">level</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p193089318446">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p133083311449">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p83081631194414">Alarm severity, which can be <strong id="CreateAlarmRules__b205403799245649">1</strong> (critical), <strong id="CreateAlarmRules__b73084593145649">2</strong> (major), <strong id="CreateAlarmRules__b198059184445649">3</strong> (minor), or <strong id="CreateAlarmRules__b66761884645649">4</strong> (informational). The default value is <strong id="CreateAlarmRules__b110922388354919">2</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateAlarmRules__en-us_topic_0000001646899038_request_Notification"></a><a name="en-us_topic_0000001646899038_request_Notification"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_request_Notification" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Notification</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row8310153124418"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p8411173164410">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p15411431204410">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10411183119449">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.6.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p84113312446">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row133109313448"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p18411631134417">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p141123118440">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1441183104411">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.6.2.5.1.4 "><p id="CreateAlarmRules__p9251145042213">Notification type.</p>
<p id="CreateAlarmRules__p12251550142218">The value can be:</p>
<p id="CreateAlarmRules__p8251195092214"><strong id="CreateAlarmRules__b43539244310">notification</strong>: topic subscriptions. Notifications are sent using SMN topics.</p>
<p id="CreateAlarmRules__p19251115011225"><strong id="CreateAlarmRules__b8729831103116">contact</strong>: cloud account contact. Notifications are sent to the mobile number and email address registered for your account.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row19310153134412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p19411113120443">notification_list</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p3411031144416">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p041173120447">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.6.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p4411131134410">List of objects to be notified of alarm status changes. The value of <strong id="CreateAlarmRules__b31355062475646">topicUrn</strong> can be obtained from SMN. For details, see section "Querying Topics." When <strong id="CreateAlarmRules__b9239358375752">type</strong> is set to <strong id="CreateAlarmRules__b167489485775752">notification</strong>, <strong id="CreateAlarmRules__b31930480475752">notification_list</strong> cannot be left blank. If you set <strong id="CreateAlarmRules__b85304806575831">alarm_action_enabled</strong> to <strong id="CreateAlarmRules__b189618812475831">true</strong>, you must specify either <strong id="CreateAlarmRules__b84468959775831">alarm_actions</strong> or <strong id="CreateAlarmRules__b11531142575831">ok_actions</strong>. If <strong id="CreateAlarmRules__b12695100947594">alarm_actions</strong> and <strong id="CreateAlarmRules__b4616723707594">ok_actions</strong> coexist, their <strong id="CreateAlarmRules__b12690871097594">notification_list</strong> must be the same.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p124111331164414">Array length: <strong id="CreateAlarmRules__b176200431575954">0</strong> to <strong id="CreateAlarmRules__b182744533275954">20</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateAlarmRules__en-us_topic_0000001646899038_request_ResourceTag"></a><a name="en-us_topic_0000001646899038_request_ResourceTag"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_request_ResourceTag" frame="border" border="1" rules="all"><caption><b>Table 7 </b>ResourceTag</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row931123184414"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2412831124410">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p44126314442">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.7.2.5.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p141218310448">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.7.2.5.1.4"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p114121931114419">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row33111131154414"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1241263116448">key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p64121831184415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p124121631154413">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.7.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2041216317446">Tag key. A tag key can contain a maximum of 128 Unicode characters.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p14412103114440">Minimum: <strong id="CreateAlarmRules__b4424499404">1</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p19412113119441">Maximum: <strong id="CreateAlarmRules__b11651256838017">128</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p041213311446"><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b1541293194419">Regular expression matching</strong>: ^((?!\s)(?!_sys_)[\p{L}\p{Z}\p{N}_.:=+\-@]*)(?&lt;!\s)$</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1231114319448"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1141283116444">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p9412123104412">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.7.2.5.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p54122319445">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.7.2.5.1.4 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1641210319441">Tag value. Each tag value can contain a maximum of 255 Unicode characters.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p7412103124415">Minimum: <strong id="CreateAlarmRules__b189014928274745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1412431114413">Maximum: <strong id="CreateAlarmRules__b194671151061">255</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p7412173113443"><strong id="CreateAlarmRules__en-us_topic_0000001646899038_b6412131104410">Regular expression matching</strong>: ^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)$</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section44121131204411"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p541215317444"><strong id="CreateAlarmRules__b1908037711112011">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_response_CreateAlarmResponse" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row031213119440"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p64123319445">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1741219316445">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p141219310447">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1031253115445"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p4412731164411">alarm_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p541216318447">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p941213315444">ID of an alarm rule, which starts with <strong id="CreateAlarmRules__b29326059783432">al</strong> and is followed by 22 characters of letters, digits, or a combination of both.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p24121731184413"><strong id="CreateAlarmRules__b4136241954013">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_response_GoAPIErrorResponseV2" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row163134314442"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p2041214316443">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1341223164419">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p0412531204419">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1313113118449"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p194121931184415">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1341263110442">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p84122031164420">Status code customized by each cloud service when a request error occurs.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p15413131164413">Minimum: <strong id="CreateAlarmRules__b120708920774745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p174131431124414">Maximum: <strong id="CreateAlarmRules__b45724115113">256</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row63131931134415"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1441393118440">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p184131931144414">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p9413531104414">Request error message.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p144133319441">Minimum: <strong id="CreateAlarmRules__b48367884974745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p164139313447">Maximum: <strong id="CreateAlarmRules__b1557951201218">256</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row231316314447"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1241383110441">request_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p164131731134418">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1241383111448">Request ID.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1741310314446">Minimum: <strong id="CreateAlarmRules__b82239941774745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1441311316447">Maximum: <strong id="CreateAlarmRules__b3580612161214">256</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p7413203119444"><strong id="CreateAlarmRules__b118169614831928">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_table12314431184420" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row193141531104416"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1413173124415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p164131231114419">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p541317311440">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row14314153110446"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p841310313446">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p341363154412">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p04133314449">Status code customized by each cloud service when a request error occurs.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p15413431124417">Minimum: <strong id="CreateAlarmRules__b5875710174745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p124136318447">Maximum: <strong id="CreateAlarmRules__b16581111211211">256</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row431443116448"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p84131931144413">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p10413103114447">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p174137310449">Request error message.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p54131031194414">Minimum: <strong id="CreateAlarmRules__b214430020674745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1741323134414">Maximum: <strong id="CreateAlarmRules__b35821412201214">256</strong></p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row9314031194413"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p941316313446">request_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p44131231104418">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p17413203154413">Request ID.</p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p7413183111447">Minimum: <strong id="CreateAlarmRules__b182879477174745">0</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p9413103116447">Maximum: <strong id="CreateAlarmRules__b11583112201213">256</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section13413163111448"><h4 class="sectiontitle">Example Requests</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p0413173115445">Create an alarm rule whose <strong id="CreateAlarmRules__b11620102252318">name</strong> is <strong id="CreateAlarmRules__b12412204319213">alarm-lxy-rg-RDS</strong>, <strong id="CreateAlarmRules__b1598118461211">type</strong> is <strong id="CreateAlarmRules__b19566648132112">RESOURCE_GROUP</strong>, <strong id="CreateAlarmRules__b17308175419216">suppress_duration</strong> is <strong id="CreateAlarmRules__b1241217582217">86400</strong>, and <strong id="CreateAlarmRules__b179184152217">level</strong> is <strong id="CreateAlarmRules__b7370124312225">2</strong>.</p>
<pre class="screen" id="CreateAlarmRules__en-us_topic_0000001646899038_screen1341393110445">{
"name" : "alarm-lxy-rg-RDS",
"description" : "",
"namespace" : "SYS.RDS",
"type" : "RESOURCE_GROUP",
"resources" : [ [ {
"name" : "rds_cluster_id",
"value" : "rdsxxx"
} ] ],
"policies" : [ {
"metric_name" : "rds001_cpu_util",
"period" : 1,
"filter" : "average",
"comparison_operator" : "&gt;=",
"value" : 0,
"unit" : "%",
"count" : 1,
"suppress_duration" : 86400,
"level" : 2
} ],
"enabled" : true,
"notification_enabled" : false,
"resource_group_id" : "rg1623429506587NbRweoa3J",
"enterprise_project_id" : "a9d919b7-0456-4bb8-b470-6a23b64f4f7e",
"alarm_template_id" : "at1628592157541dB1klWgY6"
}</pre>
<div class="p" id="CreateAlarmRules__p18691394131">Create an alarm rule whose <strong id="CreateAlarmRules__b380993915233">name</strong> is <strong id="CreateAlarmRules__b8809113920234">alarm-event-tes-05</strong>, <strong id="CreateAlarmRules__b180913391234">type</strong> is <strong id="CreateAlarmRules__b12809173992315">EVENT.SYS</strong>, <strong id="CreateAlarmRules__b6809113910237">suppress_duration</strong> is <strong id="CreateAlarmRules__b178091739192318">0</strong>, and <strong id="CreateAlarmRules__b58091639172318">level</strong> is <strong id="CreateAlarmRules__b68091239122318">2</strong>.<pre class="screen" id="CreateAlarmRules__screen19830181485319">{
"name" : "alarm-event-test-05",
"namespace" : "SYS.ECS",
"resources" : [ [ {
"name" : "resource_id",
"value" : "2ffxxx"
} ] ],
"policies" : [ {
"metric_name" : "instance_resize_executing",
"period" : 0,
"filter" : "average",
"comparison_operator" : "&gt;=",
"unit" : "count",
"count" : 1,
"suppress_duration" : 0,
"level" : 2
} ],
"type" : "EVENT.SYS",
"enabled" : true,
"notification_enabled" : false
}</pre>
</div>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section94141831194420"><h4 class="sectiontitle">Example Responses</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p13414143110449"><strong id="CreateAlarmRules__b561381870112011">Status code: 201</strong></p>
<p id="CreateAlarmRules__en-us_topic_0000001646899038_p1541433184411">Alarm rule created.</p>
<pre class="screen" id="CreateAlarmRules__en-us_topic_0000001646899038_screen15414173113444">{
"alarm_id" : "alCzk8o9dtSQHtiDgb44Eepw"
}</pre>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section16414203114443"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateAlarmRules__en-us_topic_0000001646899038_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row831633114445"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1541423174413">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateAlarmRules__en-us_topic_0000001646899038_p841413134412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateAlarmRules__en-us_topic_0000001646899038_row153164315442"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p4414193154419">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1941493174411">Alarm rule created.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row1331653174416"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p19414163164410">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1041423144410">Parameter verification failed.</p>
</td>
</tr>
<tr id="CreateAlarmRules__en-us_topic_0000001646899038_row231683113448"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p1941413194420">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateAlarmRules__en-us_topic_0000001646899038_p841433174413">Failed to complete the request because of an internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateAlarmRules__en-us_topic_0000001646899038_section6414103112449"><h4 class="sectiontitle">Error Codes</h4><p id="CreateAlarmRules__en-us_topic_0000001646899038_p241413119443">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_300000000.html">Alarm Rules</a></div>
</div>
</div>