import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
rrsets = client.dns.zones.rrsets.list(
zone_name="zoneName",
)
print(rrsets.rrsets){
"rrsets": [
{
"name": "sub.example.com",
"resource_records": [
{
"content": [
{}
],
"enabled": true,
"id": 42,
"meta": {}
}
],
"type": "A",
"filter_set_id": 123,
"meta": {},
"pickers": [
{
"type": "geodns",
"limit": 123,
"strict": true
}
],
"ttl": 123,
"updated_at": "2023-11-07T05:31:56Z",
"warning": "<string>",
"warnings": [
{
"key": "<string>",
"message": "<string>"
}
]
}
],
"total_amount": 123
}List of RRset.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
rrsets = client.dns.zones.rrsets.list(
zone_name="zoneName",
)
print(rrsets.rrsets){
"rrsets": [
{
"name": "sub.example.com",
"resource_records": [
{
"content": [
{}
],
"enabled": true,
"id": 42,
"meta": {}
}
],
"type": "A",
"filter_set_id": 123,
"meta": {},
"pickers": [
{
"type": "geodns",
"limit": 123,
"strict": true
}
],
"ttl": 123,
"updated_at": "2023-11-07T05:31:56Z",
"warning": "<string>",
"warnings": [
{
"key": "<string>",
"message": "<string>"
}
]
}
],
"total_amount": 123
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Amount of records to skip before beginning to write in response.
Max number of records in response
Field name to sort by
Ascending or descending order
asc, desc ListRRSetResponse
Show child attributes
"sub.example.com"
List of resource record from rrset
Show child attributes
Content of resource record The exact length of the array depends on the type of rrset, each individual record parameter must be a separate element of the array. For example
[100, 1, 5061, "example.com"][ "the.target.domain" ][ "1.2.3.4", "5.6.7.8" ][ "2001:db8::1", "2001:db8::2" ][ "mail1.example.com", "mail2.example.com" ][ 1, ".", ["alpn", "h3", "h2"], [ "port", 1443 ], [ "ipv4hint", "10.0.0.1" ], [ "ech", "AEn+DQBFKwAgACABWIHUGj4u+PIggYXcR5JF0gYk3dCRioBW8uJq9H4mKAAIAAEAAQABAANAEnB1YmxpYy50bHMtZWNoLmRldgAA" ] ]42
Meta information for record Map with string key and any valid json as value, with valid keys
asn (array of int)continents (array of string)countries (array of string)latlong (array of float64, latitude and longitude)fallback (bool)backup (bool)notes (string)weight (float)ip (string)Some keys are reserved for balancing, @see https://api.gcore.com/dns/v2/info/meta
This meta will be used to decide which resource record should pass through filters from the filter set
Show child attributes
RRSet type
A, AAAA, NS, CNAME, MX, TXT, SRV, SOA Meta information for rrset. Map with string key and any valid json as value, with valid keys
failover (object, beta feature, might be changed in the future) can have fields
1.1. protocol (string, required, HTTP, TCP, UDP, ICMP)
1.2. port (int, required, 1-65535)
1.3. frequency (int, required, in seconds 10-3600)
1.4. timeout (int, required, in seconds 1-10),
1.5. method (string, only for protocol=HTTP)
1.6. command (string, bytes to be sent only for protocol=TCP/UDP)
1.7. url (string, only for protocol=HTTP)
1.8. tls (bool, only for protocol=HTTP)
1.9. regexp (string regex to match, only for non-ICMP)
1.10. http_status_code (int, only for protocol=HTTP)
1.11. host (string, only for protocol=HTTP)geodns_link (string) - name of the geodns link to use, if previously set, must re-send when updating or
CDN integration will be removed for this RRSetShow child attributes
{}Set of pickers
Show child attributes
Filter type
geodns, asn, country, continent, region, ip, geodistance, weighted_shuffle, default, first_n Limits the number of records returned by the filter Can be a positive value for a specific limit. Use zero or leave it blank to indicate no limits.
if strict=false, then the filter will return all records if no records match the filter
Timestamp marshals/unmarshals date and time as timestamp in json
Warning about some possible side effects without strictly disallowing operations on rrset readonly Deprecated: use Warnings instead
Was this page helpful?