ves-io-schema-dns_domain-API-Create

Examples of creating dns_domain

Usecase:

Create "example.com" dns_domain

Request using vesctl:

vesctl configuration create dns_domain -i dns_domain.yaml

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

metadata:
  name: example.com
  namespace: system
spec:
  volterraManaged: null

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: example.com
  namespace: system
spec: {}
systemMetadata:
  creationTimestamp: "2020-07-31T12:54:08.389785300Z"
  creatorClass: examplesvc.ves.io
  finalizers: []
  tenant: acmecorp
  uid: 04e54253-eb95-4b74-96e7-2f82cc358085

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"example.com","namespace":"system"},"spec":{"volterraManaged":null}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build896999001_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/dns_domains'

curl response:

HTTP/1.1 200 OK
Content-Length: 661
Content-Type: application/json
Date: Fri, 31 Jul 2020 12:54:08 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "example.com",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "04e54253-eb95-4b74-96e7-2f82cc358085",
    "creation_timestamp": "2020-07-31T12:54:08.389785300Z",
    "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": {
    "domain": "",
    "txt_record": "",
    "dnssec_mode": "DNSSEC_DISABLE"
  }
}