CreateAlertManagerAlerts - Amazon Managed Service for Prometheus

CreateAlertManagerAlerts

The CreateAlertManagerAlerts operation creates an alert in the workspace.

Valid HTTP verbs:

POST

Valid URIs:

/workspaces/workspaceId/alertmanager/api/v2/alerts

URL query parameters:

alerts An array of objects, where each object represents one alert. The following is an example of an alert object:

[ { "startsAt": "2021-09-24T17:14:04.995Z", "endsAt": "2021-09-24T17:14:04.995Z", "annotations": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "labels": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "generatorURL": "string" } ]

Sample request

POST /workspaces/ws-b226cc2a-a446-46a9-933a-ac50479a5568/alertmanager/api/v2/alerts HTTP/1.1 Content-Length: 203, Authorization: AUTHPARAMS X-Amz-Date: 20201201T193725Z User-Agent: Grafana/8.1.0 [ { "labels": { "alertname": "test-alert" }, "annotations": { "summary": "this is a test alert used for demo purposes" }, "generatorURL": "https://www.amazon.com/" } ]

Sample response

HTTP/1.1 200 OK x-amzn-RequestId: 12345678-abcd-4442-b8c5-262b45e9b535 Content-Length: 0 Connection: keep-alive Date: Tue, 01 Dec 2020 19:37:25 GMT Content-Type: application/json Server: amazon vary: Origin