MCPcopy Create free account
hub / github.com/cloudflare/cloudflared / delete_dns

Function delete_dns

component-tests/setup.py:91–96  ·  view source on GitHub ↗
(config, hostname)

Source from the content-addressed store, hash-verified

89
90@retry(stop_max_attempt_number=MAX_RETRIES, wait_fixed=BACKOFF_SECS * 1000)
91def delete_dns(config, hostname):
92 cf = CloudFlare.CloudFlare(debug=False, token=get_env("DNS_API_TOKEN"))
93 zone_tag = config["zone_tag"]
94 dns_records = cf.zones.dns_records.get(zone_tag, params={'name': hostname})
95 if len(dns_records) > 0:
96 cf.zones.dns_records.delete(zone_tag, dns_records[0]['id'])
97
98
99def write_file(content, path):

Callers 1

cleanupFunction · 0.85

Calls 3

get_envFunction · 0.85
getMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…