PutCustomEventRule 操作を呼び出して、カスタムイベントのアラートルールを作成します。
操作説明
Before you call this operation, you must call the PutCustomEvent operation to report the monitoring data of the custom event. For more information, see PutCustomEvent.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cms:PutCustomEventRule |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| GroupId |
string |
必須 |
アプリケーショングループの ID。ID の取得方法については、 DescribeCustomEventAttribute を参照してください。 説明
値が 0 の場合、レポートされたカスタムイベントはどのアプリケーショングループにも属していないことを示します。 |
7378**** |
| RuleId |
string |
必須 |
アラートルールの ID。 説明
アラートルール ID が既に存在する場合、アラートルールが変更済みになります。アラートルール ID が存在しない場合、アラートルールが作成されます。 |
CustomRuleId1 |
| RuleName |
string |
必須 |
アラートルールの名前。 |
CustomeRule |
| EventName |
string |
必須 |
カスタムイベントの名前。名前の取得方法については、 DescribeCustomEventAttribute を参照してください。 |
HostDown |
| ContactGroups |
string |
必須 |
アラート連絡先グループ。複数の連絡先グループはコンマ (,) で区切ります。 |
ECS_Group |
| Webhook |
string |
任意 |
アラートがトリガーされたときに POST リクエストが送信されるコールバック URL。 |
https://www.aliyun.com |
| EffectiveInterval |
string |
任意 |
アラートルールが有効な時間帯。有効な値: 00:00-23:59。 |
00:00-23:59 |
| Period |
string |
任意 |
カスタムイベントのモニタリングデータの集計期間。単位: 秒。値は 60 または 60 の倍数である必要があります。デフォルト値: 300。 |
60 |
| EmailSubject |
string |
任意 |
アラートメールの主題。 |
ECS instance |
| Threshold |
string |
必須 |
アラートのしきい値。 |
99 |
| Level |
string |
必須 |
アラートレベル。有効な値:
|
CRITICAL |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| Code |
string |
The status code. 説明
The value 200 indicates that the call was successful. |
200 |
| Message |
string |
The error message. |
The request has failed due to a temporary failure of the server. |
| RequestId |
string |
The ID of the request. |
AD5DCD82-BD1C-405F-BAED-32302DE9F498 |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
例
成功レスポンス
JSONJSON
{
"Code": "200",
"Message": "The request has failed due to a temporary failure of the server.",
"RequestId": "AD5DCD82-BD1C-405F-BAED-32302DE9F498",
"Success": true
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | %s | %s | |
| 499 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 204 | %s | %s | |
| 403 | %s | %s | |
| 206 | %s | %s | |
| 404 | %s | %s | |
| 503 | %s | %s | |
| 406 | %s | %s |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。