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:

metadata:
  annotations: {}
  labels:
    ves.io/app_type: bookinfo
  name: productpage
  namespace: documentation
referringObjects: []
resourceVersion: "1164"
spec:
  advertisePolicies:
  - kind: advertise_policy
    name: ppage-advertise
    namespace: documentation
    tenant: acmecorp
  customErrors: {}
  dnsInfo: []
  domains:
  - www.bookinfo.com
  noChallenge: {}
  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>
  userIdentification: []
status: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:35.297708835Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: ad0faf98-3e31-4f48-9a22-0c3e6bccf165

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_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: Wed, 25 Aug 2021 09:04:35 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1164",
  "metadata": {
    "name": "productpage",
    "namespace": "documentation",
    "labels": {
      "ves.io/app_type": "bookinfo"
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "ad0faf98-3e31-4f48-9a22-0c3e6bccf165",
    "creation_timestamp": "2021-08-25T09:04:35.297708835Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "domains": [
      "www.bookinfo.com"
    ],
    "routes": [
      {
        "kind": "route",
        "uid": "",
        "tenant": "acmecorp",
        "namespace": "documentation",
        "name": "ppage-route"
      }
    ],
    "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"
              },
              "blindfold_secret_info_internal": null,
              "secret_encoding_type": "EncodingNone"
            },
            "description": ""
          }
        ],
        "trusted_ca_url": "",
        "validation_params": null
      },
      "require_client_certificate": false
    },
    "type": "VIRTUAL_SERVICE",
    "buffer_policy": null,
    "cors_policy": null,
    "proxy": "HTTPS_PROXY",
    "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,
    "no_challenge": {

    },
    "user_identification": [
    ],
    "rate_limiter": [
    ],
    "rate_limiter_allowed_prefixes": [
    ],
    "retry_policy": null,
    "idle_timeout": 0,
    "temporary_user_blocking": null,
    "state": "VIRTUAL_HOST_READY",
    "host_name": "",
    "dns_info": [
    ],
    "auto_cert_state": "AutoCertDisabled",
    "auto_cert_info": null,
    "disable_dns_resolve": false
  },
  "status": [
  ],
  "referring_objects": [
  ]
}