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 dns_domain.yaml has following contents (dns_domain.CreateRequest):

RequestJSON:

{
    "metadata": {
        "name": "example.com",
        "namespace": "system"
    },
    "spec": {
        "volterra_managed": null
    }
}

vesctl yaml response:

ResponseJSON:

{
    "metadata": {
        "name": "example.com",
        "namespace": "system",
        "labels": {},
        "annotations": {},
        "description": "",
        "disable": false
    },
    "system_metadata": {
        "uid": "644874e4-1c49-46ce-af3f-3a93c6201443",
        "creation_timestamp": "2022-09-23T13:11:56.057980989Z",
        "deletion_timestamp": null,
        "modification_timestamp": null,
        "initializers": null,
        "finalizers": [],
        "tenant": "acmecorp",
        "creator_class": "examplesvc",
        "creator_id": "examplesvc",
        "object_index": 0,
        "owner_view": null,
        "labels": {}
    },
    "spec": {
        "domain": "",
        "txt_record": "",
        "dnssec_mode": "DNSSEC_DISABLE"
    }
}

Request using curl:

curl -X 'POST' -d '{"metadata":{"name":"example.com","namespace":"system"},"spec":{"volterra_managed":null}}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build243329498_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: 687
Content-Type: application/json
Date: Fri, 23 Sep 2022 13:11:56 GMT
Vary: Accept-Encoding

{
  "metadata": {
    "name": "example.com",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "644874e4-1c49-46ce-af3f-3a93c6201443",
    "creation_timestamp": "2022-09-23T13:11:56.057980989Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null,
    "labels": {
    }
  },
  "spec": {
    "domain": "",
    "txt_record": "",
    "dnssec_mode": "DNSSEC_DISABLE"
  }
}