ves-io-schema-secret_policy-API-Replace

Examples of replacing secret_policy

Usecase:

Replace secret-policy-1

Request using vesctl:

vesctl configuration replace secret_policy -i secret_policy.yaml

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

metadata:
  name: secret-policy-1
  namespace: documentation
spec:
  rules:
  - kind: secret_policy_rule
    name: secret-policy-rule-2

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"secret-policy-1","namespace":"documentation"},"spec":{"rules":[{"kind":"secret_policy_rule","name":"secret-policy-rule-2"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/secret_management/namespaces/documentation/secret_policys/secret-policy-1'

curl response:

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

{

}