ves-io-schema-virtual_host-API-Get

Examples of getting virtual_host

Usecase:

Get "productpage" virtual_host that was created in previous example

Request using vesctl:

vesctl configuration get virtual_host productpage --namespace documentation

vesctl yaml response:

object:
  metadata:
    annotations: {}
    labels:
      ves.io/app_type: bookinfo
    name: productpage
    namespace: documentation
    uid: c9633ec0-c180-4c06-b9b4-699a4705b65f
  spec:
    gcSpec:
      advertisePolicies:
      - kind: advertise_policy
        name: ppage-advertise
        namespace: documentation
        tenant: acmecorp
      customErrors: {}
      dnsDomains: []
      dnsInfo: []
      domains:
      - www.bookinfo.com
      jwt: []
      proxy: HTTPS_PROXY
      rateLimiter: []
      rateLimiterAllowedPrefixes: []
      requestHeadersToAdd: []
      requestHeadersToRemove: []
      responseHeadersToAdd: []
      responseHeadersToRemove: []
      routes:
      - kind: route
        name: ppage-route
        namespace: documentation
        tenant: acmecorp
      tlsParameters:
        commonParams:
          cipherSuites: []
          tlsCertificates:
          - certificateUrl: string:///<Base64>
            privateKey:
              blindfoldSecretInfo:
                location: string:///<Base64>
          trustedCaUrl: string:///<Base64>
        requireClientCertificate: true
      userIdentification: []
  systemMetadata:
    creationTimestamp: "2020-07-02T15:53:40.114258100Z"
    creatorClass: examplesvc.ves.io
    finalizers: []
    namespace:
    - kind: namespace
      name: documentation
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 2c15b097dad22ab5:2c15b097dad22ab5:0:1
    uid: c9633ec0-c180-4c06-b9b4-699a4705b65f
resourceVersion: "658"
status: []

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/virtual_hosts/productpage?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:40 GMT
Vary: Accept-Encoding

{
  "object": {
    "metadata": {
      "name": "productpage",
      "namespace": "documentation",
      "uid": "c9633ec0-c180-4c06-b9b4-699a4705b65f",
      "labels": {
        "ves.io/app_type": "bookinfo"
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "c9633ec0-c180-4c06-b9b4-699a4705b65f",
      "creation_timestamp": "2020-07-02T15:53:40.114258100Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc.ves.io",
      "creator_id": "",
      "creator_cookie": "",
      "trace_info": "2c15b097dad22ab5:2c15b097dad22ab5:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "documentation"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "domains": [
          "www.bookinfo.com"
        ],
        "routes": [
          {
            "kind": "route",
            "uid": "",
            "tenant": "acmecorp",
            "namespace": "documentation",
            "name": "ppage-route"
          }
        ],
        "javascript_info": null,
        "advertise_policies": [
          {
            "kind": "advertise_policy",
            "uid": "",
            "tenant": "acmecorp",
            "namespace": "documentation",
            "name": "ppage-advertise"
          }
        ],
        "request_headers_to_add": [
        ],
        "response_headers_to_add": [
        ],
        "request_headers_to_remove": [
        ],
        "response_headers_to_remove": [
        ],
        "tls_parameters": {
          "common_params": {
            "minimum_protocol_version": "TLS_AUTO",
            "maximum_protocol_version": "TLS_AUTO",
            "cipher_suites": [
            ],
            "tls_certificates": [
              {
                "certificate_url": "string:///\u003cBase64\u003e",
                "private_key": {
                  "blindfold_secret_info": {
                    "decryption_provider": "",
                    "store_provider": "",
                    "location": "string:///\u003cBase64\u003e"
                  },
                  "secret_encoding_type": "EncodingNone"
                },
                "description": ""
              }
            ],
            "trusted_ca_url": "string:///\u003cBase64\u003e",
            "validation_params": null
          },
          "require_client_certificate": true
        },
        "type": "VIRTUAL_SERVICE",
        "buffer_policy": null,
        "cors_policy": null,
        "proxy": "HTTPS_PROXY",
        "jwt": [
        ],
        "waf_type": null,
        "dynamic_reverse_proxy": null,
        "add_location": false,
        "compression_params": null,
        "custom_errors": {
        },
        "disable_default_error_pages": false,
        "max_request_header_size": 0,
        "user_identification": [
        ],
        "rate_limiter": [
        ],
        "rate_limiter_allowed_prefixes": [
        ],
        "retry_policy": null,
        "dns_domains": [
        ],
        "auto_cert": false,
        "state": "VIRTUAL_HOST_READY",
        "host_name": "",
        "dns_info": [
        ],
        "idle_timeout": 0,
        "auto_cert_state": "AutoCertDisabled"
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "658",
  "metadata": null,
  "system_metadata": null,
  "spec": null,
  "status": [
  ]
}