# cm_client.ClustersResourceApi

All URIs are relative to *https://localhost/api/v50*

Method | HTTP request | Description
------------- | ------------- | -------------
[**add_hosts**](ClustersResourceApi.md#add_hosts) | **POST** /clusters/{clusterName}/hosts | 
[**add_tags**](ClustersResourceApi.md#add_tags) | **PUT** /clusters/{clusterName}/tags | Attach tags to the cluster.
[**auto_assign_roles**](ClustersResourceApi.md#auto_assign_roles) | **PUT** /clusters/{clusterName}/autoAssignRoles | Automatically assign roles to hosts and create the roles for all the services in a cluster.
[**auto_configure**](ClustersResourceApi.md#auto_configure) | **PUT** /clusters/{clusterName}/autoConfigure | Automatically configures roles and services in a cluster.
[**configure_auto_tls_services_command**](ClustersResourceApi.md#configure_auto_tls_services_command) | **POST** /clusters/{clusterName}/commands/configureAutoTlsServices | Configures all services in a cluster to use Auto-TLS.
[**configure_for_kerberos**](ClustersResourceApi.md#configure_for_kerberos) | **POST** /clusters/{clusterName}/commands/configureForKerberos | Command to configure the cluster to use Kerberos for authentication.
[**create_clusters**](ClustersResourceApi.md#create_clusters) | **POST** /clusters | Creates a collection of clusters.
[**delete_cluster**](ClustersResourceApi.md#delete_cluster) | **DELETE** /clusters/{clusterName} | Deletes a cluster.
[**delete_cluster_credentials_command**](ClustersResourceApi.md#delete_cluster_credentials_command) | **POST** /clusters/{clusterName}/commands/deleteCredentials | Delete existing Kerberos credentials for the cluster.
[**delete_tags**](ClustersResourceApi.md#delete_tags) | **DELETE** /clusters/{clusterName}/tags | Remove the tags associated with the cluster.
[**deploy_client_config**](ClustersResourceApi.md#deploy_client_config) | **POST** /clusters/{clusterName}/commands/deployClientConfig | Deploy the cluster-wide client configuration.
[**deploy_client_configs_and_refresh**](ClustersResourceApi.md#deploy_client_configs_and_refresh) | **POST** /clusters/{clusterName}/commands/deployClientConfigsAndRefresh | Performs a command with the 2 steps - deploy cc - cluster refresh  This orchestration is needed for the staleness wizard, so it can invoke a single command at wizard finish.
[**deploy_cluster_client_config**](ClustersResourceApi.md#deploy_cluster_client_config) | **POST** /clusters/{clusterName}/commands/deployClusterClientConfig | Deploy the Cluster&#39;s Kerberos client configuration.
[**disable_tls**](ClustersResourceApi.md#disable_tls) | **POST** /clusters/{clusterName}/commands/disableTls | Disables TLS settings on a cluster.
[**enter_maintenance_mode**](ClustersResourceApi.md#enter_maintenance_mode) | **POST** /clusters/{clusterName}/commands/enterMaintenanceMode | Put the cluster into maintenance mode.
[**exit_maintenance_mode**](ClustersResourceApi.md#exit_maintenance_mode) | **POST** /clusters/{clusterName}/commands/exitMaintenanceMode | Take the cluster out of maintenance mode.
[**expire_logs**](ClustersResourceApi.md#expire_logs) | **POST** /clusters/{clusterName}/commands/expireLogs | Remove backup and disaster related log files in hdfs.
[**export**](ClustersResourceApi.md#export) | **GET** /clusters/{clusterName}/export | Export the cluster template for the given cluster.
[**first_run**](ClustersResourceApi.md#first_run) | **POST** /clusters/{clusterName}/commands/firstRun | Prepare and start services in a cluster.
[**get_client_config**](ClustersResourceApi.md#get_client_config) | **GET** /clusters/{clusterName}/clientConfig | Download a zip-compressed archive of the client configuration, of a specific cluster.
[**get_cluster_support_token**](ClustersResourceApi.md#get_cluster_support_token) | **GET** /clusters/{clusterName}/clusterSupportToken | Gets the support token for a cluster.
[**get_kerberos_info**](ClustersResourceApi.md#get_kerberos_info) | **GET** /clusters/{clusterName}/kerberosInfo | Provides Cluster Kerberos information.
[**get_ozone_bucket_info**](ClustersResourceApi.md#get_ozone_bucket_info) | **GET** /clusters/{clusterName}/getOzoneBucketInfo | Returns the properties of the provided ozone bucket if the bucket exists.
[**get_ozone_s3_gateway_info**](ClustersResourceApi.md#get_ozone_s3_gateway_info) | **POST** /clusters/{clusterName}/getOzoneS3GatewayInfo | Returns the REST url for the Ozone S3 Gateway, as well as the AWS credentials needed to access the S3 endpoint.
[**get_utilization_report**](ClustersResourceApi.md#get_utilization_report) | **GET** /clusters/{clusterName}/utilization | Provides the resource utilization of the entire cluster as well as the resource utilization per tenant.
[**inspect_hosts_command**](ClustersResourceApi.md#inspect_hosts_command) | **POST** /clusters/{clusterName}/commands/inspectHosts | Runs the host inspector on the configured hosts in the specified cluster.
[**is_tls_enabled**](ClustersResourceApi.md#is_tls_enabled) | **GET** /clusters/{clusterName}/isTlsEnabled | Returns whether a cluster has any TLS settings enabled.
[**list_active_commands**](ClustersResourceApi.md#list_active_commands) | **GET** /clusters/{clusterName}/commands | List active cluster commands.
[**list_dfs_services**](ClustersResourceApi.md#list_dfs_services) | **GET** /clusters/{clusterName}/dfsServices | List the services that can provide distributed file system (DFS) capabilities in this cluster.
[**list_hosts**](ClustersResourceApi.md#list_hosts) | **GET** /clusters/{clusterName}/hosts | Returns hosts in the system filtered by optional host configuration parameters, if specified.
[**list_service_types**](ClustersResourceApi.md#list_service_types) | **GET** /clusters/{clusterName}/serviceTypes | List the supported service types for a cluster.
[**list_upgrade_domains**](ClustersResourceApi.md#list_upgrade_domains) | **GET** /clusters/{clusterName}/upgradeDomains | Returns the Upgrade Domains associated with the cluster and the host names that belong to each Upgrade Domain.
[**perf_inspector_command**](ClustersResourceApi.md#perf_inspector_command) | **POST** /clusters/{clusterName}/commands/perfInspector | Run cluster performance diagnostics test.
[**pools_refresh**](ClustersResourceApi.md#pools_refresh) | **POST** /clusters/{clusterName}/commands/poolsRefresh | Updates all refreshable configuration files for services with Dynamic Resource Pools.
[**post_cloudera_runtime_upgrade**](ClustersResourceApi.md#post_cloudera_runtime_upgrade) | **POST** /clusters/{clusterName}/commands/postClouderaRuntimeUpgrade | Post Cloudera Runtime upgrade API.
[**pre_upgrade_check_command**](ClustersResourceApi.md#pre_upgrade_check_command) | **POST** /clusters/{clusterName}/commands/preUpgradeCheck | Run cluster pre-upgrade check(s) when upgrading from specified version of CDH to the other.
[**read_cluster**](ClustersResourceApi.md#read_cluster) | **GET** /clusters/{clusterName} | Reads information about a cluster.
[**read_clusters**](ClustersResourceApi.md#read_clusters) | **GET** /clusters | List all known clusters.
[**read_tags**](ClustersResourceApi.md#read_tags) | **GET** /clusters/{clusterName}/tags | Returns the tags associated with this cluster.
[**refresh**](ClustersResourceApi.md#refresh) | **POST** /clusters/{clusterName}/commands/refresh | Updates all refreshable configuration files in the cluster.
[**remove_all_hosts**](ClustersResourceApi.md#remove_all_hosts) | **DELETE** /clusters/{clusterName}/hosts | 
[**remove_host**](ClustersResourceApi.md#remove_host) | **DELETE** /clusters/{clusterName}/hosts/{hostId} | 
[**restart_command**](ClustersResourceApi.md#restart_command) | **POST** /clusters/{clusterName}/commands/restart | Restart all services in the cluster.
[**rolling_restart**](ClustersResourceApi.md#rolling_restart) | **POST** /clusters/{clusterName}/commands/rollingRestart | Command to do a \&quot;best-effort\&quot; rolling restart of the given cluster, i.
[**rolling_upgrade**](ClustersResourceApi.md#rolling_upgrade) | **POST** /clusters/{clusterName}/commands/rollingUpgrade | Command to do a rolling upgrade of specific services in the given cluster  This command does not handle any services that don&#39;t support rolling upgrades.
[**start_command**](ClustersResourceApi.md#start_command) | **POST** /clusters/{clusterName}/commands/start | Start all services in the cluster.
[**stop_command**](ClustersResourceApi.md#stop_command) | **POST** /clusters/{clusterName}/commands/stop | Stop all services in the cluster.
[**tear_down_workload_cluster**](ClustersResourceApi.md#tear_down_workload_cluster) | **POST** /clusters/{clusterName}/commands/tearDownWorkload/{workloadClusterName} | Tear Down Workload cluster.
[**update_cluster**](ClustersResourceApi.md#update_cluster) | **PUT** /clusters/{clusterName} | Update an existing cluster.
[**upgrade_cdh_command**](ClustersResourceApi.md#upgrade_cdh_command) | **POST** /clusters/{clusterName}/commands/upgradeCdh | Perform CDH upgrade to the specified version.
[**upgrade_services_command**](ClustersResourceApi.md#upgrade_services_command) | **POST** /clusters/{clusterName}/commands/upgradeServices | Upgrades the services in the cluster to the CDH5 version.


<a name="add_hosts" id="add_hosts"></a>
# **add_hosts**
> ApiHostRefList add_hosts(cluster_name, body=body)





### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
body = cm_client.ApiHostRefList() # ApiHostRefList |  (optional)

try:
    api_response = api_instance.add_hosts(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->add_hosts: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**|  | 
 **body** | [**ApiHostRefList**](ApiHostRefList.md)|  | [optional] 

### Return type

[**ApiHostRefList**](ApiHostRefList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="add_tags" id="add_tags"></a>
# **add_tags**
> list[ApiEntityTag] add_tags(cluster_name, body=body)

Attach tags to the cluster.

Attach tags to the cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | Name of the cluster
body = [cm_client.ApiEntityTag()] # list[ApiEntityTag] | list of tags to add (optional)

try:
    # Attach tags to the cluster.
    api_response = api_instance.add_tags(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->add_tags: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| Name of the cluster | 
 **body** | [**list[ApiEntityTag]**](ApiEntityTag.md)| list of tags to add | [optional] 

### Return type

[**list[ApiEntityTag]**](ApiEntityTag.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="auto_assign_roles" id="auto_assign_roles"></a>
# **auto_assign_roles**
> auto_assign_roles(cluster_name)

Automatically assign roles to hosts and create the roles for all the services in a cluster.

Automatically assign roles to hosts and create the roles for all the services in a cluster. <p> Assignments are done based on services and hosts in the cluster, and hardware specifications. If no hosts are added to the cluster, an exception will be thrown preventing any role assignments. Existing roles will be taken into account and their assignments will be not be modified. <p> Available since API v6.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Automatically assign roles to hosts and create the roles for all the services in a cluster.
    api_instance.auto_assign_roles(cluster_name)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->auto_assign_roles: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="auto_configure" id="auto_configure"></a>
# **auto_configure**
> auto_configure(cluster_name)

Automatically configures roles and services in a cluster.

Automatically configures roles and services in a cluster. <p> Overwrites some existing configurations. Might create new role config groups. 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 the Cloudera Management Service even if colocated with roles of this cluster. To avoid over-committing the heap on hosts, assign hosts to this cluster that are not being used by the Cloudera Management Service. <p> Available since API v6.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Automatically configures roles and services in a cluster.
    api_instance.auto_configure(cluster_name)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->auto_configure: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="configure_auto_tls_services_command" id="configure_auto_tls_services_command"></a>
# **configure_auto_tls_services_command**
> ApiCommand configure_auto_tls_services_command(cluster_name)

Configures all services in a cluster to use Auto-TLS.

Configures all services in a cluster to use Auto-TLS

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Configures all services in a cluster to use Auto-TLS.
    api_response = api_instance.configure_auto_tls_services_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->configure_auto_tls_services_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="configure_for_kerberos" id="configure_for_kerberos"></a>
# **configure_for_kerberos**
> ApiCommand configure_for_kerberos(cluster_name, body=body)

Command to configure the cluster to use Kerberos for authentication.

Command to configure the cluster to use Kerberos for authentication.  This command will configure all relevant services on a cluster for Kerberos usage.  This command will trigger a GenerateCredentials command to create Kerberos keytabs for all roles in the cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiConfigureForKerberosArguments() # ApiConfigureForKerberosArguments | Arguments for the configure for kerberos command. (optional)

try:
    # Command to configure the cluster to use Kerberos for authentication.
    api_response = api_instance.configure_for_kerberos(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->configure_for_kerberos: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiConfigureForKerberosArguments**](ApiConfigureForKerberosArguments.md)| Arguments for the configure for kerberos command. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="create_clusters" id="create_clusters"></a>
# **create_clusters**
> ApiClusterList create_clusters(body=body)

Creates a collection of clusters.

Creates a collection of clusters.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiClusterList() # ApiClusterList | List of clusters to created. (optional)

try:
    # Creates a collection of clusters.
    api_response = api_instance.create_clusters(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->create_clusters: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ApiClusterList**](ApiClusterList.md)| List of clusters to created. | [optional] 

### Return type

[**ApiClusterList**](ApiClusterList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="delete_cluster" id="delete_cluster"></a>
# **delete_cluster**
> ApiCluster delete_cluster(cluster_name)

Deletes a cluster.

Deletes a cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | Name of cluster to delete.

try:
    # Deletes a cluster.
    api_response = api_instance.delete_cluster(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->delete_cluster: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| Name of cluster to delete. | 

### Return type

[**ApiCluster**](ApiCluster.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="delete_cluster_credentials_command" id="delete_cluster_credentials_command"></a>
# **delete_cluster_credentials_command**
> ApiCommand delete_cluster_credentials_command(cluster_name)

Delete existing Kerberos credentials for the cluster.

Delete existing Kerberos credentials for the cluster. <p> This command will affect all services that have been configured to use Kerberos, and have existing credentials.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | cluster name

try:
    # Delete existing Kerberos credentials for the cluster.
    api_response = api_instance.delete_cluster_credentials_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->delete_cluster_credentials_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| cluster name | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="delete_tags" id="delete_tags"></a>
# **delete_tags**
> list[ApiEntityTag] delete_tags(cluster_name, body=body)

Remove the tags associated with the cluster.

Remove the tags associated with the cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | Name of the cluster to remove tags from
body = [cm_client.ApiEntityTag()] # list[ApiEntityTag] |  (optional)

try:
    # Remove the tags associated with the cluster.
    api_response = api_instance.delete_tags(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->delete_tags: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| Name of the cluster to remove tags from | 
 **body** | [**list[ApiEntityTag]**](ApiEntityTag.md)|  | [optional] 

### Return type

[**list[ApiEntityTag]**](ApiEntityTag.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="deploy_client_config" id="deploy_client_config"></a>
# **deploy_client_config**
> ApiCommand deploy_client_config(cluster_name)

Deploy the cluster-wide client configuration.

Deploy the cluster-wide client configuration.  <p>For each service in the cluster, deploy the service's client configuration to all the hosts that the service runs on.</p>  <p>Available since API v2.</p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Deploy the cluster-wide client configuration.
    api_response = api_instance.deploy_client_config(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->deploy_client_config: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="deploy_client_configs_and_refresh" id="deploy_client_configs_and_refresh"></a>
# **deploy_client_configs_and_refresh**
> ApiCommand deploy_client_configs_and_refresh(cluster_name)

Performs a command with the 2 steps - deploy cc - cluster refresh  This orchestration is needed for the staleness wizard, so it can invoke a single command at wizard finish.

Performs a command with the 2 steps - deploy cc - cluster refresh  This orchestration is needed for the staleness wizard, so it can invoke a single command at wizard finish.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Performs a command with the 2 steps - deploy cc - cluster refresh  This orchestration is needed for the staleness wizard, so it can invoke a single command at wizard finish.
    api_response = api_instance.deploy_client_configs_and_refresh(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->deploy_client_configs_and_refresh: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="deploy_cluster_client_config" id="deploy_cluster_client_config"></a>
# **deploy_cluster_client_config**
> ApiCommand deploy_cluster_client_config(cluster_name, body=body)

Deploy the Cluster's Kerberos client configuration.

Deploy the Cluster's Kerberos client configuration.  <p> Deploy krb5.conf to hosts in a cluster. Does not deploy to decommissioned hosts or hosts with active processes. </p>  <p> Available since API v7. </p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster
body = cm_client.ApiHostRefList() # ApiHostRefList | Hosts in cluster to deploy to. If empty, will target all eligible hosts in the cluster. (optional)

try:
    # Deploy the Cluster's Kerberos client configuration.
    api_response = api_instance.deploy_cluster_client_config(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->deploy_cluster_client_config: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 
 **body** | [**ApiHostRefList**](ApiHostRefList.md)| Hosts in cluster to deploy to. If empty, will target all eligible hosts in the cluster. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="disable_tls" id="disable_tls"></a>
# **disable_tls**
> ApiCommand disable_tls(cluster_name)

Disables TLS settings on a cluster.

Disables TLS settings on a cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Disables TLS settings on a cluster.
    api_response = api_instance.disable_tls(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->disable_tls: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="enter_maintenance_mode" id="enter_maintenance_mode"></a>
# **enter_maintenance_mode**
> ApiCommand enter_maintenance_mode(cluster_name)

Put the cluster into maintenance mode.

Put the cluster into maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p>Available since API v2.</p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Put the cluster into maintenance mode.
    api_response = api_instance.enter_maintenance_mode(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->enter_maintenance_mode: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="exit_maintenance_mode" id="exit_maintenance_mode"></a>
# **exit_maintenance_mode**
> ApiCommand exit_maintenance_mode(cluster_name)

Take the cluster out of maintenance mode.

Take the cluster out of maintenance mode. This is a synchronous command. The result is known immediately upon return.  <p>Available since API v2.</p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Take the cluster out of maintenance mode.
    api_response = api_instance.exit_maintenance_mode(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->exit_maintenance_mode: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="expire_logs" id="expire_logs"></a>
# **expire_logs**
> ApiCommand expire_logs(cluster_name, days=days, schedule_next=schedule_next)

Remove backup and disaster related log files in hdfs.

Remove backup and disaster related log files in hdfs.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
days = -2 # int | Logs more than these many days old are purged. By default, it uses the value defined in the CM configuration. Set to -2 to explicitly set to default. (optional) (default to -2)
schedule_next = false # bool | Whether to schedule a next run for the command, or not. If set to , the next run will get scheduled after this one finished. If a schedule already exists, it will be updated. Can be omitted, the default value is false. (optional) (default to false)

try:
    # Remove backup and disaster related log files in hdfs.
    api_response = api_instance.expire_logs(cluster_name, days=days, schedule_next=schedule_next)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->expire_logs: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **days** | **int**| Logs more than these many days old are purged. By default, it uses the value defined in the CM configuration. Set to -2 to explicitly set to default. | [optional] [default to -2]
 **schedule_next** | **bool**| Whether to schedule a next run for the command, or not. If set to , the next run will get scheduled after this one finished. If a schedule already exists, it will be updated. Can be omitted, the default value is false. | [optional] [default to false]

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="export" id="export"></a>
# **export**
> ApiClusterTemplate export(cluster_name, export_auto_config=export_auto_config)

Export the cluster template for the given cluster.

Export the cluster template for the given cluster. If cluster does not have host templates defined it will export host templates based on roles assignment.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | cluster name
export_auto_config = false # bool | export configs set by the auto configuration (optional) (default to false)

try:
    # Export the cluster template for the given cluster.
    api_response = api_instance.export(cluster_name, export_auto_config=export_auto_config)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->export: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| cluster name | 
 **export_auto_config** | **bool**| export configs set by the auto configuration | [optional] [default to false]

### Return type

[**ApiClusterTemplate**](ApiClusterTemplate.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="first_run" id="first_run"></a>
# **first_run**
> ApiCommand first_run(cluster_name)

Prepare and start services in a cluster.

Prepare and start services in a cluster.  <p> Perform all the steps needed to prepare each service in a cluster and start the services in order. </p>  <p> Available since API v7. </p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Prepare and start services in a cluster.
    api_response = api_instance.first_run(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->first_run: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_client_config" id="get_client_config"></a>
# **get_client_config**
> file get_client_config(cluster_name)

Download a zip-compressed archive of the client configuration, of a specific cluster.

Download a zip-compressed archive of the client configuration, of a specific cluster. Currently, this only includes Kerberos Client Configuration (krb5.conf). For client configuration of services, use the clientConfig endpoint of the services resource. This resource does not require any authentication.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The cluster name.

try:
    # Download a zip-compressed archive of the client configuration, of a specific cluster.
    api_response = api_instance.get_client_config(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_client_config: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The cluster name. | 

### Return type

[**file**](file.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/octet-stream

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_cluster_support_token" id="get_cluster_support_token"></a>
# **get_cluster_support_token**
> ApiClusterSupportToken get_cluster_support_token(cluster_name)

Gets the support token for a cluster.

Gets the support token for a cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Gets the support token for a cluster.
    api_response = api_instance.get_cluster_support_token(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_cluster_support_token: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiClusterSupportToken**](ApiClusterSupportToken.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_kerberos_info" id="get_kerberos_info"></a>
# **get_kerberos_info**
> ApiKerberosInfo get_kerberos_info(cluster_name)

Provides Cluster Kerberos information.

Provides Cluster Kerberos information

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The cluster name.

try:
    # Provides Cluster Kerberos information.
    api_response = api_instance.get_kerberos_info(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_kerberos_info: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The cluster name. | 

### Return type

[**ApiKerberosInfo**](ApiKerberosInfo.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_ozone_bucket_info" id="get_ozone_bucket_info"></a>
# **get_ozone_bucket_info**
> ApiOzoneBucketInfo get_ozone_bucket_info(cluster_name, bucket_name=bucket_name, volume_name=volume_name)

Returns the properties of the provided ozone bucket if the bucket exists.

Returns the properties of the provided ozone bucket if the bucket exists.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
bucket_name = 'bucket_name_example' # str |  (optional)
volume_name = 'volume_name_example' # str |  (optional)

try:
    # Returns the properties of the provided ozone bucket if the bucket exists.
    api_response = api_instance.get_ozone_bucket_info(cluster_name, bucket_name=bucket_name, volume_name=volume_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_ozone_bucket_info: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**|  | 
 **bucket_name** | **str**|  | [optional] 
 **volume_name** | **str**|  | [optional] 

### Return type

[**ApiOzoneBucketInfo**](ApiOzoneBucketInfo.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_ozone_s3_gateway_info" id="get_ozone_s3_gateway_info"></a>
# **get_ozone_s3_gateway_info**
> ApiOzoneS3GatewayInfo get_ozone_s3_gateway_info(cluster_name, bucket_name=bucket_name)

Returns the REST url for the Ozone S3 Gateway, as well as the AWS credentials needed to access the S3 endpoint.

Returns the REST url for the Ozone S3 Gateway, as well as the AWS credentials needed to access the S3 endpoint. Additionally, creates a bucket with the specified name under the volume s3v. If no Ozone is present, or Ozone is not running, returns success with an empty response.  Currently, we get the credentials for the Hive kerberos principal, and give ownership of the created bucket to the same. This is likely not a permanent solution. If the cluster is not kerberizied, we return dummy credentials.  Requires CDH 7.2.1+ or CDH 7.1.3+

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster
bucket_name = 'bucket_name_example' # str | the name of the bucket to create (optional)

try:
    # Returns the REST url for the Ozone S3 Gateway, as well as the AWS credentials needed to access the S3 endpoint.
    api_response = api_instance.get_ozone_s3_gateway_info(cluster_name, bucket_name=bucket_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_ozone_s3_gateway_info: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 
 **bucket_name** | **str**| the name of the bucket to create | [optional] 

### Return type

[**ApiOzoneS3GatewayInfo**](ApiOzoneS3GatewayInfo.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="get_utilization_report" id="get_utilization_report"></a>
# **get_utilization_report**
> ApiClusterUtilization get_utilization_report(cluster_name, days_of_week=days_of_week, end_hour_of_day=end_hour_of_day, _from=_from, start_hour_of_day=start_hour_of_day, tenant_type=tenant_type, to=to)

Provides the resource utilization of the entire cluster as well as the resource utilization per tenant.

Provides the resource utilization of the entire cluster as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | cluster name
days_of_week = ['days_of_week_example'] # list[str] | The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Monday, and 7 corrensponds to Sunday. All 7 days are included if this is not specified. (optional)
end_hour_of_day = 23 # int | The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified. (optional) (default to 23)
_from = '_from_example' # str | Start of the time range to report utilization in ISO 8601 format. (optional)
start_hour_of_day = 0 # int | The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified. (optional) (default to 0)
tenant_type = 'POOL' # str | The type of the tenant (POOL or USER). (optional) (default to POOL)
to = 'now' # str | End of the the time range to report utilization in ISO 8601 format (defaults to now). (optional) (default to now)

try:
    # Provides the resource utilization of the entire cluster as well as the resource utilization per tenant.
    api_response = api_instance.get_utilization_report(cluster_name, days_of_week=days_of_week, end_hour_of_day=end_hour_of_day, _from=_from, start_hour_of_day=start_hour_of_day, tenant_type=tenant_type, to=to)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->get_utilization_report: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| cluster name | 
 **days_of_week** | [**list[str]**](str.md)| The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Monday, and 7 corrensponds to Sunday. All 7 days are included if this is not specified. | [optional] 
 **end_hour_of_day** | **int**| The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified. | [optional] [default to 23]
 **_from** | **str**| Start of the time range to report utilization in ISO 8601 format. | [optional] 
 **start_hour_of_day** | **int**| The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified. | [optional] [default to 0]
 **tenant_type** | **str**| The type of the tenant (POOL or USER). | [optional] [default to POOL]
 **to** | **str**| End of the the time range to report utilization in ISO 8601 format (defaults to now). | [optional] [default to now]

### Return type

[**ApiClusterUtilization**](ApiClusterUtilization.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="inspect_hosts_command" id="inspect_hosts_command"></a>
# **inspect_hosts_command**
> ApiCommand inspect_hosts_command(cluster_name)

Runs the host inspector on the configured hosts in the specified cluster.

Runs the host inspector on the configured hosts in the specified cluster.  Available since V8.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Runs the host inspector on the configured hosts in the specified cluster.
    api_response = api_instance.inspect_hosts_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->inspect_hosts_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="is_tls_enabled" id="is_tls_enabled"></a>
# **is_tls_enabled**
> bool is_tls_enabled(cluster_name)

Returns whether a cluster has any TLS settings enabled.

Returns whether a cluster has any TLS settings enabled. This only checks settings that would have been enabled by Auto-TLS.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Returns whether a cluster has any TLS settings enabled.
    api_response = api_instance.is_tls_enabled(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->is_tls_enabled: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

**bool**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="list_active_commands" id="list_active_commands"></a>
# **list_active_commands**
> ApiCommandList list_active_commands(cluster_name, command_name=command_name, view=view)

List active cluster commands.

List active cluster commands.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The cluster to which the role belongs.
command_name = 'command_name_example' # str | the command name, unique for the command class RestartClusterCommand#COMMAND_NAME (optional)
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)

try:
    # List active cluster commands.
    api_response = api_instance.list_active_commands(cluster_name, command_name=command_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->list_active_commands: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The cluster to which the role belongs. | 
 **command_name** | **str**| the command name, unique for the command class RestartClusterCommand#COMMAND_NAME | [optional] 
 **view** | **str**| The view of the data to materialize, either \"summary\" or \"full\". | [optional] [default to summary]

### Return type

[**ApiCommandList**](ApiCommandList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="list_dfs_services" id="list_dfs_services"></a>
# **list_dfs_services**
> ApiServiceList list_dfs_services(cluster_name, view=view)

List the services that can provide distributed file system (DFS) capabilities in this cluster.

List the services that can provide distributed file system (DFS) capabilities in this cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | cluster name
view = 'summary' # str | data view required for matching services (optional) (default to summary)

try:
    # List the services that can provide distributed file system (DFS) capabilities in this cluster.
    api_response = api_instance.list_dfs_services(cluster_name, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->list_dfs_services: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| cluster name | 
 **view** | **str**| data view required for matching services | [optional] [default to summary]

### Return type

[**ApiServiceList**](ApiServiceList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="list_hosts" id="list_hosts"></a>
# **list_hosts**
> ApiHostList list_hosts(cluster_name, config_name=config_name, config_value=config_value, view=view)

Returns hosts in the system filtered by optional host configuration parameters, if specified.

Returns hosts in the system filtered by optional host configuration parameters, if specified.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | Name of the cluster
config_name = 'config_name_example' # str | optional host config name to filter hosts by. Available from v40. (optional)
config_value = 'config_value_example' # str | host config value associated with config name. Available from v40. (optional)
view = 'summary' # str | The view to materialize (optional) (default to summary)

try:
    # Returns hosts in the system filtered by optional host configuration parameters, if specified.
    api_response = api_instance.list_hosts(cluster_name, config_name=config_name, config_value=config_value, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->list_hosts: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| Name of the cluster | 
 **config_name** | **str**| optional host config name to filter hosts by. Available from v40. | [optional] 
 **config_value** | **str**| host config value associated with config name. Available from v40. | [optional] 
 **view** | **str**| The view to materialize | [optional] [default to summary]

### Return type

[**ApiHostList**](ApiHostList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="list_service_types" id="list_service_types"></a>
# **list_service_types**
> ApiServiceTypeList list_service_types(cluster_name)

List the supported service types for a cluster.

List the supported service types for a cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The cluster.

try:
    # List the supported service types for a cluster.
    api_response = api_instance.list_service_types(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->list_service_types: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The cluster. | 

### Return type

[**ApiServiceTypeList**](ApiServiceTypeList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="list_upgrade_domains" id="list_upgrade_domains"></a>
# **list_upgrade_domains**
> ApiHdfsUpgradeDomainList list_upgrade_domains(cluster_name)

Returns the Upgrade Domains associated with the cluster and the host names that belong to each Upgrade Domain.

Returns the Upgrade Domains associated with the cluster and the host names that belong to each Upgrade Domain. Hosts without an Upgrade Domain set will default to using the rack assignment of the host.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Returns the Upgrade Domains associated with the cluster and the host names that belong to each Upgrade Domain.
    api_response = api_instance.list_upgrade_domains(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->list_upgrade_domains: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiHdfsUpgradeDomainList**](ApiHdfsUpgradeDomainList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="perf_inspector_command" id="perf_inspector_command"></a>
# **perf_inspector_command**
> ApiCommand perf_inspector_command(cluster_name, body=body)

Run cluster performance diagnostics test.

Run cluster performance diagnostics test.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiClusterPerfInspectorArgs() # ApiClusterPerfInspectorArgs | Optional arguments for the command. See ApiClusterPerfInspectorArgs. (optional)

try:
    # Run cluster performance diagnostics test.
    api_response = api_instance.perf_inspector_command(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->perf_inspector_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiClusterPerfInspectorArgs**](ApiClusterPerfInspectorArgs.md)| Optional arguments for the command. See ApiClusterPerfInspectorArgs. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="pools_refresh" id="pools_refresh"></a>
# **pools_refresh**
> ApiCommand pools_refresh(cluster_name)

Updates all refreshable configuration files for services with Dynamic Resource Pools.

Updates all refreshable configuration files for services with Dynamic Resource Pools. <p> Available since API v6.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Updates all refreshable configuration files for services with Dynamic Resource Pools.
    api_response = api_instance.pools_refresh(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->pools_refresh: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="post_cloudera_runtime_upgrade" id="post_cloudera_runtime_upgrade"></a>
# **post_cloudera_runtime_upgrade**
> ApiCommand post_cloudera_runtime_upgrade(cluster_name)

Post Cloudera Runtime upgrade API.

Post Cloudera Runtime upgrade API. <p> This API executes special finalization tasks (already part of regular CDH upgrade) after the installation of an updated build of Cloudera Runtime (no version change). No version change of Cloudera Rumtime means when first 3 digits of build remains the same (e.g. from 7.2.1.a to 7.2.1.b) during upgrade. Purpose of this is to automate manual tasks of CDH upgrade. <p>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 

try:
    # Post Cloudera Runtime upgrade API.
    api_response = api_instance.post_cloudera_runtime_upgrade(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->post_cloudera_runtime_upgrade: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**|  | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="pre_upgrade_check_command" id="pre_upgrade_check_command"></a>
# **pre_upgrade_check_command**
> ApiCommand pre_upgrade_check_command(cluster_name, body=body)

Run cluster pre-upgrade check(s) when upgrading from specified version of CDH to the other.

Run cluster pre-upgrade check(s) when upgrading from specified version of CDH to the other. <p> Allows the following upgrade checks: <ul> <li>Minor upgrades from any CDH 5 to any CDH 5</li> <li>Major upgrades from any CDH 5 to any CDH 6</li> <li>Minor upgrades from any CDH 6 to any CDH 6</li> <li>Maintenance upgrades or downgrades (a.b.x to a.b.y)</li> </ul>

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiCdhUpgradeArgs() # ApiCdhUpgradeArgs | Arguments for the command. See ApiCdhUpgradeArgs. (optional)

try:
    # Run cluster pre-upgrade check(s) when upgrading from specified version of CDH to the other.
    api_response = api_instance.pre_upgrade_check_command(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->pre_upgrade_check_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiCdhUpgradeArgs**](ApiCdhUpgradeArgs.md)| Arguments for the command. See ApiCdhUpgradeArgs. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="read_cluster" id="read_cluster"></a>
# **read_cluster**
> ApiCluster read_cluster(cluster_name)

Reads information about a cluster.

Reads information about a cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | Name of cluster to look up.

try:
    # Reads information about a cluster.
    api_response = api_instance.read_cluster(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->read_cluster: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| Name of cluster to look up. | 

### Return type

[**ApiCluster**](ApiCluster.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="read_clusters" id="read_clusters"></a>
# **read_clusters**
> ApiClusterList read_clusters(cluster_type=cluster_type, view=view)

List all known clusters.

List all known clusters.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_type = 'base' # str | Type of cluster, either \"any\", \"base\", \"compute\" or \"experience\". Default is \"base\". (optional) (default to base)
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)

try:
    # List all known clusters.
    api_response = api_instance.read_clusters(cluster_type=cluster_type, view=view)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->read_clusters: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_type** | **str**| Type of cluster, either \"any\", \"base\", \"compute\" or \"experience\". Default is \"base\". | [optional] [default to base]
 **view** | **str**| The view of the data to materialize, either \"summary\" or \"full\". | [optional] [default to summary]

### Return type

[**ApiClusterList**](ApiClusterList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="read_tags" id="read_tags"></a>
# **read_tags**
> list[ApiEntityTag] read_tags(cluster_name, limit=limit, offset=offset)

Returns the tags associated with this cluster.

Returns the tags associated with this cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster
limit = 10 # int | Number of tags (optional) (default to 10)
offset = 0 # int | Index of the first tag to retrieve (optional) (default to 0)

try:
    # Returns the tags associated with this cluster.
    api_response = api_instance.read_tags(cluster_name, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->read_tags: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 
 **limit** | **int**| Number of tags | [optional] [default to 10]
 **offset** | **int**| Index of the first tag to retrieve | [optional] [default to 0]

### Return type

[**list[ApiEntityTag]**](ApiEntityTag.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="refresh" id="refresh"></a>
# **refresh**
> ApiCommand refresh(cluster_name)

Updates all refreshable configuration files in the cluster.

Updates all refreshable configuration files in the cluster. Will not restart any roles. <p> Available since API v6.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster

try:
    # Updates all refreshable configuration files in the cluster.
    api_response = api_instance.refresh(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->refresh: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="remove_all_hosts" id="remove_all_hosts"></a>
# **remove_all_hosts**
> ApiHostRefList remove_all_hosts(cluster_name)





### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 

try:
    api_response = api_instance.remove_all_hosts(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->remove_all_hosts: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**|  | 

### Return type

[**ApiHostRefList**](ApiHostRefList.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="remove_host" id="remove_host"></a>
# **remove_host**
> ApiHostRef remove_host(cluster_name, host_id)





### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | 
host_id = 'host_id_example' # str | 

try:
    api_response = api_instance.remove_host(cluster_name, host_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->remove_host: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**|  | 
 **host_id** | **str**|  | 

### Return type

[**ApiHostRef**](ApiHostRef.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="restart_command" id="restart_command"></a>
# **restart_command**
> ApiCommand restart_command(cluster_name, body=body)

Restart all services in the cluster.

Restart all services in the cluster. <p> Services are stopped then started in the appropriate order given their dependencies. The command can optionally restart only stale services and their dependencies as well as redeploy client configuration on all services in the cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiRestartClusterArgs() # ApiRestartClusterArgs | arguments for the restart command. (optional)

try:
    # Restart all services in the cluster.
    api_response = api_instance.restart_command(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->restart_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiRestartClusterArgs**](ApiRestartClusterArgs.md)| arguments for the restart command. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="rolling_restart" id="rolling_restart"></a>
# **rolling_restart**
> ApiCommand rolling_restart(cluster_name, body=body)

Command to do a \"best-effort\" rolling restart of the given cluster, i.

Command to do a \"best-effort\" rolling restart of the given cluster, i.e. it does plain restart of services that cannot be rolling restarted, followed by first rolling restarting non-slaves and then rolling restarting the slave roles of services that can be rolling restarted. The slave restarts are done host-by-host. <p> Available since API v4. Only available with Cloudera Manager Enterprise Edition.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiRollingRestartClusterArgs() # ApiRollingRestartClusterArgs | Arguments for the rolling restart command. (optional)

try:
    # Command to do a \"best-effort\" rolling restart of the given cluster, i.
    api_response = api_instance.rolling_restart(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->rolling_restart: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiRollingRestartClusterArgs**](ApiRollingRestartClusterArgs.md)| Arguments for the rolling restart command. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="rolling_upgrade" id="rolling_upgrade"></a>
# **rolling_upgrade**
> ApiCommand rolling_upgrade(cluster_name, body=body)

Command to do a rolling upgrade of specific services in the given cluster  This command does not handle any services that don't support rolling upgrades.

Command to do a rolling upgrade of specific services in the given cluster  This command does not handle any services that don't support rolling upgrades. The command will throw an error and not start if upgrade of any such service is requested.  This command does not upgrade the full CDH Cluster. You should normally use the upgradeCDH Command for upgrading the cluster. This is primarily helpful if you need to need to recover from an upgrade failure or for advanced users to script an alternative to the upgradeCdhCommand.  This command expects the binaries to be available on hosts and activated. It does not change any binaries on the hosts.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiRollingUpgradeServicesArgs() # ApiRollingUpgradeServicesArgs | Arguments for the rolling upgrade command. (optional)

try:
    # Command to do a rolling upgrade of specific services in the given cluster  This command does not handle any services that don't support rolling upgrades.
    api_response = api_instance.rolling_upgrade(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->rolling_upgrade: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiRollingUpgradeServicesArgs**](ApiRollingUpgradeServicesArgs.md)| Arguments for the rolling upgrade command. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="start_command" id="start_command"></a>
# **start_command**
> ApiCommand start_command(cluster_name)

Start all services in the cluster.

Start all services in the cluster. <p> Services are started in the appropriate order given their dependencies.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Start all services in the cluster.
    api_response = api_instance.start_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->start_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="stop_command" id="stop_command"></a>
# **stop_command**
> ApiCommand stop_command(cluster_name)

Stop all services in the cluster.

Stop all services in the cluster. <p> Services are stopped in the appropriate order given their dependencies.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Stop all services in the cluster.
    api_response = api_instance.stop_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->stop_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="tear_down_workload_cluster" id="tear_down_workload_cluster"></a>
# **tear_down_workload_cluster**
> ApiCommand tear_down_workload_cluster(cluster_name, workload_cluster_name)

Tear Down Workload cluster.

Tear Down Workload cluster. <p> Tear Down Ranger plugin service (repository) associated with the workload cluster.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
workload_cluster_name = 'workload_cluster_name_example' # str | The name of the workload cluster.

try:
    # Tear Down Workload cluster.
    api_response = api_instance.tear_down_workload_cluster(cluster_name, workload_cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->tear_down_workload_cluster: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **workload_cluster_name** | **str**| The name of the workload cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="update_cluster" id="update_cluster"></a>
# **update_cluster**
> ApiCluster update_cluster(cluster_name, body=body)

Update an existing cluster.

Update an existing cluster. <p> To update the CDH version, provide the new value in the \"fullVersion\" property. Setting a correct version that matches the actual installed software will ensure the correct version-specific features, such as services, roles, commands, and configurations. This need not be manually set for clusters using parcels. In general this action is only necessary after the CDH packages have been manually updated. Note that a downgrade may be rejected if it would render existing services or roles unusable. For major upgrade, the \"upgradeService\" cluster command should be used instead.</p> <p> To rename the cluster, provide the new name in the \"displayName\" property for API >= 6, or in the \"name\" property for API <=5. <p> Available since API v2.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiCluster() # ApiCluster |  (optional)

try:
    # Update an existing cluster.
    api_response = api_instance.update_cluster(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->update_cluster: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiCluster**](ApiCluster.md)|  | [optional] 

### Return type

[**ApiCluster**](ApiCluster.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="upgrade_cdh_command" id="upgrade_cdh_command"></a>
# **upgrade_cdh_command**
> ApiCommand upgrade_cdh_command(cluster_name, body=body)

Perform CDH upgrade to the specified version.

Perform CDH upgrade to the specified version. <p> Allows the following upgrades: <ul> <li>Major upgrades from any CDH 4 to any CDH 5</li> <li>Minor upgrades from any CDH 5 to any CDH 5</li> <li>Maintenance upgrades or downgrades (a.b.x to a.b.y)</li> </ul> <p> If using packages, CDH packages on all hosts of the cluster must be manually upgraded before this command is issued. <p> The command will upgrade the services and their configuration to the version available in the CDH5 distribution. <p> Unless rolling upgrade options are provided, the entire cluster will experience downtime. If rolling upgrade options are provided, command will do a \"best-effort\" rolling upgrade of the given cluster, i.e. it does plain upgrade of services that cannot be rolling upgraded, followed by first rolling upgrading non-slaves and then rolling restarting the slave roles of services that can be rolling restarted. The slave restarts are done host-by-host. <p> Available since v9. Rolling upgrade is only available with Cloudera Manager Enterprise Edition. A more limited upgrade variant available since v6.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.
body = cm_client.ApiCdhUpgradeArgs() # ApiCdhUpgradeArgs | Arguments for the command. See ApiCdhUpgradeArgs. (optional)

try:
    # Perform CDH upgrade to the specified version.
    api_response = api_instance.upgrade_cdh_command(cluster_name, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->upgrade_cdh_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 
 **body** | [**ApiCdhUpgradeArgs**](ApiCdhUpgradeArgs.md)| Arguments for the command. See ApiCdhUpgradeArgs. | [optional] 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="upgrade_services_command" id="upgrade_services_command"></a>
# **upgrade_services_command**
> ApiCommand upgrade_services_command(cluster_name)

Upgrades the services in the cluster to the CDH5 version.

Upgrades the services in the cluster to the CDH5 version. <p> This command requires that the CDH packages in the hosts used by the cluster be upgraded to CDH5 before this command is issued. Once issued, this command will stop all running services before proceeding. <p> If parcels are used instead of CDH system packages then the following steps need to happen in order: <ol> <li>Stop all services manually</li> <li>Activate parcel</li> <li>Run this upgrade command</li> </ol> The command will upgrade the services and their configuration to the version available in the CDH5 distribution.

### Example
```python
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.ClustersResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str | The name of the cluster.

try:
    # Upgrades the services in the cluster to the CDH5 version.
    api_response = api_instance.upgrade_services_command(cluster_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersResourceApi->upgrade_services_command: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cluster_name** | **str**| The name of the cluster. | 

### Return type

[**ApiCommand**](ApiCommand.md)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

