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 secret_policy.yaml has following contents (secret_policy.ReplaceRequest):

RequestJSON:

{"metadata":{"name":"secret-policy-1","namespace":"documentation"},"spec":{"rules":[{"kind":"secret_policy_rule","name":"secret-policy-rule-2"}],"decrypt_cache_timeout":"604800s"}} `

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"}],"decrypt_cache_timeout":"604800s"}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_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, 28 Jul 2022 12:11:50 GMT
Vary: Accept-Encoding

{

}