Skip to content

ionos-cloud/sdk-python-dns

Repository files navigation

ionoscloud-dns

Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/ionos-cloud/sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python.git)

Then import the package:

import ionoscloud_dns

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ionoscloud_dns

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ionoscloud_dns
from ionoscloud_dns.rest import ApiException
from pprint import pprint
import os

# Defining the host is optional and defaults to https://dns.de-fra.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_dns.Configuration(
    host = "https://dns.de-fra.ionos.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with ionoscloud_dns.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_dns.DNSSECApi(api_client)
    zone_id = 'zone_id_example' # str | The ID (UUID) of the DNS zone.

    try:
        # Delete a DNSSEC key
        api_response = api_instance.zones_keys_delete(zone_id)
        print("The response of DNSSECApi->zones_keys_delete:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DNSSECApi->zones_keys_delete: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://dns.de-fra.ionos.com

Class Method HTTP request Description
DNSSECApi zones_keys_delete DELETE /zones/{zoneId}/keys Delete a DNSSEC key
DNSSECApi zones_keys_get GET /zones/{zoneId}/keys Retrieve a DNSSEC key
DNSSECApi zones_keys_post POST /zones/{zoneId}/keys Create a DNSSEC key
QuotaApi quota_get GET /quota Retrieve resources quota
RecordsApi records_get GET /records Retrieve all records from primary zones
RecordsApi secondaryzones_records_get GET /secondaryzones/{secondaryZoneId}/records Retrieve records for a secondary zone
RecordsApi zones_records_delete DELETE /zones/{zoneId}/records/{recordId} Delete a record
RecordsApi zones_records_find_by_id GET /zones/{zoneId}/records/{recordId} Retrieve a record
RecordsApi zones_records_get GET /zones/{zoneId}/records Retrieve records
RecordsApi zones_records_post POST /zones/{zoneId}/records Create a record
RecordsApi zones_records_put PUT /zones/{zoneId}/records/{recordId} Update a record
ReverseRecordsApi reverserecords_delete DELETE /reverserecords/{reverserecordId} Delete a reverse DNS record
ReverseRecordsApi reverserecords_find_by_id GET /reverserecords/{reverserecordId} Retrieve a reverse DNS record
ReverseRecordsApi reverserecords_get GET /reverserecords Retrieves existing reverse DNS records
ReverseRecordsApi reverserecords_post POST /reverserecords Create a reverse DNS record
ReverseRecordsApi reverserecords_put PUT /reverserecords/{reverserecordId} Update a reverse DNS record
SecondaryZonesApi secondaryzones_axfr_get GET /secondaryzones/{secondaryZoneId}/axfr Get status of zone transfer
SecondaryZonesApi secondaryzones_axfr_put PUT /secondaryzones/{secondaryZoneId}/axfr Start zone transfer
SecondaryZonesApi secondaryzones_delete DELETE /secondaryzones/{secondaryZoneId} Delete a secondary zone
SecondaryZonesApi secondaryzones_find_by_id GET /secondaryzones/{secondaryZoneId} Retrieve a secondary zone
SecondaryZonesApi secondaryzones_get GET /secondaryzones Retrieve secondary zones
SecondaryZonesApi secondaryzones_post POST /secondaryzones Create a secondary zone
SecondaryZonesApi secondaryzones_put PUT /secondaryzones/{secondaryZoneId} Update a secondary zone
ZoneFilesApi zones_zonefile_get GET /zones/{zoneId}/zonefile Retrieve a zone file
ZoneFilesApi zones_zonefile_put PUT /zones/{zoneId}/zonefile Updates a zone with a file
ZonesApi zones_delete DELETE /zones/{zoneId} Delete a zone
ZonesApi zones_find_by_id GET /zones/{zoneId} Retrieve a zone
ZonesApi zones_get GET /zones Retrieve zones
ZonesApi zones_post POST /zones Create a zone
ZonesApi zones_put PUT /zones/{zoneId} Update a zone

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

[email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •