Avi DnsPolicy Object API

##CLI## ``` - configure dnspolicy - show dnspolicy ```
More information: https://avinetworks.com/contact-us
Contact Info: support@avinetworks.com
Version: 17.2.4
BasePath:/api
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. HTTP Basic Authentication

Methods

[ Jump to Models ]

Table of Contents

  1. get /dnspolicy
  2. post /dnspolicy
  3. delete /dnspolicy/{uuid}
  4. get /dnspolicy/{uuid}
  5. patch /dnspolicy/{uuid}
  6. put /dnspolicy/{uuid}
Up
get /dnspolicy
( dnspolicyGet)

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name
refers_to (optional)
Query Parameter — Filter to request all objects that refers to another Avi resource. Its syntax is refers_to=<obj_type>:<obj_uuid>. Eg. get all virtual services referring to pool p1 will be refers_to=pool:pool_p1_uuid
referred_by (optional)
Query Parameter — Filter to request all objects that are referred by another Avi resource. Its syntax is referred_by=<obj_type>:<obj_uuid>. Eg. get all pools referred_by virtual service vs1 - referred_by=virtualservice:vs_vs1_uuid
fields (optional)
Query Parameter — List of fields to be returned for the resource. Some fields like name, URL, uuid etc. are always returned.
include_name (optional)
Query Parameter — All the Avi REST reference URIs have a name suffix as URI#name. It is useful to get the referenced resource name without performing get on that object.
join_subresources (optional)
Query Parameter — It automatically returns additional dependent resources like runtime. Eg. join_subresources=runtime.

Return type

DnsPolicyApiResponse

Example data

