​
Select Service
ves-io-schema-shape-brmalerts-alert_gen_policy-API-Create
Published April 5, 2023 | Last modified September 22, 2026
Examples of creating alert_gen_policy
Usecase:
Create alert configuration
Request using vesctl:
vesctl configuration create alert_gen_policy -i alert_gen_policy.yaml
where file alert_gen_policy.yaml has following contents (alert_gen_policy.CreateRequest):
RequestJSON:
{ "metadata": { "name": "analysis", "namespace": "system" }, "spec": { "details": { "severity": "MAJOR", "alert_name": "Traffic Alert", "alert_message": "Traffic Alert Message", "alert_message_details": "Traffic Alert Message details" } }}vesctl yaml response:
ResponseJSON:
{ "metadata": { "name": "analysis", "namespace": "system", "labels": {}, "annotations": {}, "description": "", "disable": false }, "system_metadata": { "uid": "4f868739-f594-4140-8245-68287fd48a36", "creation_timestamp": "2026-06-19T22:05:22.346330Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": {} }, "spec": { "alert_status": "ALERT_ACTIVE", "details": { "severity": "MAJOR", "alert_name": "Traffic Alert", "alert_message": "Traffic Alert Message", "alert_message_details": "Traffic Alert Message details" } }}Request using curl:
curl -X 'POST' -d '{"metadata":{"name":"analysis","namespace":"system"},"spec":{"details":{"severity":"MAJOR","alert_name":"Traffic Alert","alert_message":"Traffic Alert Message","alert_message_details":"Traffic Alert Message details"}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build1655461974_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/shape/alerts/namespaces/system/alert_gen_policys'curl response:
HTTP/1.1 200 OKContent-Length: 839Content-Type: application/jsonDate: Fri, 19 Jun 2026 22:05:22 GMTVary: Accept-Encoding
{ "metadata": { "name": "analysis", "namespace": "system", "labels": { }, "annotations": { }, "description": "", "disable": false }, "system_metadata": { "uid": "4f868739-f594-4140-8245-68287fd48a36", "creation_timestamp": "2026-06-19T22:05:22.346330Z", "deletion_timestamp": null, "modification_timestamp": null, "initializers": null, "finalizers": [ ], "tenant": "acmecorp", "creator_class": "examplesvc", "creator_id": "examplesvc", "object_index": 0, "owner_view": null, "labels": { } }, "spec": { "alert_status": "ALERT_ACTIVE", "details": { "severity": "MAJOR", "alert_name": "Traffic Alert", "alert_message": "Traffic Alert Message", "alert_message_details": "Traffic Alert Message details" } }}