Skip to content

Commit 9faf13b

Browse files
authored
Update record.py
1 parent 87cfe3f commit 9faf13b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

examples/dns/record.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
import os
22
import sys
3-
43
from cloudflare import Cloudflare
54

6-
75
zone_id = os.getenv("CLOUDFLARE_ZONE_ID")
86
if zone_id is None:
97
sys.exit("CLOUDFLARE_ZONE_ID is not defined")
108

11-
129
client = Cloudflare()
1310

14-
15-
# create dns using defined driver
1611
record = client.dns.records.create(
1712
zone_id=zone_id,
1813
type='CNAME',
1914
name="www.mydns.com",
2015
content="cname.example.com",
2116
proxied=False
22-
)
17+
)
2318

2419

25-
# print output
26-
print(record)
20+
# print(record)

0 commit comments

Comments
 (0)