Interface RecordOperations

All Known Implementing Classes:
RecordOperationsImpl

public interface RecordOperations
Fluent interface for getRecord-level operations. Provides a chainable API for CRUD operations on DNS records.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(RecordType type, String content, int ttl)
    Creates a new DNS getRecord with the specified parameters.
    void
    delete(RecordType... types)
    Deletes DNS records of the specified types.
    get()
    Retrieves DNS records for the selected subdomain.
    update(String newContent)
    Updates an existing DNS getRecord with new content.
  • Method Details

    • get

      Retrieves DNS records for the selected subdomain.
      Returns:
      a list of RecordEntity objects matching the criteria
      Throws:
      CloudflareApiException - if an error occurs while retrieving records
    • create

      RecordEntity create(RecordType type, String content, int ttl) throws CloudflareApiException
      Creates a new DNS getRecord with the specified parameters.
      Parameters:
      type - the DNS getRecord type (e.g., A, AAAA, CNAME)
      content - the content of the DNS getRecord (e.g., IP address)
      ttl - the time-to-live value in seconds
      Returns:
      the created RecordEntity
      Throws:
      CloudflareApiException - if an error occurs while creating the getRecord
    • update

      RecordEntity update(String newContent) throws CloudflareApiException
      Updates an existing DNS getRecord with new content.
      Parameters:
      newContent - the new content for the DNS getRecord
      Returns:
      the updated RecordEntity
      Throws:
      CloudflareApiException - if an error occurs while updating the getRecord
    • delete

      void delete(RecordType... types) throws CloudflareApiException
      Deletes DNS records of the specified types.
      Parameters:
      types - the DNS getRecord types to delete
      Throws:
      CloudflareApiException - if an error occurs while deleting records