RRsets
Create RRset
Add the RRSet to the zone specified by zoneName, RRSets can be configured to be either dynamic or static.
### Static RRsets
Staticly configured RRSets provide DNS responses as is.
### Dynamic RRsets
Dynamic RRSets have picker configuration defined thus it's possible to finely customize DNS response.
Picking rules are defined on the RRSet level as a list of selectors, filters and mutators.
Picker considers different resource records metadata, requestor IP, and other event-feeds like monitoring.
Picker configuration is an ordered list defined by "pickers" attribute.
Requestor IP is determined by EDNS Client Subnet (ECS) if defined, otherwise - by client/recursor IP.
Selector pickers are used in the specified order until the first match, in case of match - all next selectors
are bypassed. Filters or mutators are applied to the match according to the order they are specified.
For example, sort records by proximity to user, shuffle based on weights and return not more than 3:
`"pickers":
[
{ "type": "geodistance" },
{ "type": "`weighted_shuffle`" },
{ "type": "`first_n`", "limit": 3 }
]`
#### geodns filter
A resource record is included in the answer if resource record's metadata matches requestor info.
For each resource record in RRSet, the following metadata is considered (in the order specified):
+ `ip` - list of network addresses in CIDR format, e.g. `["192.168.15.150/25", "2003:de:2016::/48"]`;
+ `asn` - list of autonomous system numbers, e.g. `[1234, 5678]`;
+ `regions` - list of region codes, e.g. `["de-bw", "de-by"]`;
+ `countries` - list of country codes, e.g. `["de", "lu", "lt"]`;
+ `continents` - list of continent codes, e.g. `["af", "an", "eu", "as", "na", "sa", "oc"]`.
If there is a record (or multiple) with metadata matched IP, it's used as a response. If not - asn,
then country and then continent are checked for a match. If there is no match, then the behaviour
is defined by _strict_ parameter of the filter.
Example: `"pickers": [ { "type": "geodns", "strict": true } ]`
##### Strict parameter
`strict: true` means that if no records percolate through the geodns filter it returns no answers.
`strict: false` means that if no records percolate through the geodns filter, all records are passed over.
#### asn selector
Resource records which ASN metadata matches ASN of the requestor are picked by this selector,
and passed to the next non-selector picker, if there is no match - next configured picker starts with all records.
Example: `"pickers": [ {"type": "asn"} ]`
#### country selector
Resource records which country metadata matches country of the requestor are picked by this selector,
and passed to the next non-selector picker, if there is no match - next configured picker starts with all records.
Example: `"pickers": [ { "type": "country" } ]`
#### continent selector
Resource records which continent metadata matches continent of the requestor are picked by this selector,
and passed to the next non-selector picker, if there is no match - next configured picker starts with all records.
Example: `"pickers": [ { "type": "continent" } ]`
#### region selector
Resource records which region metadata matches region of the requestor are picked by this selector,
and passed to the next non-selector picker, if there is no match - next configured picker starts with all records.
e.g. `fr-nor` for France/Normandy.
Example: `"pickers": [ { "type": "region" } ]`
#### ip selector
Resource records which IP metadata matches IP of the requestor are picked by this selector,
and passed to the next non-selector picker, if there is no match - next configured picker starts with all records.
Maximum 100 subnets are allowed to specify in meta of RR.
Example: `"pickers": [ { "type": "ip" } ]`
#### default selector
When enabled, records marked as default are selected: `"meta": {"default": true}`.
Example:
`"pickers":
[
{ "type": "geodns", "strict": false },
{ "type": "default" },
{ "type": "`first_n`", "limit": 2 }
]`
#### geodistance mutator
The resource records are rearranged in ascending order based on the distance (in meters) from requestor to
the coordinates specified in latlong metadata. Distance is calculated using Haversine formula.
The "nearest" to the user's IP RR goes first. The records without latlong metadata come last.
e.g. for Berlin `[52.520008, 13.404954]`.;
In this configuration the only "nearest" to the requestor record to be returned:
`"pickers": [ { "type": "geodistance" }, { "type": "`first_n`", "limit": 1 } ]`
#### `weighted_shuffle` mutator
The resource records are rearranged in random order based on the `weight` metadata.
Default weight (if not specified) is 50.
Example: `"pickers": [ { "type": "`weighted_shuffle`" } ]`
#### `first_n` filter
Slices first N (N specified as a limit parameter value) resource records.
Example: `"pickers": [ { "type": "`first_n`", "limit": 1 } ]` returns only the first resource record.
##### limit parameter
Can be a positive value for a specific limit. Use zero or leave it blank to indicate no limits.
POST
Authorizations
API key for authentication.
Body
application/json
Response
200
application/json
OutputRRSet
The response is of type object
.