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-build243329498_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: Fri, 23 Sep 2022 13:14:11 GMT
Vary: Accept-Encoding

{

}