Skip to content

Latest commit

 

History

History
308 lines (225 loc) · 12.8 KB

NameserverApi.md

File metadata and controls

308 lines (225 loc) · 12.8 KB

swagger_client.NameserverApi

All URIs are relative to http://0.0.0.0/v2

Method HTTP request Description
create_nameserver POST /services/haproxy/configuration/nameservers Add a nameserver
delete_nameserver DELETE /services/haproxy/configuration/nameservers/{name} Delete a nameserver
get_nameserver GET /services/haproxy/configuration/nameservers/{name} Return a nameserver
get_nameservers GET /services/haproxy/configuration/nameservers Return an array of nameservers
replace_nameserver PUT /services/haproxy/configuration/nameservers/{name} Replace a nameserver

create_nameserver

Nameserver create_nameserver(body, resolver, transaction_id=transaction_id, version=version, force_reload=force_reload)

Add a nameserver

Adds a new nameserver to the resolvers section.

Example

from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = dataplaneapi.NameserverApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Nameserver() # Nameserver | 
resolver = 'resolver_example' # str | Parent resolver name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)

try:
    # Add a nameserver
    api_response = api_instance.create_nameserver(body, resolver, transaction_id=transaction_id, version=version, force_reload=force_reload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NameserverApi->create_nameserver: %s\n" % e)

Parameters

Name Type Description Notes
body Nameserver
resolver str Parent resolver name
transaction_id str ID of the transaction where we want to add the operation. Cannot be used when version is specified. [optional]
version int Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. [optional]
force_reload bool If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. [optional] [default to false]

Return type

Nameserver

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_nameserver

delete_nameserver(name, resolver, transaction_id=transaction_id, version=version, force_reload=force_reload)

Delete a nameserver

Deletes a nameserver from the resolvers section by it's name.

Example

from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = dataplaneapi.NameserverApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Nameserver name
resolver = 'resolver_example' # str | Parent resolver name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)

try:
    # Delete a nameserver
    api_instance.delete_nameserver(name, resolver, transaction_id=transaction_id, version=version, force_reload=force_reload)
except ApiException as e:
    print("Exception when calling NameserverApi->delete_nameserver: %s\n" % e)

Parameters

Name Type Description Notes
name str Nameserver name
resolver str Parent resolver name
transaction_id str ID of the transaction where we want to add the operation. Cannot be used when version is specified. [optional]
version int Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. [optional]
force_reload bool If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. [optional] [default to false]

Return type

void (empty response body)

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_nameserver

InlineResponse20050 get_nameserver(name, resolver, transaction_id=transaction_id)

Return a nameserver

Returns one nameserver configuration by it's name.

Example

from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = dataplaneapi.NameserverApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Nameserver name
resolver = 'resolver_example' # str | Parent resolver name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)

try:
    # Return a nameserver
    api_response = api_instance.get_nameserver(name, resolver, transaction_id=transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NameserverApi->get_nameserver: %s\n" % e)

Parameters

Name Type Description Notes
name str Nameserver name
resolver str Parent resolver name
transaction_id str ID of the transaction where we want to add the operation. Cannot be used when version is specified. [optional]

Return type

InlineResponse20050

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_nameservers

InlineResponse20049 get_nameservers(resolver, transaction_id=transaction_id)

Return an array of nameservers

Returns an array of all configured nameservers.

Example

from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = dataplaneapi.NameserverApi(dataplaneapi.ApiClient(configuration))
resolver = 'resolver_example' # str | Parent resolver name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)

try:
    # Return an array of nameservers
    api_response = api_instance.get_nameservers(resolver, transaction_id=transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NameserverApi->get_nameservers: %s\n" % e)

Parameters

Name Type Description Notes
resolver str Parent resolver name
transaction_id str ID of the transaction where we want to add the operation. Cannot be used when version is specified. [optional]

Return type

InlineResponse20049

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_nameserver

Nameserver replace_nameserver(body, resolver, name, transaction_id=transaction_id, version=version, force_reload=force_reload)

Replace a nameserver

Replaces a nameserver configuration by it's name.

Example

from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = dataplaneapi.NameserverApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Nameserver() # Nameserver | 
resolver = 'resolver_example' # str | Parent resolver name
name = 'name_example' # str | Nameserver name
transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
force_reload = false # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to false)

try:
    # Replace a nameserver
    api_response = api_instance.replace_nameserver(body, resolver, name, transaction_id=transaction_id, version=version, force_reload=force_reload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NameserverApi->replace_nameserver: %s\n" % e)

Parameters

Name Type Description Notes
body Nameserver
resolver str Parent resolver name
name str Nameserver name
transaction_id str ID of the transaction where we want to add the operation. Cannot be used when version is specified. [optional]
version int Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. [optional]
force_reload bool If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. [optional] [default to false]

Return type

Nameserver

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]