ves-io-schema-infraprotect_configuration-CustomAPI-Mitigate

Examples of performing infraprotect_configuration CustomAPI Mitigate

Usecase:

Change mitigation state for a configured zone

Request:

Request using vesctl:

vesctl request rpc infraprotect_configuration.CustomAPI.Mitigate -i request.yaml --uri /public/namespaces/system/infraprotect_configurations/38b115f3-da21-42d1-a07e-542806b0d96a/mitigate --http-method POST

where file request.yaml has following contents:

namespace: system
status: true
zoneUuid: 38b115f3-da21-42d1-a07e-542806b0d96a

vesctl yaml response:

prefixes:
- 10.1.1.0/24

Request using curl:

curl -X 'POST' -d '{"namespace":"system","zoneUuid":"38b115f3-da21-42d1-a07e-542806b0d96a","status":true}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect_configurations/38b115f3-da21-42d1-a07e-542806b0d96a/mitigate'

curl response:

HTTP/1.1 200 OK
Content-Length: 41
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:41 GMT
Vary: Accept-Encoding

{
  "prefixes": [
    "10.1.1.0/24"
  ]
}