Content-Type: application/json
{
  "count" : 123,
  "results" : [ {
    "tenant_ref" : "aeiou",
    "name" : "aeiou",
    "description" : "aeiou",
    "rule" : [ {
      "log" : true,
      "enable" : true,
      "match" : {
        "protocol" : {
          "match_criteria" : "aeiou",
          "protocol" : "aeiou"
        },
        "geo_location" : {
          "match_criteria" : "aeiou",
          "geolocation_tag" : "aeiou",
          "geolocation_name" : "aeiou",
          "use_edns_client_subnet_ip" : true
        },
        "query_name" : {
          "match_criteria" : "aeiou",
          "string_group_refs" : [ "aeiou" ],
          "query_domain_names" : [ "aeiou" ]
        },
        "client_ip" : {
          "group_refs" : [ "aeiou" ],
          "match_criteria" : "aeiou",
          "prefixes" : [ {
            "ip_addr" : "",
            "mask" : 123
          } ],
          "ranges" : [ {
            "end" : "",
            "begin" : ""
          } ],
          "addrs" : [ {
            "addr" : "aeiou",
            "type" : "aeiou"
          } ]
        },
        "client_ip_address" : {
          "use_edns_client_subnet_ip" : true,
          "client_ip" : ""
        },
        "query_type" : {
          "match_criteria" : "aeiou",
          "query_type" : [ "aeiou" ]
        }
      },
      "name" : "aeiou",
      "action" : {
        "allow" : {
          "allow" : true,
          "reset_conn" : true
        },
        "gslb_site_selection" : {
          "site_name" : "aeiou"
        },
        "response" : {
          "authoritative" : true,
          "rcode" : "aeiou",
          "truncation" : true
        }
      },
      "index" : 123
    } ],
    "created_by" : "aeiou",
    "uuid" : "aeiou",
    "url" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK DnsPolicyApiResponse

401

log in failed

Up
post /dnspolicy
( dnspolicyPost)

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — DnsPolicy object creation

Return type

DnsPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "description" : "aeiou",
  "rule" : [ {
    "log" : true,
    "enable" : true,
    "match" : {
      "protocol" : {
        "match_criteria" : "aeiou",
        "protocol" : "aeiou"
      },
      "geo_location" : {
        "match_criteria" : "aeiou",
        "geolocation_tag" : "aeiou",
        "geolocation_name" : "aeiou",
        "use_edns_client_subnet_ip" : true
      },
      "query_name" : {
        "match_criteria" : "aeiou",
        "string_group_refs" : [ "aeiou" ],
        "query_domain_names" : [ "aeiou" ]
      },
      "client_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ {
          "end" : "",
          "begin" : ""
        } ],
        "addrs" : [ {
          "addr" : "aeiou",
          "type" : "aeiou"
        } ]
      },
      "client_ip_address" : {
        "use_edns_client_subnet_ip" : true,
        "client_ip" : ""
      },
      "query_type" : {
        "match_criteria" : "aeiou",
        "query_type" : [ "aeiou" ]
      }
    },
    "name" : "aeiou",
    "action" : {
      "allow" : {
        "allow" : true,
        "reset_conn" : true
      },
      "gslb_site_selection" : {
        "site_name" : "aeiou"
      },
      "response" : {
        "authoritative" : true,
        "rcode" : "aeiou",
        "truncation" : true
      }
    },
    "index" : 123
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK DnsPolicy

401

log in failed

Up
delete /dnspolicy/{uuid}
( dnspolicyUuidDelete)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

204

object deleted String

404

not found

Up
get /dnspolicy/{uuid}
( dnspolicyUuidGet)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Query parameters

name (optional)
Query Parameter — object name
fields (optional)
Query Parameter — List of fields to be returned for the resource. Some fields like name, URL, uuid etc. are always returned.
include_name (optional)
Query Parameter — All the Avi REST reference URIs have a name suffix as URI#name. It is useful to get the referenced resource name without performing get on that object.
join_subresources (optional)
Query Parameter — It automatically returns additional dependent resources like runtime. Eg. join_subresources=runtime.

Return type

DnsPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "description" : "aeiou",
  "rule" : [ {
    "log" : true,
    "enable" : true,
    "match" : {
      "protocol" : {
        "match_criteria" : "aeiou",
        "protocol" : "aeiou"
      },
      "geo_location" : {
        "match_criteria" : "aeiou",
        "geolocation_tag" : "aeiou",
        "geolocation_name" : "aeiou",
        "use_edns_client_subnet_ip" : true
      },
      "query_name" : {
        "match_criteria" : "aeiou",
        "string_group_refs" : [ "aeiou" ],
        "query_domain_names" : [ "aeiou" ]
      },
      "client_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ {
          "end" : "",
          "begin" : ""
        } ],
        "addrs" : [ {
          "addr" : "aeiou",
          "type" : "aeiou"
        } ]
      },
      "client_ip_address" : {
        "use_edns_client_subnet_ip" : true,
        "client_ip" : ""
      },
      "query_type" : {
        "match_criteria" : "aeiou",
        "query_type" : [ "aeiou" ]
      }
    },
    "name" : "aeiou",
    "action" : {
      "allow" : {
        "allow" : true,
        "reset_conn" : true
      },
      "gslb_site_selection" : {
        "site_name" : "aeiou"
      },
      "response" : {
        "authoritative" : true,
        "rcode" : "aeiou",
        "truncation" : true
      }
    },
    "index" : 123
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK DnsPolicy

401

log in failed

Up
patch /dnspolicy/{uuid}
( dnspolicyUuidPatch)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — DnsPolicy object creation

Query parameters

name (optional)
Query Parameter — object name

Return type

DnsPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "description" : "aeiou",
  "rule" : [ {
    "log" : true,
    "enable" : true,
    "match" : {
      "protocol" : {
        "match_criteria" : "aeiou",
        "protocol" : "aeiou"
      },
      "geo_location" : {
        "match_criteria" : "aeiou",
        "geolocation_tag" : "aeiou",
        "geolocation_name" : "aeiou",
        "use_edns_client_subnet_ip" : true
      },
      "query_name" : {
        "match_criteria" : "aeiou",
        "string_group_refs" : [ "aeiou" ],
        "query_domain_names" : [ "aeiou" ]
      },
      "client_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ {
          "end" : "",
          "begin" : ""
        } ],
        "addrs" : [ {
          "addr" : "aeiou",
          "type" : "aeiou"
        } ]
      },
      "client_ip_address" : {
        "use_edns_client_subnet_ip" : true,
        "client_ip" : ""
      },
      "query_type" : {
        "match_criteria" : "aeiou",
        "query_type" : [ "aeiou" ]
      }
    },
    "name" : "aeiou",
    "action" : {
      "allow" : {
        "allow" : true,
        "reset_conn" : true
      },
      "gslb_site_selection" : {
        "site_name" : "aeiou"
      },
      "response" : {
        "authoritative" : true,
        "rcode" : "aeiou",
        "truncation" : true
      }
    },
    "index" : 123
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK DnsPolicy

401

log in failed

Up
put /dnspolicy/{uuid}
( dnspolicyUuidPut)

Path parameters

uuid (required)
Path Parameter — UUID of the object to fetch

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body (required)
Body Parameter — DnsPolicy object creation

Query parameters

name (optional)
Query Parameter — object name

Return type

DnsPolicy

Example data

