- Home
- API Enriched
- Dns
- config
- Replace DNS Proxy.
Replace DNS Proxy.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/dns_proxys/example';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"metadata":{"annotations":{},"description":"example","disable":true,"labels":{},"name":"example","namespace":"example"},"spec":{"cache_profile":{"cache_size":1,"disable_cache_profile":{}},"ddos_profile":{"disable_ddos_mitigation":{},"enable_ddos_mitigation":{}},"irules":[{"name":"example","namespace":"example"}],"lb_algorithm":{"round_robin":{}},"origin_servers":{"health_checks":{"health_check":[{"dns_health_check":{"expected_rcode":"DNS_RES_RCODE_NOERROR","expected_record_type":"DNS_REQUESTED_QUERY_TYPE","expected_response":"example","query_name":"example","query_type":"DNS_QTYPE_A","reverse":true},"icmp_health_check":{},"tcp_health_check":{"expected_response":"example","send_payload":"example"}}],"healthy_threshold":1,"interval":1,"timeout":1,"unhealthy_threshold":1},"origin_servers":[{"k8s_service":{"inside_network":{},"outside_network":{},"protocol":"PROTOCOL_TCP","service_name":"example","site_locator":{"site":{"name":"example","namespace":"example"},"virtual_site":{"name":"example","namespace":"example"}},"snat_pool":{"no_snat_pool":{},"snat_pool":{"prefixes":["example"]}},"vk8s_networks":{}},"no_preference":{},"public_ip":{"ip":"example"},"public_name":{"dns_name":"example","refresh_interval":1},"site_preferences":{"refs":[{"name":"example","namespace":"example"}]}}]},"protocol_inspection":{"name":"example","namespace":"example"},"proxy_advertisement":{"advertise_custom":{"advertise_where":[{"advertise_on_public":{"public_ip":{"name":"example","namespace":"example"}},"port":1,"port_ranges":"example","site":{"ip":"example","network":"SITE_NETWORK_INSIDE_AND_OUTSIDE","site":{"name":"example","namespace":"example"}},"use_default_port":{},"virtual_network":{"default_v6_vip":{},"default_vip":{},"specific_v6_vip":"example","specific_vip":"example","virtual_network":{"name":"example","namespace":"example"}},"virtual_site":{"network":"SITE_NETWORK_INSIDE_AND_OUTSIDE","virtual_site":{"name":"example","namespace":"example"}},"virtual_site_with_vip":{"ip":"example","network":"SITE_NETWORK_SPECIFIED_VIP_OUTSIDE","virtual_site":{"name":"example","namespace":"example"}},"vk8s_service":{"site":{"name":"example","namespace":"example"},"virtual_site":{"name":"example","namespace":"example"}}}]},"advertise_on_public":{"public_ip":{"name":"example","namespace":"example"}},"advertise_on_public_default_vip":{},"do_not_advertise":{}},"transport_type":"UDP"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/dns_proxys/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "metadata": { "annotations": {}, "description": "example", "disable": true, "labels": {}, "name": "example", "namespace": "example" }, "spec": { "cache_profile": { "cache_size": 1, "disable_cache_profile": {} }, "ddos_profile": { "disable_ddos_mitigation": {}, "enable_ddos_mitigation": {} }, "irules": [ { "name": "example", "namespace": "example" } ], "lb_algorithm": { "round_robin": {} }, "origin_servers": { "health_checks": { "health_check": [ { "dns_health_check": { "expected_rcode": "DNS_RES_RCODE_NOERROR", "expected_record_type": "DNS_REQUESTED_QUERY_TYPE", "expected_response": "example", "query_name": "example", "query_type": "DNS_QTYPE_A", "reverse": true }, "icmp_health_check": {}, "tcp_health_check": { "expected_response": "example", "send_payload": "example" } } ], "healthy_threshold": 1, "interval": 1, "timeout": 1, "unhealthy_threshold": 1 }, "origin_servers": [ { "k8s_service": { "inside_network": {}, "outside_network": {}, "protocol": "PROTOCOL_TCP", "service_name": "example", "site_locator": { "site": { "name": "example", "namespace": "example" }, "virtual_site": { "name": "example", "namespace": "example" } }, "snat_pool": { "no_snat_pool": {}, "snat_pool": { "prefixes": [ "example" ] } }, "vk8s_networks": {} }, "no_preference": {}, "public_ip": { "ip": "example" }, "public_name": { "dns_name": "example", "refresh_interval": 1 }, "site_preferences": { "refs": [ { "name": "example", "namespace": "example" } ] } } ] }, "protocol_inspection": { "name": "example", "namespace": "example" }, "proxy_advertisement": { "advertise_custom": { "advertise_where": [ { "advertise_on_public": { "public_ip": { "name": "example", "namespace": "example" } }, "port": 1, "port_ranges": "example", "site": { "ip": "example", "network": "SITE_NETWORK_INSIDE_AND_OUTSIDE", "site": { "name": "example", "namespace": "example" } }, "use_default_port": {}, "virtual_network": { "default_v6_vip": {}, "default_vip": {}, "specific_v6_vip": "example", "specific_vip": "example", "virtual_network": { "name": "example", "namespace": "example" } }, "virtual_site": { "network": "SITE_NETWORK_INSIDE_AND_OUTSIDE", "virtual_site": { "name": "example", "namespace": "example" } }, "virtual_site_with_vip": { "ip": "example", "network": "SITE_NETWORK_SPECIFIED_VIP_OUTSIDE", "virtual_site": { "name": "example", "namespace": "example" } }, "vk8s_service": { "site": { "name": "example", "namespace": "example" }, "virtual_site": { "name": "example", "namespace": "example" } } } ] }, "advertise_on_public": { "public_ip": { "name": "example", "namespace": "example" } }, "advertise_on_public_default_vip": {}, "do_not_advertise": {} }, "transport_type": "UDP" } }'Replace DNS Proxy in a given namespace.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace This defines the workspace within which each the configuration object is to be created. Must be a DNS_LABEL format. For a namespace object itself, namespace value will be ""
Name The configuration object to be replaced will be looked up by name.
Request Bodyrequired
Section titled “Request Bodyrequired”This is the input message of the ‘Replace’ RPC.
object
object
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
object
Human readable description for the object.
A value of true will administratively disable the object.
Map of string keys and values that can be used to organize and categorize (scope and select) objects as chosen by the user. Values specified here will be used by selector expression.
object
This is the name of configuration object. It has to be unique within the namespace. It can only be specified during create API and cannot be changed during replace API. The value of name has to follow DNS-1035 format. Required: YES.
This defines the workspace within which each the configuration object is to be created. Must be a DNS_LABEL format. For a namespace object itself, namespace value will be ""
object
object
Exclusive with [disable_cache_profile] cache size.
object
object
object
object
OPTIONS for attaching iRules to DNS proxy.
This type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
object
object
List of Health Checks
Required: YES.
Server Health Check.
object
object
Specifies an IPv4 or IPv6 address in the answer section of DNS Response Required: YES.
The query name that the monitor sends a DNS query for. Required: YES.
Enable the monitor operation in reverse mode. When the monitor is in reverse mode, a successful receive string match marks the monitored object down instead of up.
object
object
Specifies a regular expression pattern which will be matched against response payload Required: YES.
Text string sent in the request Required: YES.
Number of successful responses before declaring healthy. In other words, this is the number of healthy health checks required before a host is marked healthy. Note that during startup, only a single successful health check is required to mark a host healthy. Required: YES.
Time interval in seconds between two healthcheck requests. Required: YES.
Timeout in seconds to wait for successful response. In other words, it is the time to wait for a health check response. If the timeout is reached the health check attempt will be considered a failure. Required: YES.
Number of failed responses before declaring unhealthy. In other words, this is the number of unhealthy health checks required before a host is marked unhealthy. Note that for HTTP health checking if a host responds with 503 this threshold is ignored and the host is considered unhealthy immediately. Required: YES.
List of origin servers for Proxy
Required: YES.
Origin Server.
object
object
object
object
Exclusive with [] K8s service name of the origin server will be listed, including the namespace and cluster-ID. For vK8s services, you need to enter a string with the format servicename.namespace:cluster-ID. If the servicename is “frontend”, namespace is “speedtest” and cluster-ID is “prod”, then you will enter “frontend.speedtest:prod”. Both namespace and cluster-ID are optional.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
object
List of IPv4 prefixes that represent an endpoint.
object
object
object
Exclusive with [] Public IPv4 address.
object
DNS Name Required: YES.
Interval for DNS refresh in seconds. Max value is 7 days as per https://datatracker.ietf.org/doc/HTML/rfc8767.
object
Reference to one or more sites.
This type establishes a direct reference from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
Where should this load balancer be available
Required: YES.
This defines various OPTIONS where a Loadbalancer could be advertised.
object
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
Exclusive with [port_ranges use_default_port] Port to Listen.
Exclusive with [port use_default_port] A string containing a comma separated list of port ranges. Each port range consists of a single port or two ports separated by ”-”.
object
Use given IP address as VIP on the site.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
object
object
Exclusive with [default_v6_vip] Use given IPv6 address as VIP on virtual Network.
Exclusive with [default_vip] Use given IPv4 address as VIP on virtual Network.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
Use given IP address as VIP on the site.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name. Required: YES.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
object
object
Responses
Section titled “Responses”A successful response.
object
Examplegenerated
{}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example