Skip to content

Commit 984e0a2

Browse files
authored
cli4: add page (#18788)
1 parent 8d909f6 commit 984e0a2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pages/common/cli4.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# cli4
2+
3+
> Python command-line interface for Cloudflare API.
4+
> More information: <https://github.com/cloudflare/python-cloudflare>.
5+
6+
- Display account information:
7+
8+
`cli4 {{/user}}`
9+
10+
- List all zones:
11+
12+
`cli4 {{/zones}}`
13+
14+
- List DNS records for a specific zone:
15+
16+
`cli4 {{/zones/:example.com/dns_records}}`
17+
18+
- Create a new DNS record:
19+
20+
`cli4 --post {{name=example.com}} {{type=A}} {{content=192.0.2.1}} {{/zones/:example.com/dns_records}}`
21+
22+
- Update an existing DNS record:
23+
24+
`cli4 --put {{name=sub.example.com}} {{type=A}} {{content=192.0.2.2}} {{/zones/:example.com/dns_records/:record_id}}`
25+
26+
- Delete a DNS record:
27+
28+
`cli4 --delete {{/zones/:example.com/dns_records/:record_id}}`
29+
30+
- Purge all cache for a zone:
31+
32+
`cli4 --post {{purge_everything=true}} {{/zones/:example.com/purge_cache}}`

0 commit comments

Comments
 (0)