Content-Type: application/json
{
  "tenant_ref" : "aeiou",
  "name" : "aeiou",
  "description" : "aeiou",
  "rule" : [ {
    "log" : true,
    "enable" : true,
    "match" : {
      "protocol" : {
        "match_criteria" : "aeiou",
        "protocol" : "aeiou"
      },
      "geo_location" : {
        "match_criteria" : "aeiou",
        "geolocation_tag" : "aeiou",
        "geolocation_name" : "aeiou",
        "use_edns_client_subnet_ip" : true
      },
      "query_name" : {
        "match_criteria" : "aeiou",
        "string_group_refs" : [ "aeiou" ],
        "query_domain_names" : [ "aeiou" ]
      },
      "client_ip" : {
        "group_refs" : [ "aeiou" ],
        "match_criteria" : "aeiou",
        "prefixes" : [ {
          "ip_addr" : "",
          "mask" : 123
        } ],
        "ranges" : [ {
          "end" : "",
          "begin" : ""
        } ],
        "addrs" : [ {
          "addr" : "aeiou",
          "type" : "aeiou"
        } ]
      },
      "client_ip_address" : {
        "use_edns_client_subnet_ip" : true,
        "client_ip" : ""
      },
      "query_type" : {
        "match_criteria" : "aeiou",
        "query_type" : [ "aeiou" ]
      }
    },
    "name" : "aeiou",
    "action" : {
      "allow" : {
        "allow" : true,
        "reset_conn" : true
      },
      "gslb_site_selection" : {
        "site_name" : "aeiou"
      },
      "response" : {
        "authoritative" : true,
        "rcode" : "aeiou",
        "truncation" : true
      }
    },
    "index" : 123
  } ],
  "created_by" : "aeiou",
  "uuid" : "aeiou",
  "url" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK DnsPolicy

401

log in failed

Up

Models

[ Jump to Methods ]

Table of Contents

  1. DnsClientIpMatch
  2. DnsGeoLocationMatch
  3. DnsPolicy
  4. DnsPolicyApiResponse
  5. DnsQueryNameMatch
  6. DnsQueryTypeMatch
  7. DnsRule
  8. DnsRuleAction
  9. DnsRuleActionAllowDrop
  10. DnsRuleActionGslbSiteSelection
  11. DnsRuleActionResponse
  12. DnsRuleMatchTarget
  13. DnsTransportProtocolMatch
  14. IpAddr
  15. IpAddrMatch
  16. IpAddrPrefix
  17. IpAddrRange

DnsClientIpMatch Up

client_ip
IpAddrMatch IP addresses to match against client IP. Field introduced in 17.1.6,17.2.2.
use_edns_client_subnet_ip (optional)
Boolean Use the IP address from the EDNS client subnet option, if available, as the source IP address of the client. It should be noted that the edns subnet IP may not be a /32 IP address. Field introduced in 17.1.6,17.2.2.

DnsGeoLocationMatch Up

geolocation_name (optional)
String Geographical location of the client IP to be used in the match. This location is of the format Country/State/City e.g. US/CA/Santa Clara. Field introduced in 17.1.5.
geolocation_tag (optional)
String Geolocation tag for the client IP. This could be any string value for the client IP, e.g. client IPs from US East Coast geolocation would be tagged as 'East Coast'. Field introduced in 17.1.5.
match_criteria
String Criterion to use for matching the client IP's geographical location. Enum options - IS_IN, IS_NOT_IN. Field introduced in 17.1.5.
use_edns_client_subnet_ip (optional)
Boolean Use the IP address from the EDNS client subnet option, if available, to derive geo location of the DNS query. Field introduced in 17.1.5.

DnsPolicy Up

created_by (optional)
String Creator name. Field introduced in 17.1.1.
description (optional)
String Field introduced in 17.1.1.
name
String Name of the DNS Policy. Field introduced in 17.1.1.
rule (optional)
array[DnsRule] DNS rules. Field introduced in 17.1.1.
tenant_ref (optional)
String It is a reference to an object of type Tenant. Field introduced in 17.1.1.
url (optional)
String url
uuid (optional)
String UUID of the DNS Policy. Field introduced in 17.1.1.

DnsPolicyApiResponse Up

count
Integer format: int32
results

DnsQueryNameMatch Up

match_criteria
String Criterion to use for string matching the DNS query domain name in the question section. Enum options - BEGINS_WITH, DOES_NOT_BEGIN_WITH, CONTAINS, DOES_NOT_CONTAIN, ENDS_WITH, DOES_NOT_END_WITH, EQUALS, DOES_NOT_EQUAL, REGEX_MATCH, REGEX_DOES_NOT_MATCH. Field introduced in 17.1.1.
query_domain_names (optional)
array[String] Domain name to match against that specified in the question section of the DNS query. Field introduced in 17.1.1.
string_group_refs (optional)
array[String] UUID of the string group(s) for matching against DNS query domain name in the question section. It is a reference to an object of type StringGroup. Field introduced in 17.1.1.

DnsQueryTypeMatch Up

match_criteria
String Criterion to use for matching the DNS query typein the question section. Enum options - IS_IN, IS_NOT_IN. Field introduced in 17.1.1.
query_type (optional)
array[String] DNS query types in the request query . Enum options - DNS_RECORD_OTHER, DNS_RECORD_A, DNS_RECORD_NS, DNS_RECORD_CNAME, DNS_RECORD_SOA, DNS_RECORD_PTR, DNS_RECORD_HINFO, DNS_RECORD_MX, DNS_RECORD_TXT, DNS_RECORD_RP, DNS_RECORD_DNSKEY, DNS_RECORD_AAAA, DNS_RECORD_SRV, DNS_RECORD_OPT, DNS_RECORD_RRSIG, DNS_RECORD_AXFR, DNS_RECORD_ANY. Field introduced in 17.1.1.

DnsRule Up

action (optional)
DnsRuleAction Action to be performed upon successful matching. Field introduced in 17.1.1.
enable (optional)
Boolean Enable or disable the rule. Field introduced in 17.1.1.
index
Integer Index of the rule. Field introduced in 17.1.1. format: int32
log (optional)
Boolean Log DNS query upon rule match. Field introduced in 17.1.1.
match (optional)
DnsRuleMatchTarget Add match criteria to the rule. Field introduced in 17.1.1.
name
String Name of the rule. Field introduced in 17.1.1.

DnsRuleAction Up

allow (optional)
DnsRuleActionAllowDrop Allow or drop the DNS query. Field introduced in 17.1.1.
gslb_site_selection (optional)
DnsRuleActionGslbSiteSelection Select a specific GSLB site for the DNS query. This action should be used only when GSLB services have been configured for the DNS virtual service. Field introduced in 17.1.5.
response (optional)
DnsRuleActionResponse Generate a response for the DNS query. Field introduced in 17.1.1.

DnsRuleActionAllowDrop Up

allow (optional)
Boolean Allow the DNS query. Field introduced in 17.1.1.
reset_conn (optional)
Boolean Reset the TCP connection of the DNS query, if allow is set to false to drop the query. Field introduced in 17.1.1.

DnsRuleActionGslbSiteSelection Up

site_name (optional)
String GSLB site name. Field introduced in 17.1.5.

DnsRuleActionResponse Up

authoritative (optional)
Boolean DNS response is authoritative. Field introduced in 17.1.1.
rcode (optional)
String DNS response code. Enum options - DNS_RCODE_NOERROR, DNS_RCODE_FORMERR, DNS_RCODE_SERVFAIL, DNS_RCODE_NXDOMAIN, DNS_RCODE_NOTIMP, DNS_RCODE_REFUSED, DNS_RCODE_YXDOMAIN, DNS_RCODE_YXRRSET, DNS_RCODE_NXRRSET, DNS_RCODE_NOTAUTH, DNS_RCODE_NOTZONE. Field introduced in 17.1.1.
truncation (optional)
Boolean DNS response is truncated. Field introduced in 17.1.1.

DnsRuleMatchTarget Up

client_ip (optional)
IpAddrMatch IP addresses to match against client IP. From 17.1.6 release onwards, IP addresses needs to be configured in the client_ip_address field of this message. Field deprecated in 17.1.6,17.2.2. Field introduced in 17.1.1.
client_ip_address (optional)
DnsClientIpMatch IP addresses to match against client IP or the EDNS client subnet IP. Field introduced in 17.1.6,17.2.2.
geo_location (optional)
DnsGeoLocationMatch Geographical location attribute to match against that of the client IP. Field introduced in 17.1.5.
protocol (optional)
DnsTransportProtocolMatch DNS transport protocol match. Field introduced in 17.1.1.
query_name (optional)
DnsQueryNameMatch Domain names to match against query name. Field introduced in 17.1.1.
query_type (optional)
DnsQueryTypeMatch DNS query types to match against request query type. Field introduced in 17.1.1.

DnsTransportProtocolMatch Up

match_criteria
String Criterion to use for matching the DNS transport protocol. Enum options - IS_IN, IS_NOT_IN. Field introduced in 17.1.1.
protocol
String Protocol to match against transport protocol used by DNS query. Enum options - DNS_OVER_UDP, DNS_OVER_TCP. Field introduced in 17.1.1.

IpAddr Up

addr
String IP address.
type
String Enum options - V4, DNS.

IpAddrMatch Up

addrs (optional)
array[IpAddr] IP address(es).
group_refs (optional)
array[String] UUID of IP address group(s). It is a reference to an object of type IpAddrGroup.
match_criteria
String Criterion to use for IP address matching the HTTP request. Enum options - IS_IN, IS_NOT_IN.
prefixes (optional)
array[IpAddrPrefix] IP address prefix(es).
ranges (optional)
array[IpAddrRange] IP address range(s).

IpAddrPrefix Up

ip_addr
IpAddr Placeholder for description of property ip_addr of obj type IpAddrPrefix field type str type object
mask
Integer Number of mask. format: int32

IpAddrRange Up

begin
IpAddr Starting IP address of the range.
end
IpAddr Ending IP address of the range.