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:
  decryptCacheTimeout: 604800s
  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"}],"decryptCacheTimeout":"604800s"}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186462253_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: Wed, 02 Jun 2021 10:22:09 GMT
Vary: Accept-Encoding

{

}