CfDnsClient is a client interface to interact with Cloudflare DNS service. It allows managing DNS
records and zones within the Cloudflare system, including creating, updating, retrieving, and
- deleting DNS records.
+ deleting DNS records.
+
+
Example:
+
+ // Create a new CfDnsClient instance
+ CfDnsClient client = new CfDnsClient(
+ "email@example.com",
+ "yourApiKey",
+ "yourApiToken"
+ );
+
+ // Retrieve a zone
+ ZoneEntity zone = cfDnsClient.zoneInfo("example.com");
+ System.out.println("Zone ID: " + zone.getId());
+
+ // Retrieve records of a zone
+ List records = cfDnsClient.sldListAll(zone, "sld");
+ records.forEach(record ->
+ System.out.println("Record Type: " + record.getType() + ", Value: " + record.getContent())
+ );
+