forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Ying, Jiayu <jiayuying1@huawei.com> Co-committed-by: Ying, Jiayu <jiayuying1@huawei.com>
485 lines
33 KiB
HTML
485 lines
33 KiB
HTML
<a name="cts_api_0312"></a><a name="cts_api_0312"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Key Event Notification</h1>
|
|
<div id="body8662426"><div class="section" id="cts_api_0312__section841820391643"><h4 class="sectiontitle">Function</h4><p id="cts_api_0312__p14184391142">SMS, email, or HTTP/HTTPS notifications can be sent through pre-configured SMN topics to subscribers when key operations occur. This helps you detect high-risk operations promptly. Notifications can also be used as triggers for specific operations or to connect to your own audit system.</p>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section2041916393419"><h4 class="sectiontitle">URI</h4><p id="cts_api_0312__p041917396416">POST /v3/{project_id}/notifications</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__table194199392410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="cts_api_0312__row6419539849"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="cts_api_0312__p18420163917419">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="cts_api_0312__p1342015391345">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="cts_api_0312__p1542011398410">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="cts_api_0312__p1442013391545">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row541993919415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="cts_api_0312__p74205391415">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="cts_api_0312__p204203390410">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="cts_api_0312__p142114394414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="cts_api_0312__p1742116397419">Project ID. For details, see section "Obtaining the Account ID and Project ID" in <em id="cts_api_0312__i881955422014">Cloud Trace Service API Reference</em>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section942115397415"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_request_CreateNotificationRequestBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="cts_api_0312__row142113391412"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="cts_api_0312__p134222397410">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="cts_api_0312__p124221839645">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="cts_api_0312__p4422739247">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="cts_api_0312__p20422103912420">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row18421539145"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="cts_api_0312__p174238398412">notification_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="cts_api_0312__p13423539247">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="cts_api_0312__p17423203915413">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="cts_api_0312__p10423153915417">Notification name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row16421839345"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="cts_api_0312__p1242343914411">operation_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="cts_api_0312__p144231639844">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="cts_api_0312__p10424739549">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="cts_api_0312__p8424039945">Operation type. Possible options include <strong id="cts_api_0312__b1181818335229">complete</strong> and <strong id="cts_api_0312__b788393519223">customized</strong>. If you choose <strong id="cts_api_0312__b19787453122215">complete</strong>, you do not need to specify <strong id="cts_api_0312__b8282161762313">operations</strong> and <strong id="cts_api_0312__b106043195239">notify_user_list</strong>, and notifications will be sent when any supported operations occur on any of the connected cloud services. If you choose <strong id="cts_api_0312__b13139111982414">customized</strong>, notifications will be sent when operations defined in <strong id="cts_api_0312__b12706104012411">operations</strong> occur.</p>
|
|
<p id="cts_api_0312__p742419391845">Enumerated values:</p>
|
|
<ul id="cts_api_0312__ul54241839145"><li id="cts_api_0312__li442416391845"><strong id="cts_api_0312__b84246392417">complete</strong></li><li id="cts_api_0312__li17424113915412"><strong id="cts_api_0312__b164241239649">customized</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row442119391418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="cts_api_0312__p17424153916415">operations</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="cts_api_0312__p1942519393412">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="cts_api_0312__p134253391412">Array of <a href="#cts_api_0312__en-us_topic_0000001213559235_request_Operations">Operations</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="cts_api_0312__p1242518391642">Operation list.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row642118391446"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="cts_api_0312__p1942583911420">notify_user_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="cts_api_0312__p144250391446">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="cts_api_0312__p1842513398418">Array of <a href="#cts_api_0312__en-us_topic_0000001213559235_request_NotificationUsers">NotificationUsers</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="cts_api_0312__p64263394420">List of users whose operations will trigger notifications. Currently, up to 50 users in 10 user groups can be configured.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row042293917415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="cts_api_0312__p74261398418">topic_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="cts_api_0312__p542603917417">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="cts_api_0312__p24269391143">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="cts_api_0312__p54261839249">Topic URN.</p>
|
|
<ul id="cts_api_0312__ul64266391346"><li id="cts_api_0312__li842623912417">To obtain the <strong id="cts_api_0312__b208151331402">topic_urn</strong>, call the SMN API for querying topics. Example URN: <strong id="cts_api_0312__b138151230012">urn:smn:regionId:f96188c7ccaf4ffba0c9aa149ab2bd57:test_topic_v2</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cts_api_0312__en-us_topic_0000001213559235_request_Operations"></a><a name="en-us_topic_0000001213559235_request_Operations"></a><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_request_Operations" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Operations</caption><thead align="left"><tr id="cts_api_0312__row1842793918416"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="cts_api_0312__p16428113914419">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="cts_api_0312__p242820395413">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="cts_api_0312__p104284390411">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="cts_api_0312__p18428539743">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row164271839546"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="cts_api_0312__p164291439248">service_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="cts_api_0312__p184291239841">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="cts_api_0312__p11429939445">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="cts_api_0312__p154292392419">Cloud service. The value must be the acronym of a cloud service that has been connected with CTS. It is a word composed of uppercase letters. For cloud services that can be connected with CTS, see section "Supported Services and Operations" in the <em id="cts_api_0312__i10695142636">Cloud Trace Service User Guide</em>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row842733920418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="cts_api_0312__p3429739341">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="cts_api_0312__p154291439147">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="cts_api_0312__p842916391648">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="cts_api_0312__p20430439441">Resource type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row9428103911411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="cts_api_0312__p543093910413">trace_names</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="cts_api_0312__p94302039146">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="cts_api_0312__p243011397410">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="cts_api_0312__p184301739846">Trace name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cts_api_0312__en-us_topic_0000001213559235_request_NotificationUsers"></a><a name="en-us_topic_0000001213559235_request_NotificationUsers"></a><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_request_NotificationUsers" frame="border" border="1" rules="all"><caption><b>Table 4 </b>NotificationUsers</caption><thead align="left"><tr id="cts_api_0312__row1043083917415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="cts_api_0312__p204312391841">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="cts_api_0312__p5431839747">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="cts_api_0312__p5431173910412">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="cts_api_0312__p1343193915420">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row15431139944"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="cts_api_0312__p64321739143">user_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="cts_api_0312__p5432193913419">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="cts_api_0312__p94321139544">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="cts_api_0312__p44322393414">IAM user group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row3431163910412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="cts_api_0312__p1643233915417">user_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="cts_api_0312__p14322392417">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="cts_api_0312__p1143313911416">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="cts_api_0312__p643320392416">IAM user.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section14372396411"><h4 class="sectiontitle">Response Parameters</h4><p id="cts_api_0312__p1943710391641"><strong id="cts_api_0312__b184372397414">Status code: 201</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_response_CreateNotificationResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="cts_api_0312__row143723911415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="cts_api_0312__p34387391147">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="cts_api_0312__p194391398413">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="cts_api_0312__p154391739846">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row19438139641"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p143914394417">notification_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p1443913394411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p134391839749">Notification name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row943813391747"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p10439173914415">operation_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p6440839644">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p044018391148">Operation type. Possible options include <strong id="cts_api_0312__b10558152816443">complete</strong> and <strong id="cts_api_0312__b1062123324414">customized</strong>.</p>
|
|
<p id="cts_api_0312__p84401739647">Enumerated values:</p>
|
|
<ul id="cts_api_0312__ul3440113917420"><li id="cts_api_0312__li244063915414"><strong id="cts_api_0312__b17440239347">customized</strong></li><li id="cts_api_0312__li1944013394419"><strong id="cts_api_0312__b164409391545">complete</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1243820398412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p6440203919418">operations</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p144103913416">Array of <a href="#cts_api_0312__en-us_topic_0000001213559235_response_Operations">Operations</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p15441193917418">Operation list.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row04384391541"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p204413393412">notify_user_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p1144133917418">Array of <a href="#cts_api_0312__en-us_topic_0000001213559235_response_NotificationUsers">NotificationUsers</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p24411239848">List of users whose operations will trigger notifications. Currently, up to 50 users in 10 user groups can be configured.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row74388391649"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p644116391742">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p14442133914411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p54421396414">Notification status. Possible options include <strong id="cts_api_0312__b2271122664714">enabled</strong> and <strong id="cts_api_0312__b16679142824718">disabled</strong>.</p>
|
|
<p id="cts_api_0312__p154428399417">Enumerated values:</p>
|
|
<ul id="cts_api_0312__ul1044217399416"><li id="cts_api_0312__li0442939940"><strong id="cts_api_0312__b44424391043">enabled</strong></li><li id="cts_api_0312__li244263914414"><strong id="cts_api_0312__b5442153912411">disabled</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row9438339646"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p19442739649">topic_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p174421139148">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p1644363915417">Unique resource ID of an SMN topic. You can obtain the ID by querying the topic list.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row154380391747"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p104430395412">notification_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p1644363916413">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p164433392410">Unique notification ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row164387399417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p16443739145">notification_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p144312393419">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p044423915414">Notification type.</p>
|
|
<p id="cts_api_0312__p9444193916419">Enumerated value:</p>
|
|
<ul id="cts_api_0312__ul6444339641"><li id="cts_api_0312__li1944413918410"><strong id="cts_api_0312__b64442039647">smn</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row24382394413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p194443391747">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p1944411391341">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p164446391449">Project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1143817391545"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="cts_api_0312__p10445439144">create_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="cts_api_0312__p54455393418">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="cts_api_0312__p134451939146">Time when a notification rule was created.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cts_api_0312__en-us_topic_0000001213559235_response_Operations"></a><a name="en-us_topic_0000001213559235_response_Operations"></a><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_response_Operations" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Operations</caption><thead align="left"><tr id="cts_api_0312__row144461339541"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="cts_api_0312__p144612396420">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="cts_api_0312__p1744673913414">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="cts_api_0312__p54477391246">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row1444633913413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cts_api_0312__p64472396414">service_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cts_api_0312__p1944733916419">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cts_api_0312__p1844714391410">Cloud service. The value must be the acronym of a cloud service that has been connected with CTS. It is a word composed of uppercase letters. For cloud services that can be connected with CTS, see section "Supported Services and Operations" in the <em id="cts_api_0312__i31161571237">Cloud Trace Service User Guide</em>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row2044612391541"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cts_api_0312__p14473391844">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cts_api_0312__p9447039841">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cts_api_0312__p64484391943">Resource type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row154461839643"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cts_api_0312__p144481339041">trace_names</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cts_api_0312__p544863916417">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cts_api_0312__p14448839346">Trace name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cts_api_0312__en-us_topic_0000001213559235_response_NotificationUsers"></a><a name="en-us_topic_0000001213559235_response_NotificationUsers"></a><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_response_NotificationUsers" frame="border" border="1" rules="all"><caption><b>Table 7 </b>NotificationUsers</caption><thead align="left"><tr id="cts_api_0312__row4448173919414"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="cts_api_0312__p10449639641">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="cts_api_0312__p8449153917411">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="cts_api_0312__p184491739749">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row04482399419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="cts_api_0312__p14497392420">user_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="cts_api_0312__p94501539744">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="cts_api_0312__p134508391849">IAM user group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row244819391449"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="cts_api_0312__p5450193917411">user_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="cts_api_0312__p8450739543">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="cts_api_0312__p1945043914414">IAM user.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="cts_api_0312__p2061373919415"><strong id="cts_api_0312__b186131539347">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_response_FailedRsp" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="cts_api_0312__row194541439442"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="cts_api_0312__p11613239744">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="cts_api_0312__p176131539343">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="cts_api_0312__p26138391247">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row145412398416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="cts_api_0312__p861303919412">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="cts_api_0312__p961317391840">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="cts_api_0312__p36149391346">Error code. Format: <strong id="cts_api_0312__b9852191825112">CTS.</strong><em id="cts_api_0312__i55916147511">XXX</em>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row545414395412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="cts_api_0312__p06147391249">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="cts_api_0312__p116142391146">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="cts_api_0312__p96141439346">Error description.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section3614339744"><h4 class="sectiontitle">Example Request</h4><ul id="cts_api_0312__ul2614163915414"><li id="cts_api_0312__li46148391348">Creating a custom key event notification<pre class="screen" id="cts_api_0312__screen19614103913412">POST https://{endpoint}/v3/{project_id}/notifications
|
|
|
|
{
|
|
"notification_name": "keyOperate_info_cfwy",
|
|
"operation_type": "customized",
|
|
"operations": [{
|
|
"service_type": "CTS",
|
|
"resource_type": "tracker",
|
|
"trace_names": [
|
|
"createTracker",
|
|
"deleteTraceker"
|
|
]
|
|
}, {
|
|
"service_type": "CTS",
|
|
"resource_type": "notification",
|
|
"trace_names": [
|
|
"deleteNotification",
|
|
"updateNotification"
|
|
]
|
|
}, {
|
|
"service_type": "AOM",
|
|
"resource_type": "pe",
|
|
"trace_names": [
|
|
"deletePolicyGroup",
|
|
"updatePolicyGroup",
|
|
"createPolicyGroup"
|
|
]
|
|
}
|
|
],
|
|
"notify_user_list": [{
|
|
"user_group": "admin",
|
|
"user_list": [
|
|
"test1",
|
|
"test2"
|
|
]
|
|
}, {
|
|
"user_group": "CTS view",
|
|
"user_list": [
|
|
"test3",
|
|
"test4"
|
|
]
|
|
}
|
|
],
|
|
"topic_id": "urn:smn:{regionid}:24edf66e79d04187acb99a463e610764:test"
|
|
}</pre>
|
|
</li><li id="cts_api_0312__li186164391047">Creating a complete key event notification<pre class="screen" id="cts_api_0312__screen116166395410">POST https://{endpoint}/v3/{project_id}/notifications
|
|
|
|
{
|
|
"notification_name": "test",
|
|
"operation_type": "complete",
|
|
"topic_id": "urn:smn:{regionid}:24edf66e79d04187acb99a463e610764:test"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section136177396417"><h4 class="sectiontitle">Example Response</h4><p id="cts_api_0312__p06176391148"><strong id="cts_api_0312__b5358654113019">Status code: 201</strong></p>
|
|
<p id="cts_api_0312__p5617103913416">The creation is successful.</p>
|
|
<pre class="screen" id="cts_api_0312__screen8617173910419">{
|
|
"create_time" : 1634001495876,
|
|
"notification_id" : "cda8fd83-d08c-46f0-b914-1453a6a85c00",
|
|
"notification_name" : "keyOperate_info_cfwy",
|
|
"notification_type" : "smn",
|
|
"notify_user_list" : [ {
|
|
"user_group" : "admin",
|
|
"user_list" : [ "test1", "test2" ]
|
|
}, {
|
|
"user_group" : "CTS view",
|
|
"user_list" : [ "test3", "test4" ]
|
|
} ],
|
|
"operation_type" : "customized",
|
|
"operations" : [ {
|
|
"resource_type" : "tracker",
|
|
"service_type" : "CTS",
|
|
"trace_names" : [ "createTracker", "deleteTraceker" ]
|
|
}, {
|
|
"resource_type" : "notification",
|
|
"service_type" : "CTS",
|
|
"trace_names" : [ "deleteNotification", "updateNotification" ]
|
|
}, {
|
|
"resource_type" : "pe",
|
|
"service_type" : "AOM",
|
|
"trace_names" : [ "deletePolicyGroup", "updatePolicyGroup", "createPolicyGroup" ]
|
|
} ],
|
|
"project_id" : "24edf66e79d04187acb99a463e610764",
|
|
"status" : "enabled",
|
|
"topic_id" : "urn:smn:{regionid}:24edf66e79d04187acb99a463e610764:test"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section126181039848"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cts_api_0312__en-us_topic_0000001213559235_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="cts_api_0312__row2464739543"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="cts_api_0312__p3618139348">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="cts_api_0312__p16618143918411">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cts_api_0312__row846416394413"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p4618113920413">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p861815397420">The creation is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row5464439548"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p156187391411">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p161893916412">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1546417391343"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p66190398414">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p8619939744">The request is rejected due to authentication failure.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1246412396412"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p36192391945">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p3619239045">The server understood the request but refused to authorize it.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row446420391345"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p146192391141">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p36195395412">The server failed to find the requested resource or some key event notifications failed to be deleted.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1446411398417"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p46191939845">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p1361914398416">The request failed to be executed or some trackers failed to be deleted.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cts_api_0312__row1446414390419"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="cts_api_0312__p46190391840">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="cts_api_0312__p10619639446">The requested service is unavailable. The client should not repeat the request without modifications.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="cts_api_0312__section13619113911411"><h4 class="sectiontitle">Error Codes</h4><p id="cts_api_0312__p11619163916416">See <a href="en-us_topic_0168602259.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000003.html">Key Event Notification Management</a></div>
|
|
</div>
|
|
</div>
|
|
|