All URIs are relative to https://localhost/api/v54
Method | HTTP request | Description |
---|---|---|
auto_assign_roles | PUT /cm/service/autoAssignRoles | Automatically assign roles to hosts and create the roles for the Cloudera Management Service. |
auto_configure | PUT /cm/service/autoConfigure | Automatically configures roles of the Cloudera Management Service. |
delete_cms | DELETE /cm/service | Delete the Cloudera Management Services. |
enter_maintenance_mode | POST /cm/service/commands/enterMaintenanceMode | Put Cloudera Management Service into maintenance mode. |
exit_maintenance_mode | POST /cm/service/commands/exitMaintenanceMode | Take Cloudera Management Service out of maintenance mode. |
list_active_commands | GET /cm/service/commands | List active Cloudera Management Services commands. |
list_role_types | GET /cm/service/roleTypes | List the supported role types for the Cloudera Management Services. |
read_service | GET /cm/service | Retrieve information about the Cloudera Management Services. |
read_service_config | GET /cm/service/config | Retrieve the configuration of the Cloudera Management Services. |
restart_command | POST /cm/service/commands/restart | Restart the Cloudera Management Services. |
setup_cms | PUT /cm/service | Setup the Cloudera Management Services. |
start_command | POST /cm/service/commands/start | Start the Cloudera Management Services. |
stop_command | POST /cm/service/commands/stop | Stop the Cloudera Management Services. |
update_service_config | PUT /cm/service/config | Update the Cloudera Management Services configuration. |
auto_assign_roles()
Automatically assign roles to hosts and create the roles for the Cloudera Management Service.
Automatically assign roles to hosts and create the roles for the Cloudera Management Service.
Assignments are done based on number of hosts in the deployment and hardware specifications. If no hosts are part of the deployment, an exception will be thrown preventing any role assignments. Existing roles will be taken into account and their assignments will be not be modified. The deployment should not have any clusters when calling this endpoint. If it does, an exception will be thrown preventing any role assignments.
Available since API v6.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Automatically assign roles to hosts and create the roles for the Cloudera Management Service.
api_instance.auto_assign_roles()
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->auto_assign_roles: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
auto_configure()
Automatically configures roles of the Cloudera Management Service.
Automatically configures roles of the Cloudera Management Service.
Overwrites some existing configurations. Only default role config groups must exist before calling this endpoint. Other role config groups must not exist. If they do, an exception will be thrown preventing any configuration. Ignores any clusters (and their services and roles) colocated with the Cloudera Management Service. To avoid over-committing the heap on hosts, place the Cloudera Management Service roles on machines not used by any of the clusters.
Available since API v6.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Automatically configures roles of the Cloudera Management Service.
api_instance.auto_configure()
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->auto_configure: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiService delete_cms()
Delete the Cloudera Management Services.
Delete the Cloudera Management Services.
This method will fail if a CMS instance doesn't already exist.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Delete the Cloudera Management Services.
api_response = api_instance.delete_cms()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->delete_cms: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand enter_maintenance_mode()
Put Cloudera Management Service into maintenance mode.
Put Cloudera Management Service into maintenance mode. This is a synchronous command. The result is known immediately upon return.
Available since API v18.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Put Cloudera Management Service into maintenance mode.
api_response = api_instance.enter_maintenance_mode()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->enter_maintenance_mode: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand exit_maintenance_mode()
Take Cloudera Management Service out of maintenance mode.
Take Cloudera Management Service out of maintenance mode. This is a synchronous command. The result is known immediately upon return.
Available since API v18.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Take Cloudera Management Service out of maintenance mode.
api_response = api_instance.exit_maintenance_mode()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->exit_maintenance_mode: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommandList list_active_commands(view=view)
List active Cloudera Management Services commands.
List active Cloudera Management Services commands.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)
try:
# List active Cloudera Management Services commands.
api_response = api_instance.list_active_commands(view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->list_active_commands: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
view | str | The view of the data to materialize, either "summary" or "full". | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiRoleTypeList list_role_types()
List the supported role types for the Cloudera Management Services.
List the supported role types for the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# List the supported role types for the Cloudera Management Services.
api_response = api_instance.list_role_types()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->list_role_types: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiService read_service(view=view)
Retrieve information about the Cloudera Management Services.
Retrieve information about the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
view = 'summary' # str | (optional) (default to summary)
try:
# Retrieve information about the Cloudera Management Services.
api_response = api_instance.read_service(view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->read_service: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
view | str | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiServiceConfig read_service_config(view=view)
Retrieve the configuration of the Cloudera Management Services.
Retrieve the configuration of the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)
try:
# Retrieve the configuration of the Cloudera Management Services.
api_response = api_instance.read_service_config(view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->read_service_config: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
view | str | The view of the data to materialize, either "summary" or "full". | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand restart_command()
Restart the Cloudera Management Services.
Restart the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Restart the Cloudera Management Services.
api_response = api_instance.restart_command()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->restart_command: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiService setup_cms(body=body)
Setup the Cloudera Management Services.
Setup the Cloudera Management Services.
Configure the CMS instance and create all the management roles. The provided configuration data can be used to set up host mappings for each role, and required configuration such as database connection information for specific roles.
Regardless of the list of roles provided in the input data, all management roles are created by this call. The input is used to override any default settings for the specific roles.
This method needs a valid CM license to be installed beforehand.
This method does not start any services or roles.
This method will fail if a CMS instance already exists.
Available role types:
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiService() # ApiService | Role configuration overrides. (optional)
try:
# Setup the Cloudera Management Services.
api_response = api_instance.setup_cms(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->setup_cms: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ApiService | Role configuration overrides. | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand start_command()
Start the Cloudera Management Services.
Start the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Start the Cloudera Management Services.
api_response = api_instance.start_command()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->start_command: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand stop_command()
Stop the Cloudera Management Services.
Stop the Cloudera Management Services.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
try:
# Stop the Cloudera Management Services.
api_response = api_instance.stop_command()
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->stop_command: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiServiceConfig update_service_config(message=message, body=body)
Update the Cloudera Management Services configuration.
Update the Cloudera Management Services configuration.
If a value is set in the given configuration, it will be added to the service's configuration, replacing any existing entries. If a value is unset (its value is null), the existing configuration for the attribute will be erased, if any.
Attributes that are not listed in the input will maintain their current values in the configuration.
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.MgmtServiceResourceApi(cm_client.ApiClient(configuration))
message = 'message_example' # str | Optional message describing the changes. (optional)
body = cm_client.ApiServiceConfig() # ApiServiceConfig | Configuration changes. (optional)
try:
# Update the Cloudera Management Services configuration.
api_response = api_instance.update_service_config(message=message, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling MgmtServiceResourceApi->update_service_config: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
message | str | Optional message describing the changes. | [optional] |
body | ApiServiceConfig | Configuration changes. | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]