We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d04dfee commit 8a53a40Copy full SHA for 8a53a40
examples/dns/record.py
@@ -0,0 +1,26 @@
1
+from cloudflare import Cloudflare
2
+
3
4
+# define your variable here
5
6
+cloudflare_token = "your-cloudflare-token"
7
+cloudflare_zone_id = "zone"
8
+alias_name = "www.mydns.com"
9
+cannonical_name = "cname.example.com"
10
11
+# build cloudflare driver here
12
+client = Cloudflare(api_token=cloudflare_token)
13
14
15
16
+# create dns using defined driver
17
+dns = client.dns.records.create(
18
+ zone_id=cloudflare_zone_id,
19
+ type='CNAME',
20
+ name=alias_name,
21
+ content=cannonical_name,
22
+ proxied=False
23
+ )
24
25
+# print output
26
+print(dns)
0 commit comments