Skip to content

Latest commit

 

History

History
412 lines (297 loc) · 17 KB

DefaultsApi.md

File metadata and controls

412 lines (297 loc) · 17 KB

swagger_client.DefaultsApi

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

Method HTTP request Description
create_defaults_section POST /services/haproxy/configuration/named_defaults Add a defaults section
delete_defaults_section DELETE /services/haproxy/configuration/named_defaults/{name} Delete a defaults section
get_defaults GET /services/haproxy/configuration/defaults Return defaults part of configuration
get_defaults_section GET /services/haproxy/configuration/named_defaults/{name} Return a defautls section
get_defaults_sections GET /services/haproxy/configuration/named_defaults Return an array of defaults
replace_defaults PUT /services/haproxy/configuration/defaults Replace defaults
replace_defaults_section PUT /services/haproxy/configuration/named_defaults/{name} Replace a defatults section

create_defaults_section

Defaults create_defaults_section(body, transaction_id=transaction_id, version=version, force_reload=force_reload)

Add a defaults section

Adds a new defaults section to the configuration file.

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.DefaultsApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Defaults() # Defaults | 
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 defaults section
    api_response = api_instance.create_defaults_section(body, transaction_id=transaction_id, version=version, force_reload=force_reload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->create_defaults_section: %s\n" % e)

Parameters

Name Type Description Notes
body Defaults
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

Defaults

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_defaults_section

delete_defaults_section(name, transaction_id=transaction_id, version=version, force_reload=force_reload)

Delete a defaults section

Deletes a defaults section from the 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.DefaultsApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Defaults 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 defaults section
    api_instance.delete_defaults_section(name, transaction_id=transaction_id, version=version, force_reload=force_reload)
except ApiException as e:
    print("Exception when calling DefaultsApi->delete_defaults_section: %s\n" % e)

Parameters

Name Type Description Notes
name str Defaults 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_defaults

InlineResponse20016 get_defaults(transaction_id=transaction_id)

Return defaults part of configuration

Returns defaults part of configuration, this has been deprecated, use named_defaults instead.

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.DefaultsApi(dataplaneapi.ApiClient(configuration))
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 defaults part of configuration
    api_response = api_instance.get_defaults(transaction_id=transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->get_defaults: %s\n" % e)

Parameters

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

Return type

InlineResponse20016

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_defaults_section

InlineResponse20016 get_defaults_section(name, transaction_id=transaction_id)

Return a defautls section

Returns one defautls section 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.DefaultsApi(dataplaneapi.ApiClient(configuration))
name = 'name_example' # str | Defaults 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 defautls section
    api_response = api_instance.get_defaults_section(name, transaction_id=transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->get_defaults_section: %s\n" % e)

Parameters

Name Type Description Notes
name str Defaults 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

InlineResponse20016

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_defaults_sections

InlineResponse20048 get_defaults_sections(transaction_id=transaction_id)

Return an array of defaults

Returns an array of all configured defaults.

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.DefaultsApi(dataplaneapi.ApiClient(configuration))
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 defaults
    api_response = api_instance.get_defaults_sections(transaction_id=transaction_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->get_defaults_sections: %s\n" % e)

Parameters

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

Return type

InlineResponse20048

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_defaults

Defaults replace_defaults(body, transaction_id=transaction_id, version=version, force_reload=force_reload)

Replace defaults

Replace defaults part of config, this has been deprecated, use named_defaults instead.

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.DefaultsApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Defaults() # Defaults | 
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 defaults
    api_response = api_instance.replace_defaults(body, transaction_id=transaction_id, version=version, force_reload=force_reload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->replace_defaults: %s\n" % e)

Parameters

Name Type Description Notes
body Defaults
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

Defaults

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]

replace_defaults_section

Defaults replace_defaults_section(body, name, transaction_id=transaction_id, version=version, force_reload=force_reload)

Replace a defatults section

Replaces a defatults section 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.DefaultsApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Defaults() # Defaults | 
name = 'name_example' # str | Defaults 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 defatults section
    api_response = api_instance.replace_defaults_section(body, name, transaction_id=transaction_id, version=version, force_reload=force_reload)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultsApi->replace_defaults_section: %s\n" % e)

Parameters

Name Type Description Notes
body Defaults
name str Defaults 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

Defaults

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]