ves-io-schema-views-http_loadbalancer-CustomAPI-GetDnsInfo

Examples of performing viewshttploadbalancer CustomAPI GetDnsInfo

Usecase:

Perform GetDnsInfo on http_loadbalancer

Request:

Request using vesctl:

vesctl request rpc views_http_loadbalancer.CustomAPI.GetDnsInfo -i request.yaml --uri /public/namespaces/namespace-literal/http_loadbalancers/name-literal/get-dns-info --http-method GET

where file request.yaml has following contents:

{}

vesctl yaml response:

dnsInfo:
  dnsInfo:
  - ipAddress: 1.1.1.1
  hostName: example.com
  virtualHost:
  - kind: virtual_host
    name: virtual-host-1
    namespace: default
    tenant: customer1

Request using curl:

curl -X 'GET' -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/namespace-literal/http_loadbalancers/name-literal/get-dns-info?name=&namespace='

curl response:

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

{
  "dns_info": {
    "virtual_host": [
      {
        "kind": "virtual_host",
        "uid": "",
        "tenant": "customer1",
        "namespace": "default",
        "name": "virtual-host-1"
      }
    ],
    "host_name": "example.com",
    "dns_info": [
      {
        "ip_address": "1.1.1.1"
      }
    ]
  }
}