ves-io-schema-views-tenant_configuration-API-Create

Examples of creating tenant_configuration

Usecase:

Create tenant-configuration-1

Request using vesctl:

vesctl configuration create tenant_configuration -i tenant_configuration.yaml

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

metadata:
  name: tenant-configuration-1
  namespace: documentation
spec:
  basicConfiguration: {}
  bruteForceDetectionSettings: {}
  passwordPolicy:
    minimumLength: 7

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: tenant-configuration-1
  namespace: documentation
spec:
  basicConfiguration: {}
  bruteForceDetectionSettings: {}
  passwordPolicy:
    minimumLength: 7
systemMetadata:
  creationTimestamp: "2021-05-12T11:19:12.393002797Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 58c71781-7e62-417d-8b7f-baae8d634c0e

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"tenant-configuration-1","namespace":"documentation"},"spec":{"basicConfiguration":{},"bruteForceDetectionSettings":{},"passwordPolicy":{"minimumLength":7}}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build672621555_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/tenant_configurations'

curl response:

HTTP/1.1 200 OK
Content-Length: 1004
Content-Type: application/json
Date: Wed, 12 May 2021 11:19:12 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "tenant-configuration-1",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "58c71781-7e62-417d-8b7f-baae8d634c0e",
    "creation_timestamp": "2021-05-12T11:19:12.393002797Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "basic_configuration": {
      "display_name": ""
    },
    "brute_force_detection_settings": {
      "max_login_failures": 0
    },
    "password_policy": {
      "digits": 0,
      "lowercase_characters": 0,
      "uppercase_characters": 0,
      "special_characters": 0,
      "not_username": false,
      "expire_password": 0,
      "not_recently_used": 0,
      "minimum_length": 7
    }
  }
}