import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
zone = client.dns.zones.get(
"name",
)
print(zone.zone){
"Zone": {
"client_id": 123,
"contact": "<string>",
"dnssec_enabled": true,
"expiry": 123,
"id": 123,
"meta": {},
"name": "<string>",
"nx_ttl": 123,
"primary_server": "<string>",
"records": [
{
"name": "<string>",
"short_answers": [
"<string>"
],
"ttl": 123,
"type": "<string>"
}
],
"refresh": 123,
"retry": 123,
"rrsets_amount": {
"dynamic": {
"healthcheck": 123,
"total": 123
},
"static": 123,
"total": 123
},
"serial": 123,
"status": "<string>"
}
}Zone info by zone name.
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
zone = client.dns.zones.get(
"name",
)
print(zone.zone){
"Zone": {
"client_id": 123,
"contact": "<string>",
"dnssec_enabled": true,
"expiry": 123,
"id": 123,
"meta": {},
"name": "<string>",
"nx_ttl": 123,
"primary_server": "<string>",
"records": [
{
"name": "<string>",
"short_answers": [
"<string>"
],
"ttl": 123,
"type": "<string>"
}
],
"refresh": 123,
"retry": 123,
"rrsets_amount": {
"dynamic": {
"healthcheck": 123,
"total": 123
},
"static": 123,
"total": 123
},
"serial": 123,
"status": "<string>"
}
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
ItemZoneResponse
Complete zone info with all records included
OutputZone
Show child attributes
email address of the administrator responsible for this zone
describe dnssec status true means dnssec is enabled for the zone false means dnssec is disabled for the zone
number of seconds after which secondary name servers should stop answering request for this zone
ID of zone. This field usually is omitted in response and available only in case of getting deleted zones by admin.
arbitrarily data of zone in json format
name of DNS zone
Time To Live of cache
primary master name server for zone
number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.
number of seconds after which secondary name servers should retry to request the serial number
Show child attributes
Amount of static RRsets in zone
Total amount of RRsets in zone
Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.
Was this page helpful?