# 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](https://openapi-generator.tech) project:

- API version: 1.17.0
- Package version: 2.0.0-beta.1
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://docs.ionos.com/support/general-information/contact-information](https://docs.ionos.com/support/general-information/contact-information)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

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

```sh
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:
```python
import ionoscloud_dns
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import ionoscloud_dns
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

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**](docs/api/DNSSECApi.md#zones_keys_delete) | **DELETE** /zones/{zoneId}/keys | Delete a DNSSEC key
*DNSSECApi* | [**zones_keys_get**](docs/api/DNSSECApi.md#zones_keys_get) | **GET** /zones/{zoneId}/keys | Retrieve a DNSSEC key
*DNSSECApi* | [**zones_keys_post**](docs/api/DNSSECApi.md#zones_keys_post) | **POST** /zones/{zoneId}/keys | Create a DNSSEC key
*QuotaApi* | [**quota_get**](docs/api/QuotaApi.md#quota_get) | **GET** /quota | Retrieve resources quota
*RecordsApi* | [**records_get**](docs/api/RecordsApi.md#records_get) | **GET** /records | Retrieve all records from primary zones
*RecordsApi* | [**secondaryzones_records_get**](docs/api/RecordsApi.md#secondaryzones_records_get) | **GET** /secondaryzones/{secondaryZoneId}/records | Retrieve records for a secondary zone
*RecordsApi* | [**zones_records_delete**](docs/api/RecordsApi.md#zones_records_delete) | **DELETE** /zones/{zoneId}/records/{recordId} | Delete a record
*RecordsApi* | [**zones_records_find_by_id**](docs/api/RecordsApi.md#zones_records_find_by_id) | **GET** /zones/{zoneId}/records/{recordId} | Retrieve a record
*RecordsApi* | [**zones_records_get**](docs/api/RecordsApi.md#zones_records_get) | **GET** /zones/{zoneId}/records | Retrieve records
*RecordsApi* | [**zones_records_post**](docs/api/RecordsApi.md#zones_records_post) | **POST** /zones/{zoneId}/records | Create a record
*RecordsApi* | [**zones_records_put**](docs/api/RecordsApi.md#zones_records_put) | **PUT** /zones/{zoneId}/records/{recordId} | Update a record
*ReverseRecordsApi* | [**reverserecords_delete**](docs/api/ReverseRecordsApi.md#reverserecords_delete) | **DELETE** /reverserecords/{reverserecordId} | Delete a reverse DNS record
*ReverseRecordsApi* | [**reverserecords_find_by_id**](docs/api/ReverseRecordsApi.md#reverserecords_find_by_id) | **GET** /reverserecords/{reverserecordId} | Retrieve a reverse DNS record
*ReverseRecordsApi* | [**reverserecords_get**](docs/api/ReverseRecordsApi.md#reverserecords_get) | **GET** /reverserecords | Retrieves existing reverse DNS records
*ReverseRecordsApi* | [**reverserecords_post**](docs/api/ReverseRecordsApi.md#reverserecords_post) | **POST** /reverserecords | Create a reverse DNS record
*ReverseRecordsApi* | [**reverserecords_put**](docs/api/ReverseRecordsApi.md#reverserecords_put) | **PUT** /reverserecords/{reverserecordId} | Update a reverse DNS record
*SecondaryZonesApi* | [**secondaryzones_axfr_get**](docs/api/SecondaryZonesApi.md#secondaryzones_axfr_get) | **GET** /secondaryzones/{secondaryZoneId}/axfr | Get status of zone transfer
*SecondaryZonesApi* | [**secondaryzones_axfr_put**](docs/api/SecondaryZonesApi.md#secondaryzones_axfr_put) | **PUT** /secondaryzones/{secondaryZoneId}/axfr | Start zone transfer
*SecondaryZonesApi* | [**secondaryzones_delete**](docs/api/SecondaryZonesApi.md#secondaryzones_delete) | **DELETE** /secondaryzones/{secondaryZoneId} | Delete a secondary zone
*SecondaryZonesApi* | [**secondaryzones_find_by_id**](docs/api/SecondaryZonesApi.md#secondaryzones_find_by_id) | **GET** /secondaryzones/{secondaryZoneId} | Retrieve a secondary zone
*SecondaryZonesApi* | [**secondaryzones_get**](docs/api/SecondaryZonesApi.md#secondaryzones_get) | **GET** /secondaryzones | Retrieve secondary zones
*SecondaryZonesApi* | [**secondaryzones_post**](docs/api/SecondaryZonesApi.md#secondaryzones_post) | **POST** /secondaryzones | Create a secondary zone
*SecondaryZonesApi* | [**secondaryzones_put**](docs/api/SecondaryZonesApi.md#secondaryzones_put) | **PUT** /secondaryzones/{secondaryZoneId} | Update a secondary zone
*ZoneFilesApi* | [**zones_zonefile_get**](docs/api/ZoneFilesApi.md#zones_zonefile_get) | **GET** /zones/{zoneId}/zonefile | Retrieve a zone file
*ZoneFilesApi* | [**zones_zonefile_put**](docs/api/ZoneFilesApi.md#zones_zonefile_put) | **PUT** /zones/{zoneId}/zonefile | Updates a zone with a file
*ZonesApi* | [**zones_delete**](docs/api/ZonesApi.md#zones_delete) | **DELETE** /zones/{zoneId} | Delete a zone
*ZonesApi* | [**zones_find_by_id**](docs/api/ZonesApi.md#zones_find_by_id) | **GET** /zones/{zoneId} | Retrieve a zone
*ZonesApi* | [**zones_get**](docs/api/ZonesApi.md#zones_get) | **GET** /zones | Retrieve zones
*ZonesApi* | [**zones_post**](docs/api/ZonesApi.md#zones_post) | **POST** /zones | Create a zone
*ZonesApi* | [**zones_put**](docs/api/ZonesApi.md#zones_put) | **PUT** /zones/{zoneId} | Update a zone


## Documentation For Models

 - [Algorithm](docs/models/Algorithm.md)
 - [CommonZone](docs/models/CommonZone.md)
 - [CommonZoneRead](docs/models/CommonZoneRead.md)
 - [CommonZoneReadList](docs/models/CommonZoneReadList.md)
 - [DnssecKey](docs/models/DnssecKey.md)
 - [DnssecKeyCreate](docs/models/DnssecKeyCreate.md)
 - [DnssecKeyParameters](docs/models/DnssecKeyParameters.md)
 - [DnssecKeyReadCreation](docs/models/DnssecKeyReadCreation.md)
 - [DnssecKeyReadList](docs/models/DnssecKeyReadList.md)
 - [DnssecKeyReadListMetadata](docs/models/DnssecKeyReadListMetadata.md)
 - [DnssecKeyReadListProperties](docs/models/DnssecKeyReadListProperties.md)
 - [DnssecKeyReadListPropertiesKeyParameters](docs/models/DnssecKeyReadListPropertiesKeyParameters.md)
 - [DnssecKeyReadListPropertiesNsecParameters](docs/models/DnssecKeyReadListPropertiesNsecParameters.md)
 - [Error](docs/models/Error.md)
 - [ErrorMessagesInner](docs/models/ErrorMessagesInner.md)
 - [KeyData](docs/models/KeyData.md)
 - [KeyParameters](docs/models/KeyParameters.md)
 - [KskBits](docs/models/KskBits.md)
 - [Links](docs/models/Links.md)
 - [Metadata](docs/models/Metadata.md)
 - [MetadataForSecondaryZoneRecords](docs/models/MetadataForSecondaryZoneRecords.md)
 - [MetadataWithStateFqdnZoneId](docs/models/MetadataWithStateFqdnZoneId.md)
 - [MetadataWithStateNameservers](docs/models/MetadataWithStateNameservers.md)
 - [NsecMode](docs/models/NsecMode.md)
 - [NsecParameters](docs/models/NsecParameters.md)
 - [ProvisioningState](docs/models/ProvisioningState.md)
 - [Quota](docs/models/Quota.md)
 - [QuotaDetail](docs/models/QuotaDetail.md)
 - [Record](docs/models/Record.md)
 - [RecordCreate](docs/models/RecordCreate.md)
 - [RecordEnsure](docs/models/RecordEnsure.md)
 - [RecordRead](docs/models/RecordRead.md)
 - [RecordReadList](docs/models/RecordReadList.md)
 - [RecordType](docs/models/RecordType.md)
 - [ReverseRecord](docs/models/ReverseRecord.md)
 - [ReverseRecordCreate](docs/models/ReverseRecordCreate.md)
 - [ReverseRecordEnsure](docs/models/ReverseRecordEnsure.md)
 - [ReverseRecordRead](docs/models/ReverseRecordRead.md)
 - [ReverseRecordsReadList](docs/models/ReverseRecordsReadList.md)
 - [SecondaryZone](docs/models/SecondaryZone.md)
 - [SecondaryZoneCreate](docs/models/SecondaryZoneCreate.md)
 - [SecondaryZoneEnsure](docs/models/SecondaryZoneEnsure.md)
 - [SecondaryZoneRead](docs/models/SecondaryZoneRead.md)
 - [SecondaryZoneReadList](docs/models/SecondaryZoneReadList.md)
 - [SecondaryZoneRecordRead](docs/models/SecondaryZoneRecordRead.md)
 - [SecondaryZoneRecordReadList](docs/models/SecondaryZoneRecordReadList.md)
 - [SecondaryZoneRecordReadListMetadata](docs/models/SecondaryZoneRecordReadListMetadata.md)
 - [Zone](docs/models/Zone.md)
 - [ZoneCreate](docs/models/ZoneCreate.md)
 - [ZoneEnsure](docs/models/ZoneEnsure.md)
 - [ZoneRead](docs/models/ZoneRead.md)
 - [ZoneReadList](docs/models/ZoneReadList.md)
 - [ZoneTransferPrimaryIpStatus](docs/models/ZoneTransferPrimaryIpStatus.md)
 - [ZoneTransferPrimaryIpsStatus](docs/models/ZoneTransferPrimaryIpsStatus.md)
 - [ZskBits](docs/models/ZskBits.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="tokenAuth"></a>
### tokenAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Author

support@cloud.ionos.com


