Creates an alert handling rule.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
EventType | string | No | The alert type.
| sensitiveFile |
OperationCode | string | No | The operation code.
| whitelist |
Conditions | string | No | The rule conditions. The value is in the JSON format. Valid values of keys:
| [{\"condition\": \"MD5\", \"type\": \"equals\", \"value\": \"0083a31cc0083a31ccf7c10367a6e783e\"}] |
Scenarios | string | No | The application scope of the rule. The value is in the JSON format. Valid values of keys:
| {\"type\": \"repo\", \"value\": \"test-aaa/shenzhen-repo-01\"} |
EventKey | string | No | The keyword of the alert item. | PEM |
EventName | string | No | The name of the alert item. | PEM |
Response parameters
Examples
Sample success responses
JSON
format
{
"Data": {
"Id": 443496,
"EventType": "sensitiveFile",
"OperationCode": "whitelist",
"Conditions": "[{\\\"condition\\\": \\\"MD5\\\", \\\"type\\\": \\\"equals\\\", \\\"value\\\": \\\"0083a31cc0083a31ccf7c10367a6e783e\\\"}]\n",
"Scenarios": "{\\\"type\\\": \\\"repo\\\", \\\"value\\\": \\\"test-aaa/shenzhen-repo-01\\\"}\n",
"EventKey": "PEM",
"EventName": "PEM"
},
"Success": true,
"Code": "200",
"Message": "successful",
"RequestId": "0C8487EF-50C2-54BB-8634-10F8C35D****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.