Socket
Socket
Sign inDemoInstall

ionoscloud-dns

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ionoscloud-dns

Python SDK for the ionoscloud-dns API


Maintainers
1

Readme

Gitter Quality Gate Status Bugs Maintainability Rating Reliability Rating Security Rating Vulnerabilities Release Release Date PyPI version

Alt text

Python API client for ionoscloud_dns

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

Overview

The IONOS Cloud SDK for Python provides you with access to the IONOS Cloud API. The client library supports both simple and complex requests. It is designed for developers who are building applications in Python. All API operations are performed over SSL and authenticated using your IONOS Cloud portal credentials. The API can be accessed within an instance running in IONOS Cloud or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.

Installation & Usage

Requirements:

  • Python >= 3.5

pip install

Since this package is hosted on Pypi you can install it by using:

pip install ionoscloud-dns

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

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

Note: you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python-dns.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

NOTE: The Python SDK does not support Python 2. It only supports Python >= 3.5.

Authentication

The username and password or the authentication token can be manually specified when initializing the SDK client:

configuration = ionoscloud_dns.Configuration(
                username='YOUR_USERNAME',
                password='YOUR_PASSWORD',
                token='YOUR_TOKEN'
                )
client = ionoscloud_dns.ApiClient(configuration)

Environment variables can also be used. This is an example of how one would do that:

import os

configuration = ionoscloud_dns.Configuration(
                username=os.environ.get('IONOS_USERNAME'),
                password=os.environ.get('IONOS_PASSWORD'),
                token=os.environ.get('IONOS_TOKEN')
                )
client = ionoscloud_dns.ApiClient(configuration)

Warning: Make sure to follow the Information Security Best Practices when using credentials within your code or storing them in a file.

HTTP proxies

You can use http proxies by setting the following environment variables:

  • IONOS_HTTP_PROXY - proxy URL
  • IONOS_HTTP_PROXY_HEADERS - proxy headers

Each line in IONOS_HTTP_PROXY_HEADERS represents one header, where the header name and value is separated by a colon. Newline characters within a value need to be escaped. See this example:

Connection: Keep-Alive
User-Info: MyID
User-Group: my long\nheader value

Changing the base URL

Base URL for the HTTP operation can be changed in the following way:

import os

configuration = ionoscloud_dns.Configuration(
                username=os.environ.get('IONOS_USERNAME'),
                password=os.environ.get('IONOS_PASSWORD'),
                host=os.environ.get('IONOS_API_URL'),
                server_index=None,
                )
client = ionoscloud_dns.ApiClient(configuration)

Certificate pinning:

You can enable certificate pinning if you want to bypass the normal certificate checking procedure, by doing the following:

Set env variable IONOS_PINNED_CERT=<insert_sha256_public_fingerprint_here>

You can get the sha256 fingerprint most easily from the browser by inspecting the certificate.

Documentation for API Endpoints

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

API Endpoints table
ClassMethodHTTP requestDescription
DNSSECApizones_keys_deleteDELETE /zones/{zoneId}/keysDelete a DNSSEC key
DNSSECApizones_keys_getGET /zones/{zoneId}/keysRetrieve a DNSSEC key
DNSSECApizones_keys_postPOST /zones/{zoneId}/keysCreate a DNSSEC key
QuotaApiquota_getGET /quotaRetrieve resources quota
RecordsApirecords_getGET /recordsRetrieve all records from primary zones
RecordsApisecondaryzones_records_getGET /secondaryzones/{secondaryZoneId}/recordsRetrieve records for a secondary zone
RecordsApizones_records_deleteDELETE /zones/{zoneId}/records/{recordId}Delete a record
RecordsApizones_records_find_by_idGET /zones/{zoneId}/records/{recordId}Retrieve a record
RecordsApizones_records_getGET /zones/{zoneId}/recordsRetrieve records
RecordsApizones_records_postPOST /zones/{zoneId}/recordsCreate a record
RecordsApizones_records_putPUT /zones/{zoneId}/records/{recordId}Update a record
ReverseRecordsApireverserecords_deleteDELETE /reverserecords/{reverserecordId}Delete a reverse DNS record
ReverseRecordsApireverserecords_find_by_idGET /reverserecords/{reverserecordId}Retrieve a reverse DNS record
ReverseRecordsApireverserecords_getGET /reverserecordsRetrieves existing reverse DNS records
ReverseRecordsApireverserecords_postPOST /reverserecordsCreate a reverse DNS record
ReverseRecordsApireverserecords_putPUT /reverserecords/{reverserecordId}Update a reverse DNS record
SecondaryZonesApisecondaryzones_axfr_getGET /secondaryzones/{secondaryZoneId}/axfrGet status of zone transfer
SecondaryZonesApisecondaryzones_axfr_putPUT /secondaryzones/{secondaryZoneId}/axfrStart zone transfer
SecondaryZonesApisecondaryzones_deleteDELETE /secondaryzones/{secondaryZoneId}Delete a secondary zone
SecondaryZonesApisecondaryzones_find_by_idGET /secondaryzones/{secondaryZoneId}Retrieve a secondary zone
SecondaryZonesApisecondaryzones_getGET /secondaryzonesRetrieve secondary zones
SecondaryZonesApisecondaryzones_postPOST /secondaryzonesCreate a secondary zone
SecondaryZonesApisecondaryzones_putPUT /secondaryzones/{secondaryZoneId}Update a secondary zone
ZoneFilesApizones_zonefile_getGET /zones/{zoneId}/zonefileRetrieve a zone file
ZoneFilesApizones_zonefile_putPUT /zones/{zoneId}/zonefileUpdates a zone with a file
ZonesApizones_deleteDELETE /zones/{zoneId}Delete a zone
ZonesApizones_find_by_idGET /zones/{zoneId}Retrieve a zone
ZonesApizones_getGET /zonesRetrieve zones
ZonesApizones_postPOST /zonesCreate a zone
ZonesApizones_putPUT /zones/{zoneId}Update a zone

Documentation For Models

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

API models list

[Back to API list] [Back to Model list]

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc