CreateRuleDirectly
- Print
- PDF
CreateRuleDirectly
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Summary
This API creates an event rule directly by designating the monitored target and item without creating the monitored target/item group.
Request
API URL
URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/rule/group/ruleGrp/createDirectly
Method: POST
Request header
The request headers specified in common settings are required.
Content-Type: application/json
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
Request Body
Example
Request example
POST /cw_fea/real/cw/api/rule/group/ruleGrp/createDirectly
Host: cw.apigw.ntruss.com
Content-Type: application/json
x-ncp-apigw-signature-v2: {generated signature}
x-ncp-apigw-timestamp: {current timestamp}
x-ncp-iam-access-key: {your iam access key}
Payload:
{
"groupDesc": "Directly creates a new event rule.",
"groupName": "eventRuleDirect001",
"metricsGroup": {
"groupDesc": "Directly creates a monitored item group.",
"groupName": "metricsGroup001",
"metricsGroupItems": [
{
"calculation": "COUNT",
"condition": "GT",
"desc": "string",
"dimensions": [
{
"dim": "type",
"val": "svr"
}
],
"duration": 1,
"eventLevel": "INFO",
"metric": "avg_write_cnt",
"threshold": 0.7
}
],
"prodKey": "xxxxxxxxxxxxxxxxxx",
"temporaryGroup": true
},
"monitorGroup": {
"groupDesc": "Directly creates a monitored target group.",
"groupName": "monitorGroup001",
"monitorGroupItemList": [
{
"resourceId": "resourceId001"
}
],
"prodKey": "xxxxxxxxxxxxxxxxxx",
"temporaryGroup": true
},
"prodKey": "xxxxxxxxxxxxxxxxxx",
"recipientNotifications": [
{
"groupName": "RecipientGroup001",
"groupNum": xx,
"notifyTypes": [
"SMS",
"EMAIL"
]
}
]
}
Response example
The API returns HTTP code 200 as well as the created ID of the event rule if it is created without any errors.
"xxxxxxxxxxxxxxxxxx"
Was this article helpful?