Source code for nipyapi.nifi.apis.controller_api

# coding: utf-8

"""
    NiFi Rest API

    The Rest API provides programmatic access to command and control a NiFi instance in real time. Start and                                             stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description,                                             definitions of the expected input and output, potential response codes, and the authorizations required                                             to invoke each service.

    OpenAPI spec version: 1.23.2
    Contact: dev@nifi.apache.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..configuration import Configuration
from ..api_client import ApiClient


[docs] class ControllerApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient() self.api_client = config.api_client
[docs] def create_bulletin(self, body, **kwargs): """ Creates a new bulletin This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_bulletin(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param BulletinEntity body: The reporting task configuration details. (required) :return: BulletinEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.create_bulletin_with_http_info(body, **kwargs) else: (data) = self.create_bulletin_with_http_info(body, **kwargs) return data
[docs] def create_bulletin_with_http_info(self, body, **kwargs): """ Creates a new bulletin This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_bulletin_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param BulletinEntity body: The reporting task configuration details. (required) :return: BulletinEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_bulletin" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_bulletin`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/bulletin', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='BulletinEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def create_controller_service(self, body, **kwargs): """ Creates a new controller service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_controller_service(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ControllerServiceEntity body: The controller service configuration details. (required) :return: ControllerServiceEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.create_controller_service_with_http_info(body, **kwargs) else: (data) = self.create_controller_service_with_http_info(body, **kwargs) return data
[docs] def create_controller_service_with_http_info(self, body, **kwargs): """ Creates a new controller service This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_controller_service_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ControllerServiceEntity body: The controller service configuration details. (required) :return: ControllerServiceEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_controller_service" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_controller_service`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/controller-services', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerServiceEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def create_flow_registry_client(self, body, **kwargs): """ Creates a new flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_flow_registry_client(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param FlowRegistryClientEntity body: The flow registry client configuration details. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.create_flow_registry_client_with_http_info(body, **kwargs) else: (data) = self.create_flow_registry_client_with_http_info(body, **kwargs) return data
[docs] def create_flow_registry_client_with_http_info(self, body, **kwargs): """ Creates a new flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_flow_registry_client_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param FlowRegistryClientEntity body: The flow registry client configuration details. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_flow_registry_client" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_flow_registry_client`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def create_parameter_provider(self, body, **kwargs): """ Creates a new parameter provider This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_parameter_provider(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ParameterProviderEntity body: The parameter provider configuration details. (required) :return: ParameterProviderEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.create_parameter_provider_with_http_info(body, **kwargs) else: (data) = self.create_parameter_provider_with_http_info(body, **kwargs) return data
[docs] def create_parameter_provider_with_http_info(self, body, **kwargs): """ Creates a new parameter provider This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_parameter_provider_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ParameterProviderEntity body: The parameter provider configuration details. (required) :return: ParameterProviderEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_parameter_provider" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_parameter_provider`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/parameter-providers', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ParameterProviderEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def create_reporting_task(self, body, **kwargs): """ Creates a new reporting task This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_reporting_task(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ReportingTaskEntity body: The reporting task configuration details. (required) :return: ReportingTaskEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.create_reporting_task_with_http_info(body, **kwargs) else: (data) = self.create_reporting_task_with_http_info(body, **kwargs) return data
[docs] def create_reporting_task_with_http_info(self, body, **kwargs): """ Creates a new reporting task This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.create_reporting_task_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ReportingTaskEntity body: The reporting task configuration details. (required) :return: ReportingTaskEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_reporting_task" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_reporting_task`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/reporting-tasks', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ReportingTaskEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def delete_flow_registry_client(self, id, **kwargs): """ Deletes a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_flow_registry_client(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param str version: The revision is used to verify the client is working with the latest version of the flow. :param str client_id: If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. :param bool disconnected_node_acknowledged: Acknowledges that this node is disconnected to allow for mutable requests to proceed. :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.delete_flow_registry_client_with_http_info(id, **kwargs) else: (data) = self.delete_flow_registry_client_with_http_info(id, **kwargs) return data
[docs] def delete_flow_registry_client_with_http_info(self, id, **kwargs): """ Deletes a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_flow_registry_client_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param str version: The revision is used to verify the client is working with the latest version of the flow. :param str client_id: If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in the response. :param bool disconnected_node_acknowledged: Acknowledges that this node is disconnected to allow for mutable requests to proceed. :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'version', 'client_id', 'disconnected_node_acknowledged'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_flow_registry_client" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete_flow_registry_client`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'version' in params: query_params.append(('version', params['version'])) if 'client_id' in params: query_params.append(('clientId', params['client_id'])) if 'disconnected_node_acknowledged' in params: query_params.append(('disconnectedNodeAcknowledged', params['disconnected_node_acknowledged'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def delete_history(self, end_date, **kwargs): """ Purges history This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_history(end_date, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str end_date: Purge actions before this date/time. (required) :return: HistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.delete_history_with_http_info(end_date, **kwargs) else: (data) = self.delete_history_with_http_info(end_date, **kwargs) return data
[docs] def delete_history_with_http_info(self, end_date, **kwargs): """ Purges history This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_history_with_http_info(end_date, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str end_date: Purge actions before this date/time. (required) :return: HistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = ['end_date'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_history" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'end_date' is set if ('end_date' not in params) or (params['end_date'] is None): raise ValueError("Missing the required parameter `end_date` when calling `delete_history`") collection_formats = {} path_params = {} query_params = [] if 'end_date' in params: query_params.append(('endDate', params['end_date'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/history', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='HistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def delete_node(self, id, **kwargs): """ Removes a node from the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_node(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.delete_node_with_http_info(id, **kwargs) else: (data) = self.delete_node_with_http_info(id, **kwargs) return data
[docs] def delete_node_with_http_info(self, id, **kwargs): """ Removes a node from the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.delete_node_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `delete_node`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/cluster/nodes/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NodeEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_cluster(self, **kwargs): """ Gets the contents of the cluster Returns the contents of the cluster including all nodes and their status. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_cluster(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ClusterEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_cluster_with_http_info(**kwargs) else: (data) = self.get_cluster_with_http_info(**kwargs) return data
[docs] def get_cluster_with_http_info(self, **kwargs): """ Gets the contents of the cluster Returns the contents of the cluster including all nodes and their status. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_cluster_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ClusterEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_cluster" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/cluster', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ClusterEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_controller_config(self, **kwargs): """ Retrieves the configuration for this NiFi Controller This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_config(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerConfigurationEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_controller_config_with_http_info(**kwargs) else: (data) = self.get_controller_config_with_http_info(**kwargs) return data
[docs] def get_controller_config_with_http_info(self, **kwargs): """ Retrieves the configuration for this NiFi Controller This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_controller_config_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ControllerConfigurationEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_controller_config" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/config', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerConfigurationEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flow_registry_client(self, id, **kwargs): """ Gets a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_registry_client(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flow_registry_client_with_http_info(id, **kwargs) else: (data) = self.get_flow_registry_client_with_http_info(id, **kwargs) return data
[docs] def get_flow_registry_client_with_http_info(self, id, **kwargs): """ Gets a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_registry_client_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flow_registry_client" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_flow_registry_client`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_flow_registry_clients(self, **kwargs): """ Gets the listing of available flow registry clients This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_registry_clients(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientsEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_flow_registry_clients_with_http_info(**kwargs) else: (data) = self.get_flow_registry_clients_with_http_info(**kwargs) return data
[docs] def get_flow_registry_clients_with_http_info(self, **kwargs): """ Gets the listing of available flow registry clients This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_flow_registry_clients_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientsEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_flow_registry_clients" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientsEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_node(self, id, **kwargs): """ Gets a node in the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_node(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_node_with_http_info(id, **kwargs) else: (data) = self.get_node_with_http_info(id, **kwargs) return data
[docs] def get_node_with_http_info(self, id, **kwargs): """ Gets a node in the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_node_with_http_info(id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_node`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/cluster/nodes/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NodeEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_node_status_history(self, **kwargs): """ Gets status history for the node Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_node_status_history(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ComponentHistoryEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_node_status_history_with_http_info(**kwargs) else: (data) = self.get_node_status_history_with_http_info(**kwargs) return data
[docs] def get_node_status_history_with_http_info(self, **kwargs): """ Gets status history for the node Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_node_status_history_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: ComponentHistoryEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_node_status_history" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/status/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ComponentHistoryEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_property_descriptor(self, id, property_name, **kwargs): """ Gets a flow registry client property descriptor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_property_descriptor(id, property_name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param str property_name: The property name. (required) :param bool sensitive: Property Descriptor requested sensitive status :return: PropertyDescriptorEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_property_descriptor_with_http_info(id, property_name, **kwargs) else: (data) = self.get_property_descriptor_with_http_info(id, property_name, **kwargs) return data
[docs] def get_property_descriptor_with_http_info(self, id, property_name, **kwargs): """ Gets a flow registry client property descriptor This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_property_descriptor_with_http_info(id, property_name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param str property_name: The property name. (required) :param bool sensitive: Property Descriptor requested sensitive status :return: PropertyDescriptorEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'property_name', 'sensitive'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_property_descriptor" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_property_descriptor`") # verify the required parameter 'property_name' is set if ('property_name' not in params) or (params['property_name'] is None): raise ValueError("Missing the required parameter `property_name` when calling `get_property_descriptor`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] if 'property_name' in params: query_params.append(('propertyName', params['property_name'])) if 'sensitive' in params: query_params.append(('sensitive', params['sensitive'])) header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients/{id}/descriptors', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='PropertyDescriptorEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def get_registry_client_types(self, **kwargs): """ Retrieves the types of flow that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_registry_client_types(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientTypesEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.get_registry_client_types_with_http_info(**kwargs) else: (data) = self.get_registry_client_types_with_http_info(**kwargs) return data
[docs] def get_registry_client_types_with_http_info(self, **kwargs): """ Retrieves the types of flow that this NiFi supports Note: This endpoint is subject to change as NiFi and it's REST API evolve. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.get_registry_client_types_with_http_info(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: FlowRegistryClientTypesEntity If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_registry_client_types" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['*/*']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientTypesEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def update_controller_config(self, body, **kwargs): """ Retrieves the configuration for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_controller_config(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ControllerConfigurationEntity body: The controller configuration. (required) :return: ControllerConfigurationEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.update_controller_config_with_http_info(body, **kwargs) else: (data) = self.update_controller_config_with_http_info(body, **kwargs) return data
[docs] def update_controller_config_with_http_info(self, body, **kwargs): """ Retrieves the configuration for this NiFi This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_controller_config_with_http_info(body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param ControllerConfigurationEntity body: The controller configuration. (required) :return: ControllerConfigurationEntity If the method is called asynchronously, returns the request thread. """ all_params = ['body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_controller_config" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_controller_config`") collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/config', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ControllerConfigurationEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def update_flow_registry_client(self, id, body, **kwargs): """ Updates a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_flow_registry_client(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param FlowRegistryClientEntity body: The flow registry client configuration details. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.update_flow_registry_client_with_http_info(id, body, **kwargs) else: (data) = self.update_flow_registry_client_with_http_info(id, body, **kwargs) return data
[docs] def update_flow_registry_client_with_http_info(self, id, body, **kwargs): """ Updates a flow registry client This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_flow_registry_client_with_http_info(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The flow registry client id. (required) :param FlowRegistryClientEntity body: The flow registry client configuration details. (required) :return: FlowRegistryClientEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_flow_registry_client" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `update_flow_registry_client`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_flow_registry_client`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/registry-clients/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='FlowRegistryClientEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
[docs] def update_node(self, id, body, **kwargs): """ Updates a node in the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_node(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :param NodeEntity body: The node configuration. The only configuration that will be honored at this endpoint is the status. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.update_node_with_http_info(id, body, **kwargs) else: (data) = self.update_node_with_http_info(id, body, **kwargs) return data
[docs] def update_node_with_http_info(self, id, body, **kwargs): """ Updates a node in the cluster This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.update_node_with_http_info(id, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: The node id. (required) :param NodeEntity body: The node configuration. The only configuration that will be honored at this endpoint is the status. (required) :return: NodeEntity If the method is called asynchronously, returns the request thread. """ all_params = ['id', 'body'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method update_node" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params) or (params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `update_node`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update_node`") collection_formats = {} path_params = {} if 'id' in params: path_params['id'] = params['id'] query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['tokenAuth'] return self.api_client.call_api('/controller/cluster/nodes/{id}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='NodeEntity', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)