We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d04dfee + 0471f80 commit 2998e58Copy full SHA for 2998e58
1 file changed
examples/dns/record.py
@@ -0,0 +1,20 @@
1
+import os
2
+import sys
3
+
4
+from cloudflare import Cloudflare
5
6
+zone_id = os.getenv("CLOUDFLARE_ZONE_ID")
7
+if zone_id is None:
8
+ sys.exit("CLOUDFLARE_ZONE_ID is not defined")
9
10
+client = Cloudflare()
11
12
+record = client.dns.records.create(
13
+ zone_id=zone_id,
14
+ type='CNAME',
15
+ name="www.mydns.com",
16
+ content="cname.example.com",
17
+ proxied=False
18
+)
19
20
+# print(record)
0 commit comments