Comments (2)
The proxied
parameter for dns_records
can be set to true
or false
. Here's some examples which show when it can be used.
Pardon the redacted zone name; but first set the zone name:
$ ZONE="██████████████████.com"
$
Creating a simple A
record; notice the proxiable
value is `true. This is key to understand.
$ cli4 --post name="example-0" type="A" content="52.52.1.1" /zones/:${ZONE}/dns_records
{
...
"name": "example-0.██████████████████.com",
"proxiable": true,
"proxied": false,
...
}
$
If we do the same; but with a private IP space A
record. Notice the proxiable
value is false
.
$ cli4 --post name="example-1" type="A" content="192.168.1.1" proxied=false /zones/:${ZONE}/dns_records
{
...
"name": "example-1.██████████████████.com",
"proxiable": false,
"proxied": false,
...
}
$
This is becuase you can't proxy into a private IP space address.
We can see an error, if we try to set the proxied
flag to true
$ cli4 --post name="example-2" type="A" content="192.168.1.1" proxied=true /zones/:${ZONE}/dns_records
cli4: /zones/:██████████████████.com/dns_records - 1004 DNS Validation Error
$
This is the error you maybe seeing.
Here is a successful use of the proxied` flag.
$ cli4 --post name="example-2" type="A" content="52.52.1.1" proxied=true /zones/:${ZONE}/dns_records
{
...
"name": "example-2.██████████████████.com",
"proxiable": true,
"proxied": true,
...
}
$
While these are written with the cli4
command; it's the same affect as calling the Python library.
from python-cloudflare.
The
proxied
parameter fordns_records
can be set totrue
orfalse
. Here's some examples which show when it can be used.Pardon the redacted zone name; but first set the zone name:
$ ZONE="██████████████████.com" $
Creating a simple
A
record; notice theproxiable
value is `true. This is key to understand.$ cli4 --post name="example-0" type="A" content="52.52.1.1" /zones/:${ZONE}/dns_records { ... "name": "example-0.██████████████████.com", "proxiable": true, "proxied": false, ... } $
If we do the same; but with a private IP space
A
record. Notice theproxiable
value isfalse
.$ cli4 --post name="example-1" type="A" content="192.168.1.1" proxied=false /zones/:${ZONE}/dns_records { ... "name": "example-1.██████████████████.com", "proxiable": false, "proxied": false, ... } $
This is becuase you can't proxy into a private IP space address.
We can see an error, if we try to set the
proxied
flag totrue
$ cli4 --post name="example-2" type="A" content="192.168.1.1" proxied=true /zones/:${ZONE}/dns_records cli4: /zones/:██████████████████.com/dns_records - 1004 DNS Validation Error $
This is the error you maybe seeing.
Here is a successful use of the proxied` flag.
$ cli4 --post name="example-2" type="A" content="52.52.1.1" proxied=true /zones/:${ZONE}/dns_records { ... "name": "example-2.██████████████████.com", "proxiable": true, "proxied": true, ... } $
While these are written with the
cli4
command; it's the same affect as calling the Python library.
I just wasted 3 hours of testing because I tried to do just that from the example on the CF API "198.51.100.4" and "192.168.0.1":
This is because you can't proxy into a private IP space address.
Just this sentence saved me from my headaches, and after reading it I was like "Yeah make sense".
So thanks for it, but I believe this should have been helpful to got it from the doc or from the error message instead of the general "CloudFlare.exceptions.CloudFlareAPIError: DNS Validation Error"
from python-cloudflare.
Related Issues (20)
- Deposit
- How to access R2 storage to perform CRUD on Bucket and Objects HOT 3
- Token authentication fails when using python-cloudflare versions above 2.8.15 HOT 8
- python-cloudflare is not PEP-561 aware HOT 2
- UnicodeDecodeError: 'gbk' codec can't decode byte 0x88 in position 16820: illegal multibyte sequence HOT 2
- HTTP method calls should be able to define content-header (headers) HOT 6
- Image error: /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tests/__init__.py HOT 8
- 1012 Request must contain one of "purge_everything", "files", "tags", "hosts" or "prefixes" HOT 8
- Change WAF Custom Rule with wrong position HOT 1
- Get code and message from CloudFlare.exceptions.CloudFlareAPIError HOT 7
- CloudFlareError does not evaluate to true if there are no chained errors HOT 7
- Bad request for direct image upload HOT 6
- Regression in 2.18.0 HOT 8
- Would like to be able to pass in my own HTTP headers HOT 11
- Docs: Provide information on how arguments are mapped to API paths HOT 6
- URL creation doesn't ensure strings for parameters HOT 3
- Is max_requests_retries still valid? HOT 2
- Deprecate support for python3.5 HOT 3
- Possible error in README example HOT 2
- ModuleNotFoundError: No module named 'CloudFlare' after cloudflare dependency update HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-cloudflare.