Delete the real-time monitoring alarm rule of Cloud monitoring. Users can pass in the monitoring rule ID to delete the specified monitoring rule.
パラメータ名 | 説明 |
---|---|
*ruleIdString | Alert rule ID |
パラメータ名 | 説明 |
---|---|
codeString | Response code |
messageString | Response message |
エラーコード(code) | 説明(message) | HTTPステータスコード | 意味 |
---|---|---|---|
ResourceNotFound.RuleNotExists | Rule does not exist | 400 | Rule does not exist |
ResourceNotFound.AccountNotExists | Account does not exist | 400 | Account does not exist |
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/cloudmonitor/alarm/real-time/delete" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"ruleId": "10d01002a7b6426f8e103ce4ec7a0b35"
}'
{
"code": 0,
"message": "success"
}