All URIs are relative to https://localhost/api/v40
Method | HTTP request | Description |
---|---|---|
add_watched_directory | POST /clusters/{clusterName}/services/{serviceName}/watcheddir | Adds a directory to the watching list. |
list_watched_directories | GET /clusters/{clusterName}/services/{serviceName}/watcheddir | Lists all the watched directories. |
remove_watched_directory | DELETE /clusters/{clusterName}/services/{serviceName}/watcheddir/{directoryPath} | Removes a directory from the watching list. |
ApiWatchedDir add_watched_directory(cluster_name, service_name, body=body)
Adds a directory to the watching list.
Adds a directory to the watching list.
Available since API v14. Only available with Cloudera Manager Enterprise Edition.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.WatchedDirResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
service_name = 'service_name_example' # str | The service name.
body = cm_client.ApiWatchedDir() # ApiWatchedDir | The directory to be added. (optional)
try:
# Adds a directory to the watching list.
api_response = api_instance.add_watched_directory(cluster_name, service_name, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WatchedDirResourceApi->add_watched_directory: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
service_name | str | The service name. | |
body | ApiWatchedDir | The directory to be added. | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiWatchedDirList list_watched_directories(cluster_name, service_name)
Lists all the watched directories.
Lists all the watched directories.
Available since API v14. Only available with Cloudera Manager Enterprise Edition.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.WatchedDirResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
service_name = 'service_name_example' # str | The service name.
try:
# Lists all the watched directories.
api_response = api_instance.list_watched_directories(cluster_name, service_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling WatchedDirResourceApi->list_watched_directories: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
service_name | str | The service name. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiWatchedDir remove_watched_directory(cluster_name, directory_path, service_name)
Removes a directory from the watching list.
Removes a directory from the watching list.
Available since API v14. Only available with Cloudera Manager Enterprise Edition.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.WatchedDirResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
directory_path = 'directory_path_example' # str | The directory path to be removed.
service_name = 'service_name_example' # str | The service name.
try:
# Removes a directory from the watching list.
api_response = api_instance.remove_watched_directory(cluster_name, directory_path, service_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling WatchedDirResourceApi->remove_watched_directory: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
directory_path | str | The directory path to be removed. | |
service_name | str | The service name. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]