All URIs are relative to https://localhost/api/v1
| Method | HTTP request | Description |
|---|---|---|
| create_tsig_key | POST /servers/{server_id}/tsigkeys | Add a TSIG key |
| delete_tsig_key | DELETE /servers/{server_id}/tsigkeys/{tsigkey_id} | Delete the TSIGKey with tsigkey_id |
| get_tsig_key | GET /servers/{server_id}/tsigkeys/{tsigkey_id} | Get a specific TSIGKeys on the server, including the actual key |
| list_tsig_keys | GET /servers/{server_id}/tsigkeys | Get all TSIGKeys on the server, except the actual key |
| put_tsig_key | PUT /servers/{server_id}/tsigkeys/{tsigkey_id} |
TSIGKey create_tsig_key(server_id, tsigkey)
Add a TSIG key
This methods add a new TSIGKey. The actual key can be generated by the server or be provided by the client
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server
tsigkey = powerdns_client.TSIGKey() # TSIGKey | The TSIGKey to add
try:
# Add a TSIG key
api_response = api_instance.create_tsig_key(server_id, tsigkey)
pprint(api_response)
except ApiException as e:
print("Exception when calling TsigkeyApi->create_tsig_key: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| server_id | str | The id of the server | |
| tsigkey | TSIGKey | The TSIGKey to add |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_tsig_key(server_id, tsigkey_id)
Delete the TSIGKey with tsigkey_id
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve the key from
tsigkey_id = 'tsigkey_id_example' # str | The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object
try:
# Delete the TSIGKey with tsigkey_id
api_instance.delete_tsig_key(server_id, tsigkey_id)
except ApiException as e:
print("Exception when calling TsigkeyApi->delete_tsig_key: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| server_id | str | The id of the server to retrieve the key from | |
| tsigkey_id | str | The id of the TSIGkey. Should match the "id" field in the TSIGKey object |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TSIGKey get_tsig_key(server_id, tsigkey_id)
Get a specific TSIGKeys on the server, including the actual key
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve the key from
tsigkey_id = 'tsigkey_id_example' # str | The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object
try:
# Get a specific TSIGKeys on the server, including the actual key
api_response = api_instance.get_tsig_key(server_id, tsigkey_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TsigkeyApi->get_tsig_key: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| server_id | str | The id of the server to retrieve the key from | |
| tsigkey_id | str | The id of the TSIGkey. Should match the "id" field in the TSIGKey object |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[TSIGKey] list_tsig_keys(server_id)
Get all TSIGKeys on the server, except the actual key
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server
try:
# Get all TSIGKeys on the server, except the actual key
api_response = api_instance.list_tsig_keys(server_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TsigkeyApi->list_tsig_keys: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| server_id | str | The id of the server |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TSIGKey put_tsig_key(server_id, tsigkey_id, tsigkey)
The TSIGKey at tsigkey_id can be changed in multiple ways: * Changing the Name, this will remove the key with tsigkey_id after adding. * Changing the Algorithm * Changing the Key Only the relevant fields have to be provided in the request body.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.TsigkeyApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve the key from
tsigkey_id = 'tsigkey_id_example' # str | The id of the TSIGkey. Should match the \"id\" field in the TSIGKey object
tsigkey = powerdns_client.TSIGKey() # TSIGKey | A (possibly stripped down) TSIGKey object with the new values
try:
api_response = api_instance.put_tsig_key(server_id, tsigkey_id, tsigkey)
pprint(api_response)
except ApiException as e:
print("Exception when calling TsigkeyApi->put_tsig_key: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| server_id | str | The id of the server to retrieve the key from | |
| tsigkey_id | str | The id of the TSIGkey. Should match the "id" field in the TSIGKey object | |
| tsigkey | TSIGKey | A (possibly stripped down) TSIGKey object with the new values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]