ves-io-schema-namespace-NamespaceCustomAPI-SetActiveAlertPolicies

Examples of performing namespace NamespaceCustomAPI SetActiveAlertPolicies

Usecase:

Set Active Alert Policies

Request:

Request using vesctl:

vesctl request rpc namespace.NamespaceCustomAPI.SetActiveAlertPolicies -i request.yaml --uri /public/namespaces/foobar/active_alert_policies --http-method POST

where file request.yaml has following contents:

alertPolicies:
- name: ap-1
  namespace: foobar
  tenant: acmecorp
- name: ap-2
  namespace: shared
  tenant: acmecorp
namespace: foobar

vesctl yaml response:

{}

Request using curl:

curl -X 'POST' -d '{"namespace":"foobar","alertPolicies":[{"tenant":"acmecorp","namespace":"foobar","name":"ap-1"},{"tenant":"acmecorp","namespace":"shared","name":"ap-2"}]}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build381173587_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/foobar/active_alert_policies'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 14 Jul 2021 08:07:38 GMT
Vary: Accept-Encoding

{

}