ves-io-schema-kms_key-API-Replace

Examples of replacing kms_key

Usecase:

Replace kms-rsa-key-default max-cache-age

Request using vesctl:

vesctl configuration replace kms_key -i kms_key.yaml

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

metadata:
  name: kms-rsa-key-default
  namespace: documentation
spec:
  maxCacheAge: 21600s

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"maxCacheAge":"21600s"}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys/kms-rsa-key-default'

curl response:

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

{

}

Usecase:

Replace kms-rsa-key-default policy

Request using vesctl:

vesctl configuration replace kms_key -i kms_key.yaml

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

metadata:
  name: kms-rsa-key-default
  namespace: documentation
spec:
  policies:
  - kind: kms_policy
    name: kms-rsa-policy
    namespace: documentation

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"kms-rsa-key-default","namespace":"documentation"},"spec":{"policies":[{"kind":"kms_policy","namespace":"documentation","name":"kms-rsa-policy"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/kms/namespaces/documentation/kms_keys/kms-rsa-key-default'

curl response:

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

{

}