Skip to content

Commit

Permalink
Update record.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Jul 31, 2024
1 parent 87cfe3f commit 9faf13b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions examples/dns/record.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
import os
import sys

from cloudflare import Cloudflare


zone_id = os.getenv("CLOUDFLARE_ZONE_ID")
if zone_id is None:
sys.exit("CLOUDFLARE_ZONE_ID is not defined")


client = Cloudflare()


# create dns using defined driver
record = client.dns.records.create(
zone_id=zone_id,
type='CNAME',
name="www.mydns.com",
content="cname.example.com",
proxied=False
)
)


# print output
print(record)
# print(record)

0 comments on commit 9faf13b

Please sign in to comment.