ves-io-schema-user_group-API-Create

Examples of creating user_group

Usecase:

Create user-group-1

Request using vesctl:

vesctl configuration create user_group -i user_group.yaml

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

metadata:
  name: user-group-1
  namespace: documentation
spec:
  displayName: test

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: user-group-1
  namespace: documentation
spec:
  displayName: test
systemMetadata:
  creationTimestamp: "2022-01-12T14:51:26.144840400Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: dcb5e069-4447-488c-8db3-4027d42ed24b

Request using curl:

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

curl response:

HTTP/1.1 200 OK
Content-Length: 623
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:51:26 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "user-group-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "dcb5e069-4447-488c-8db3-4027d42ed24b",
    "creation_timestamp": "2022-01-12T14:51:26.144840400Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "display_name": "test"
  }
}