ves-io-schema-namespace_role-API-Create

Examples of creating namespace_role

Usecase:

Create namespace-role-1

Request using vesctl:

vesctl configuration create namespace_role -i namespace_role.yaml

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

metadata:
  name: namespace-role-1
  namespace: documentation
spec: {}

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: namespace-role-1
  namespace: documentation
spec:
  role: []
  user: []
systemMetadata:
  creationTimestamp: "2020-05-15T10:52:46.612729716Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: f68bf868-bf2f-4fd0-b50c-8f25324bbaa0

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"namespace-role-1","namespace":"documentation"},"spec":{}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/web/namespaces/documentation/namespace_roles'

curl response:

HTTP/1.1 200 OK
Content-Length: 659
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:46 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "namespace-role-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "f68bf868-bf2f-4fd0-b50c-8f25324bbaa0",
    "creation_timestamp": "2020-05-15T10:52:46.612729716Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc.ves.io",
    "creator_id": "",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "user": [
    ],
    "role": [
    ],
    "namespace": ""
  }
}