ves-io-schema-service_policy_set-API-Replace

Examples of replacing servicepolicyset

Usecase:

Replace service-policy-set-1

Request using vesctl:

vesctl configuration replace service_policy_set -i service_policy_set.yaml

where file servicepolicyset.yaml has following contents (servicepolicyset.ReplaceRequest):

metadata:
  name: service-policy-set-1
  namespace: documentation
spec:
  policies:
  - kind: service_policy
    name: service-policy-1
  - kind: service_policy
    name: service-policy-2

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"service-policy-set-1","namespace":"documentation"},"spec":{"policies":[{"kind":"service_policy","name":"service-policy-1"},{"kind":"service_policy","name":"service-policy-2"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/service_policy_sets/service-policy-set-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:32 GMT
Vary: Accept-Encoding

{

}