ves-io-schema-dns_zone-API-Create

Examples of creating dns_zone

Usecase:

Create "example.com" dns_zone

Request using vesctl:

vesctl configuration create dns_zone -i dns_zone.yaml

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

metadata:
  name: example.com
  namespace: system
spec:
  primary:
    defaultSoaParameters: null
    rrSetGroup: []

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: example.com
  namespace: system
spec: {}
systemMetadata:
  creationTimestamp: "2021-08-25T09:02:57.499663793Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 359c1cef-9bba-4195-9258-c18290039270

Request using curl:

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

curl response:

HTTP/1.1 200 OK
Content-Length: 605
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:02:57 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "example.com",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "359c1cef-9bba-4195-9258-c18290039270",
    "creation_timestamp": "2021-08-25T09:02:57.499663793Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "domain": ""
  }
}