ves-io-schema-tpm_category-API-Replace

Examples of replacing tpm_category

Usecase:

Replace "tpm category to update TpmAllowList"

Request using vesctl:

vesctl configuration replace tpm_category -i tpm_category.yaml

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

metadata:
  name: category-sku-001
  namespace: documentation
spec:
  tpmAllowList:
  - https:///url_of_ek_ca_cert
  - string:///<base64_encoded_pem_of_ek_ca_cert>

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"category-sku-001","namespace":"documentation"},"spec":{"tpmAllowList":["https:///url_of_ek_ca_cert","string:///\u003cbase64_encoded_pem_of_ek_ca_cert\u003e"]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/tpm/namespaces/documentation/tpm_categorys/category-sku-001'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:50:57 GMT
Vary: Accept-Encoding

{

}