ves-io-schema-namespace_role-API-Replace

Examples of replacing namespace_role

Usecase:

Replace namespace-role-1

Request using vesctl:

vesctl configuration replace namespace_role -i namespace_role.yaml

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

metadata:
  name: namespace-role-1
  namespace: documentation
spec:
  role:
  - kind: role
    name: marketing
  user:
  - kind: user
    name: alice

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"namespace-role-1","namespace":"documentation"},"spec":{"user":[{"kind":"user","name":"alice"}],"role":[{"kind":"role","name":"marketing"}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build185306297_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/web/namespaces/documentation/namespace_roles/namespace-role-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 19 Oct 2020 09:48:44 GMT
Vary: Accept-Encoding

{

}