ClouderaManagerResourceApi

All URIs are relative to https://localhost/api/v55

Method HTTP request Description
addConfigPolicy POST /cm/configPolicies
addCustomCerts POST /cm/commands/addCustomCerts Add custom certificates to the Auto-TLS certificate database.
beginTrial POST /cm/trial/begin Begin trial license.
clustersPerfInspectorCommand POST /cm/commands/clustersPerfInspector Run performance diagnostics test against specified clusters in ApiClustersPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.
collectDiagnosticDataCommand POST /cm/commands/collectDiagnosticData Collect diagnostic data from hosts managed by Cloudera Manager.
deleteConfigPolicy DELETE /cm/configPolicies
deleteCredentialsCommand POST /cm/commands/deleteCredentials Delete existing Kerberos credentials.
deleteInstances POST /cm/deleteInstances Remove a list of cm servers from ha cluster.
disableCsp POST /cm/commands/disableCsp Disables the CSP by setting csp type to "none", only when currently the csp type is either "embedded" or "vault".
enableCsp POST /cm/commands/enableCsp Enables the CSP by setting csp type to "vault" or "embedded" as chosen by the user.
endTrial POST /cm/trial/end End trial license.
generateCmca POST /cm/commands/generateCmca Generate a CMCA.
generateCredentialsAdhoc POST /cm/commands/generateCredentialsAdhoc Generate missing Kerberos credentials, optionally accepting a list of ad-hoc credentials to generate as well.
generateCredentialsCommand POST /cm/commands/generateCredentials Generate missing Kerberos credentials.
generateUsageReport POST /cm/generateUsageReport Generate Usage reports for clusters.
getClusterSupportTokenList GET /cm/clusterSupportTokens Gets the support tokens for all the clusters.
getConfig GET /cm/config Retrieve the Cloudera Manager settings.
getConfigPolicies GET /cm/configPolicies
getDeployment2 GET /cm/deployment Retrieve full description of the entire Cloudera Manager deployment including all hosts, clusters, services, roles, users, settings, etc.
getKerberosInfo GET /cm/kerberosInfo Provides Cloudera Manager Kerberos information.
getKerberosPrincipals GET /cm/kerberosPrincipals Returns the Kerberos principals needed by the services being managed by Cloudera Manager.
getKrb5Conf GET /cm/krb5conf Retrieves krb5.
getLicensedFeatureUsage GET /cm/licensedFeatureUsage Retrieve a summary of licensed feature usage.
getLog GET /cm/log Returns the entire contents of the Cloudera Manager log file.
getScmDbInfo GET /cm/scmDbInfo Provides Cloudera Manager server's database information.
getShutdownReadiness GET /cm/shutdownReadiness Retrieve Cloudera Manager's readiness for shutdown and destroy.
getUsageReport GET /cm/getUsageReport Retrieve the latest generated Usage reports for all clusters.
getVersion GET /cm/version Provides version information of Cloudera Manager itself.
hostInstallCommand POST /cm/commands/hostInstall Perform installation on a set of hosts.
hostsDecommissionCommand POST /cm/commands/hostsDecommission Decommission the given hosts.
hostsOfflineOrDecommissionCommand POST /cm/commands/hostsOfflineOrDecommission Decommission the given hosts.
hostsPerfInspectorCommand POST /cm/commands/hostsPerfInspector Run performance diagnostics test against specified hosts in ApiHostsPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.
hostsRecommissionAndExitMaintenanceModeCommand POST /cm/commands/hostsRecommissionAndExitMaintenanceMode Recommission and exit maintenance on the given hosts.
hostsRecommissionCommand POST /cm/commands/hostsRecommission Recommission the given hosts.
hostsRecommissionWithStartCommand POST /cm/commands/hostsRecommissionWithStart Recommission the given hosts.
hostsStartRolesCommand POST /cm/commands/hostsStartRoles Start all the roles on the given hosts.
hostsStopRolesCommand POST /cm/commands/hostsStopRoles Stop all the roles on the given hosts.
importAdminCredentials POST /cm/commands/importAdminCredentials Imports the KDC Account Manager credentials needed by Cloudera Manager to create kerberos principals needed by CDH services.
importClusterTemplate POST /cm/importClusterTemplate Create cluster as per the given cluster template.
importKerberosPrincipal POST /cm/commands/importKerberosPrincipal Imports the Kerberos credentials for the specified principal which can then be used to add to a role's keytab by running Generate Credentials command.
inspectHostsCommand POST /cm/commands/inspectHosts Runs the host inspector on the configured hosts.
listActiveCommands GET /cm/commands List active global commands.
listAllGeneratedUsageReports GET /cm/listAllGeneratedUsageReports retrieve all generated cluster usage reports currently on disk.
migrateCmcaToDb POST /cm/commands/migrateCmcaToDb Migrate CMCA to the DB.
readInstance GET /cm/instances/{cmServerId} Retrieves the CM server information.
readInstances GET /cm/instances Retrieves all CM server information.
readLicense GET /cm/license Retrieve information about the Cloudera Manager license.
refreshParcelRepos POST /cm/commands/refreshParcelRepos .
retrieveKeytab POST /cm/retrieveKeytab Retrieves a keytab for a list of principals.
rotateCspKeys POST /cm/commands/rotateCspKeys Perform rotation of the CSP key.
sendUsageReport POST /cm/sendUsageReport Send Usage reports for clusters to cloudera ops.
testExternalAuthentication POST /cm/commands/testExternalAuthentication Launches a command to test the currently configured external authentication.
updateConfig PUT /cm/config Update the Cloudera Manager settings.
updateCspType POST /cm/commands/updateCspType Updates the CSP type from previous csp type to new csp type, by copying the key_id (used for encryption of configs) from previous csp type to new csp type or from one location to another in same CSP type.
updateDeployment2 PUT /cm/deployment Apply the supplied deployment description to the system.
updateGlobalTruststore POST /cm/commands/updateGlobalTruststore Add/remove certificates to the Auto-TLS certificate truststore.
updateLicense POST /cm/license Updates the Cloudera Manager license.

addConfigPolicy

ApiConfigPolicy addConfigPolicy(body)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiConfigPolicy body = new ApiConfigPolicy(); // ApiConfigPolicy | 
try {
    ApiConfigPolicy result = apiInstance.addConfigPolicy(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#addConfigPolicy");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiConfigPolicy [optional]

Return type

ApiConfigPolicy

Authorization

basic

HTTP request headers

addCustomCerts

ApiCommand addCustomCerts(body)

Add custom certificates to the Auto-TLS certificate database.

Add custom certificates to the Auto-TLS certificate database

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiAddCustomCertsArguments body = new ApiAddCustomCertsArguments(); // ApiAddCustomCertsArguments | 
try {
    ApiCommand result = apiInstance.addCustomCerts(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#addCustomCerts");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiAddCustomCertsArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

beginTrial

beginTrial()

Begin trial license.

Begin trial license.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    apiInstance.beginTrial();
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#beginTrial");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

basic

HTTP request headers

clustersPerfInspectorCommand

ApiCommand clustersPerfInspectorCommand(body)

Run performance diagnostics test against specified clusters in ApiClustersPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.

Run performance diagnostics test against specified clusters in ApiClustersPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiClustersPerfInspectorArgs body = new ApiClustersPerfInspectorArgs(); // ApiClustersPerfInspectorArgs | Required arguments for the command. See ApiClustersPerfInspectorArgs.
try {
    ApiCommand result = apiInstance.clustersPerfInspectorCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#clustersPerfInspectorCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiClustersPerfInspectorArgs Required arguments for the command. See ApiClustersPerfInspectorArgs. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

collectDiagnosticDataCommand

ApiCommand collectDiagnosticDataCommand(body)

Collect diagnostic data from hosts managed by Cloudera Manager.

Collect diagnostic data from hosts managed by Cloudera Manager.

After the command has completed, the ApiCommand will contain a resultDataUrl from where you can download the result.

Only available with Cloudera Manager Enterprise Edition.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiCollectDiagnosticDataArguments body = new ApiCollectDiagnosticDataArguments(); // ApiCollectDiagnosticDataArguments | The command arguments.
try {
    ApiCommand result = apiInstance.collectDiagnosticDataCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#collectDiagnosticDataCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiCollectDiagnosticDataArguments The command arguments. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

deleteConfigPolicy

ApiConfigPolicy deleteConfigPolicy(name)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String name = "name_example"; // String | 
try {
    ApiConfigPolicy result = apiInstance.deleteConfigPolicy(name);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#deleteConfigPolicy");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
name String [optional]

Return type

ApiConfigPolicy

Authorization

basic

HTTP request headers

deleteCredentialsCommand

ApiCommand deleteCredentialsCommand(deleteCredentialsMode)

Delete existing Kerberos credentials.

Delete existing Kerberos credentials.

This command will affect all services that have been configured to use Kerberos, and have existing credentials. In V18 this takes a new paramater to determine whether it needs to delete all credentials or just unused ones.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String deleteCredentialsMode = "all"; // String | this can be set to \"all\" or \"unused\"
try {
    ApiCommand result = apiInstance.deleteCredentialsCommand(deleteCredentialsMode);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#deleteCredentialsCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deleteCredentialsMode String this can be set to "all" or "unused" [optional] [default to all]

Return type

ApiCommand

Authorization

basic

HTTP request headers

deleteInstances

ApiCmServerList deleteInstances(body)

Remove a list of cm servers from ha cluster.

Remove a list of cm servers from ha cluster.

Available since API v49. Removes instances of cm server.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiStringList body = new ApiStringList(); // ApiStringList | 
try {
    ApiCmServerList result = apiInstance.deleteInstances(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#deleteInstances");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiStringList [optional]

Return type

ApiCmServerList

Authorization

basic

HTTP request headers

disableCsp

ApiCommand disableCsp()

Disables the CSP by setting csp type to "none", only when currently the csp type is either "embedded" or "vault".

Disables the CSP by setting csp type to "none", only when currently the csp type is either "embedded" or "vault". This will decrypt the encrypted configurations and disable the use of Credential Storage Provider.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.disableCsp();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#disableCsp");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableCsp

ApiCommand enableCsp(body)

Enables the CSP by setting csp type to "vault" or "embedded" as chosen by the user.

Enables the CSP by setting csp type to "vault" or "embedded" as chosen by the user.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiEnableCspArguments body = new ApiEnableCspArguments(); // ApiEnableCspArguments | 
try {
    ApiCommand result = apiInstance.enableCsp(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#enableCsp");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiEnableCspArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

endTrial

endTrial()

End trial license.

End trial license.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    apiInstance.endTrial();
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#endTrial");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

basic

HTTP request headers

generateCmca

ApiCommand generateCmca(body)

Generate a CMCA.

Generate a CMCA

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiGenerateCmcaArguments body = new ApiGenerateCmcaArguments(); // ApiGenerateCmcaArguments | 
try {
    ApiCommand result = apiInstance.generateCmca(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#generateCmca");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiGenerateCmcaArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

generateCredentialsAdhoc

ApiCommand generateCredentialsAdhoc(body)

Generate missing Kerberos credentials, optionally accepting a list of ad-hoc credentials to generate as well.

Generate missing Kerberos credentials, optionally accepting a list of ad-hoc credentials to generate as well.

This command will affect all services that have been configured to use Kerberos, and haven't had their credentials generated yet.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiPrincipalList body = new ApiPrincipalList(); // ApiPrincipalList | 
try {
    ApiCommand result = apiInstance.generateCredentialsAdhoc(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#generateCredentialsAdhoc");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiPrincipalList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

generateCredentialsCommand

ApiCommand generateCredentialsCommand()

Generate missing Kerberos credentials.

Generate missing Kerberos credentials.

This command will affect all services that have been configured to use Kerberos, and haven't had their credentials generated yet.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.generateCredentialsCommand();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#generateCredentialsCommand");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

generateUsageReport

ApiCommand generateUsageReport(sendReportToCloudera, body)

Generate Usage reports for clusters.

Generate Usage reports for clusters

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
Boolean sendReportToCloudera = false; // Boolean | true/false, automatically send the generated reports to Cloudera or not
ApiClusterNameList body = new ApiClusterNameList(); // ApiClusterNameList | cluster names to generate usage reports for. By default will generate for all clusters.
try {
    ApiCommand result = apiInstance.generateUsageReport(sendReportToCloudera, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#generateUsageReport");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
sendReportToCloudera Boolean true/false, automatically send the generated reports to Cloudera or not [optional] [default to false]
body ApiClusterNameList cluster names to generate usage reports for. By default will generate for all clusters. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

getClusterSupportTokenList

ApiClusterSupportTokenList getClusterSupportTokenList()

Gets the support tokens for all the clusters.

Gets the support tokens for all the clusters.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiClusterSupportTokenList result = apiInstance.getClusterSupportTokenList();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getClusterSupportTokenList");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiClusterSupportTokenList

Authorization

basic

HTTP request headers

getConfig

ApiConfigList getConfig(view)

Retrieve the Cloudera Manager settings.

Retrieve the Cloudera Manager settings.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String view = "summary"; // String | The view to materialize, either \"summary\" or \"full\".
try {
    ApiConfigList result = apiInstance.getConfig(view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
view String The view to materialize, either "summary" or "full". [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiConfigList

Authorization

basic

HTTP request headers

getConfigPolicies

List<ApiConfigPolicy> getConfigPolicies()

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    List<ApiConfigPolicy> result = apiInstance.getConfigPolicies();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getConfigPolicies");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<ApiConfigPolicy>

Authorization

basic

HTTP request headers

getDeployment2

ApiDeployment2 getDeployment2(view)

Retrieve full description of the entire Cloudera Manager deployment including all hosts, clusters, services, roles, users, settings, etc.

Retrieve full description of the entire Cloudera Manager deployment including all hosts, clusters, services, roles, users, settings, etc.

This object can be used to reconstruct your entire deployment

Note: Only users with sufficient privileges are allowed to call this.

Note: starting with v19, the deployment information contains a newer version of users ApiUser2 that can hold granular permissions.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String view = "export"; // String | May be one of \"export\" (default) or \"export_redacted\".  The latter replaces configurations that are sensitive with the word \"REDACTED\". Other filter options are not supported.
try {
    ApiDeployment2 result = apiInstance.getDeployment2(view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getDeployment2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
view String May be one of "export" (default) or "export_redacted". The latter replaces configurations that are sensitive with the word "REDACTED". Other filter options are not supported. [optional] [default to export] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiDeployment2

Authorization

basic

HTTP request headers

getKerberosInfo

ApiKerberosInfo getKerberosInfo()

Provides Cloudera Manager Kerberos information.

Provides Cloudera Manager Kerberos information

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiKerberosInfo result = apiInstance.getKerberosInfo();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getKerberosInfo");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiKerberosInfo

Authorization

basic

HTTP request headers

getKerberosPrincipals

ApiPrincipalList getKerberosPrincipals(missingOnly)

Returns the Kerberos principals needed by the services being managed by Cloudera Manager.

Returns the Kerberos principals needed by the services being managed by Cloudera Manager.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
Boolean missingOnly = true; // Boolean | Whether to include only those principals which do not already exist in Cloudera Manager's database.
try {
    ApiPrincipalList result = apiInstance.getKerberosPrincipals(missingOnly);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getKerberosPrincipals");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
missingOnly Boolean Whether to include only those principals which do not already exist in Cloudera Manager's database. [optional]

Return type

ApiPrincipalList

Authorization

basic

HTTP request headers

getKrb5Conf

File getKrb5Conf()

Retrieves krb5.

Retrieves krb5.conf of the CM server host

Available since API v41.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    File result = apiInstance.getKrb5Conf();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getKrb5Conf");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

File

Authorization

basic

HTTP request headers

getLicensedFeatureUsage

ApiLicensedFeatureUsage getLicensedFeatureUsage()

Retrieve a summary of licensed feature usage.

Retrieve a summary of licensed feature usage.

This command will return information about what Cloudera Enterprise licensed features are in use in the clusters being managed by this Cloudera Manager, as well as totals for usage across all clusters.

The specific features described can vary between different versions of Cloudera Manager.

Available since API v6.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiLicensedFeatureUsage result = apiInstance.getLicensedFeatureUsage();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getLicensedFeatureUsage");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiLicensedFeatureUsage

Authorization

basic

HTTP request headers

getLog

String getLog()

Returns the entire contents of the Cloudera Manager log file.

Returns the entire contents of the Cloudera Manager log file

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    String result = apiInstance.getLog();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getLog");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

basic

HTTP request headers

getScmDbInfo

ApiScmDbInfo getScmDbInfo()

Provides Cloudera Manager server's database information.

Provides Cloudera Manager server's database information

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiScmDbInfo result = apiInstance.getScmDbInfo();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getScmDbInfo");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiScmDbInfo

Authorization

basic

HTTP request headers

getShutdownReadiness

ApiShutdownReadiness getShutdownReadiness(lastActivityTime)

Retrieve Cloudera Manager's readiness for shutdown and destroy.

Retrieve Cloudera Manager's readiness for shutdown and destroy. Applications that wish to destroy Cloudera Manager and its managed cluster should poll this API, repeatedly if necessary, to respect its readiness.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String lastActivityTime = "lastActivityTime_example"; // String | End time of the last known activity/workload against the managed clusters, in ISO 8601 format.
try {
    ApiShutdownReadiness result = apiInstance.getShutdownReadiness(lastActivityTime);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getShutdownReadiness");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
lastActivityTime String End time of the last known activity/workload against the managed clusters, in ISO 8601 format. [optional]

Return type

ApiShutdownReadiness

Authorization

basic

HTTP request headers

getUsageReport

List<String> getUsageReport()

Retrieve the latest generated Usage reports for all clusters.

Retrieve the latest generated Usage reports for all clusters

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    List<String> result = apiInstance.getUsageReport();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getUsageReport");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<String>

Authorization

basic

HTTP request headers

getVersion

ApiVersionInfo getVersion()

Provides version information of Cloudera Manager itself.

Provides version information of Cloudera Manager itself.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiVersionInfo result = apiInstance.getVersion();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#getVersion");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiVersionInfo

Authorization

basic

HTTP request headers

hostInstallCommand

ApiCommand hostInstallCommand(body)

Perform installation on a set of hosts.

Perform installation on a set of hosts.

This command installs Cloudera Manager Agent on a set of hosts.

Available since API v6.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostInstallArguments body = new ApiHostInstallArguments(); // ApiHostInstallArguments | Hosts to perform installation on
try {
    ApiCommand result = apiInstance.hostInstallCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostInstallCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostInstallArguments Hosts to perform installation on [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsDecommissionCommand

ApiCommand hostsDecommissionCommand(body)

Decommission the given hosts.

Decommission the given hosts. All slave roles on the hosts will be decommissioned. All other roles will be stopped.

To offline by Upgrade Domain, use the “upgradeDomains” endpoint from the clusters resource to get the list of host names that belong in each Upgrade Domain. Available since API v40.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | 
try {
    ApiCommand result = apiInstance.hostsDecommissionCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsDecommissionCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostNameList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsOfflineOrDecommissionCommand

ApiCommand hostsOfflineOrDecommissionCommand(offlineTimeout, body)

Decommission the given hosts.

Decommission the given hosts. All slave roles on the hosts will be offlined or decommissioned with preference being offlined if supported by the service.

Currently the offline operation is only supported by HDFS, where the offline operation will put DataNodes into HDFS IN MAINTENANCE state which prevents unnecessary re-replication which could occur if decommissioned.

All other roles on the hosts will be stopped.

The offlineTimeout parameter is used to specify a timeout for offline. For HDFS, when the timeout expires, the DataNode will automatically transition out of HDFS IN MAINTENANCE state, back to HDFS IN SERVICE state.

To offline or decommission by Upgrade Domain, use the “upgradeDomains” endpoint from the clusters resource to get the list of host names that belong in each Upgrade Domain. Available since API v40.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
java.math.BigDecimal offlineTimeout = new java.math.BigDecimal(); // java.math.BigDecimal | offline timeout in seconds. Specify as null to get the default timeout (4 hours). Ignored if service does not support he offline operation.
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | list of host names to decommission.
try {
    ApiCommand result = apiInstance.hostsOfflineOrDecommissionCommand(offlineTimeout, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsOfflineOrDecommissionCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
offlineTimeout java.math.BigDecimal offline timeout in seconds. Specify as null to get the default timeout (4 hours). Ignored if service does not support he offline operation. [optional]
body ApiHostNameList list of host names to decommission. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsPerfInspectorCommand

ApiCommand hostsPerfInspectorCommand(body)

Run performance diagnostics test against specified hosts in ApiHostsPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.

Run performance diagnostics test against specified hosts in ApiHostsPerfInspectorArgs User must be Full Administrator or Global Cluster Administrator.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostsPerfInspectorArgs body = new ApiHostsPerfInspectorArgs(); // ApiHostsPerfInspectorArgs | Required arguments for the command. See ApiHostsPerfInspectorArgs.
try {
    ApiCommand result = apiInstance.hostsPerfInspectorCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsPerfInspectorCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostsPerfInspectorArgs Required arguments for the command. See ApiHostsPerfInspectorArgs. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsRecommissionAndExitMaintenanceModeCommand

ApiCommand hostsRecommissionAndExitMaintenanceModeCommand(recommissionType, body)

Recommission and exit maintenance on the given hosts.

Recommission and exit maintenance on the given hosts. The recommission step may optionally start roles as well.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String recommissionType = "recommission"; // String | 
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | 
try {
    ApiCommand result = apiInstance.hostsRecommissionAndExitMaintenanceModeCommand(recommissionType, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsRecommissionAndExitMaintenanceModeCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
recommissionType String [optional] [default to recommission] [enum: RECOMMISSION, RECOMMISSION_WITH_START]
body ApiHostNameList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsRecommissionCommand

ApiCommand hostsRecommissionCommand(body)

Recommission the given hosts.

Recommission the given hosts. All slave roles on the hosts will be recommissioned. Roles are not started after this command. Use hostsStartRoles command for that.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | 
try {
    ApiCommand result = apiInstance.hostsRecommissionCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsRecommissionCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostNameList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsRecommissionWithStartCommand

ApiCommand hostsRecommissionWithStartCommand(body)

Recommission the given hosts.

Recommission the given hosts. If slave roles support start when decommissioned, start those roles before recommission. All slave roles on the hosts will be recommissioned. Warning: Evolving. This method may change in the future and does not offer standard compatibility guarantees. Recommission the given hosts. If possible, start those roles before recommission. All slave roles on the hosts will be recommissioned. Do not use without guidance from Cloudera. Currently, only HDFS DataNodes will be started by this command.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | 
try {
    ApiCommand result = apiInstance.hostsRecommissionWithStartCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsRecommissionWithStartCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostNameList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsStartRolesCommand

ApiCommand hostsStartRolesCommand(body)

Start all the roles on the given hosts.

Start all the roles on the given hosts.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | 
try {
    ApiCommand result = apiInstance.hostsStartRolesCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsStartRolesCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostNameList [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hostsStopRolesCommand

ApiCommand hostsStopRolesCommand(body)

Stop all the roles on the given hosts.

Stop all the roles on the given hosts.

Available since API v51. Stops roles on the given hosts.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiHostNameList body = new ApiHostNameList(); // ApiHostNameList | list of hosts
try {
    ApiCommand result = apiInstance.hostsStopRolesCommand(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#hostsStopRolesCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiHostNameList list of hosts [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

importAdminCredentials

ApiCommand importAdminCredentials(password, username)

Imports the KDC Account Manager credentials needed by Cloudera Manager to create kerberos principals needed by CDH services.

Imports the KDC Account Manager credentials needed by Cloudera Manager to create kerberos principals needed by CDH services.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String password = "password_example"; // String | Password for the Account Manager.  return Information about the submitted command.
String username = "username_example"; // String | Username of the Account Manager. Full name including the Kerberos realm must be specified.
try {
    ApiCommand result = apiInstance.importAdminCredentials(password, username);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#importAdminCredentials");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
password String Password for the Account Manager. return Information about the submitted command. [optional]
username String Username of the Account Manager. Full name including the Kerberos realm must be specified. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

importClusterTemplate

ApiCommand importClusterTemplate(addRepositories, body)

Create cluster as per the given cluster template.

Create cluster as per the given cluster template

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
Boolean addRepositories = false; // Boolean | if true the parcels repositories in the cluster template will be added.
ApiClusterTemplate body = new ApiClusterTemplate(); // ApiClusterTemplate | cluster template
try {
    ApiCommand result = apiInstance.importClusterTemplate(addRepositories, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#importClusterTemplate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
addRepositories Boolean if true the parcels repositories in the cluster template will be added. [optional] [default to false]
body ApiClusterTemplate cluster template [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

importKerberosPrincipal

ApiCommand importKerberosPrincipal(kvno, password, principal)

Imports the Kerberos credentials for the specified principal which can then be used to add to a role's keytab by running Generate Credentials command.

Imports the Kerberos credentials for the specified principal which can then be used to add to a role's keytab by running Generate Credentials command.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
java.math.BigDecimal kvno = new java.math.BigDecimal(); // java.math.BigDecimal | Key-version number of the password.  return Information about the submitted command.
String password = "password_example"; // String | Password for the Kerberos principal. Cloudera Manager will encrypt the principal and password and use it when needed for a daemon.
String principal = "principal_example"; // String | Name of the principal. Full name including the Kerberos realm must be specified. If it already exists, it will be overwritten.
try {
    ApiCommand result = apiInstance.importKerberosPrincipal(kvno, password, principal);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#importKerberosPrincipal");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
kvno java.math.BigDecimal Key-version number of the password. return Information about the submitted command. [optional]
password String Password for the Kerberos principal. Cloudera Manager will encrypt the principal and password and use it when needed for a daemon. [optional]
principal String Name of the principal. Full name including the Kerberos realm must be specified. If it already exists, it will be overwritten. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

inspectHostsCommand

ApiCommand inspectHostsCommand()

Runs the host inspector on the configured hosts.

Runs the host inspector on the configured hosts.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.inspectHostsCommand();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#inspectHostsCommand");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

listActiveCommands

ApiCommandList listActiveCommands(view)

List active global commands.

List active global commands.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
    ApiCommandList result = apiInstance.listActiveCommands(view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#listActiveCommands");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
view String The view of the data to materialize, either "summary" or "full". [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiCommandList

Authorization

basic

HTTP request headers

listAllGeneratedUsageReports

String listAllGeneratedUsageReports()

retrieve all generated cluster usage reports currently on disk.

retrieve all generated cluster usage reports currently on disk

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    String result = apiInstance.listAllGeneratedUsageReports();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#listAllGeneratedUsageReports");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

basic

HTTP request headers

migrateCmcaToDb

ApiCommand migrateCmcaToDb()

Migrate CMCA to the DB.

Migrate CMCA to the DB

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.migrateCmcaToDb();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#migrateCmcaToDb");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

readInstance

ApiCmServer readInstance(cmServerId)

Retrieves the CM server information.

Retrieves the CM server information.

Available since API v41.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String cmServerId = "cmServerId_example"; // String | The CM server ID.
try {
    ApiCmServer result = apiInstance.readInstance(cmServerId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#readInstance");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
cmServerId String The CM server ID.

Return type

ApiCmServer

Authorization

basic

HTTP request headers

readInstances

ApiCmServerList readInstances()

Retrieves all CM server information.

Retrieves all CM server information.

Available since API v41.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCmServerList result = apiInstance.readInstances();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#readInstances");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCmServerList

Authorization

basic

HTTP request headers

readLicense

ApiLicense readLicense()

Retrieve information about the Cloudera Manager license.

Retrieve information about the Cloudera Manager license.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiLicense result = apiInstance.readLicense();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#readLicense");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiLicense

Authorization

basic

HTTP request headers

refreshParcelRepos

ApiCommand refreshParcelRepos()

.

Submit a command to refresh parcels information.

This API could be used following two scenarios.
- User updated Cloudera Manager's local parcel repository.
- User updated remote parcel locations.

User wants to invoke this API to make sure that Cloudera Manager gets latest parcels information. User can then monitor the returned command before proceeding to the next step.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.refreshParcelRepos();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#refreshParcelRepos");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

retrieveKeytab

File retrieveKeytab(body)

Retrieves a keytab for a list of principals.

Retrieves a keytab for a list of principals. The principals must already exist.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiPrincipalList body = new ApiPrincipalList(); // ApiPrincipalList | 
try {
    File result = apiInstance.retrieveKeytab(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#retrieveKeytab");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiPrincipalList [optional]

Return type

File

Authorization

basic

HTTP request headers

rotateCspKeys

ApiCommand rotateCspKeys()

Perform rotation of the CSP key.

Perform rotation of the CSP key. The previously encrypted text will be decrypted using the older key. Then It will be re-encrypted using the new CSP key.The new encrypted text will be stored in the database.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.rotateCspKeys();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#rotateCspKeys");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

sendUsageReport

ApiCommand sendUsageReport()

Send Usage reports for clusters to cloudera ops.

Send Usage reports for clusters to cloudera ops

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
try {
    ApiCommand result = apiInstance.sendUsageReport();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#sendUsageReport");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiCommand

Authorization

basic

HTTP request headers

testExternalAuthentication

ApiCommand testExternalAuthentication(body)

Launches a command to test the currently configured external authentication.

Launches a command to test the currently configured external authentication

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiTestCmExternalAuthArguments body = new ApiTestCmExternalAuthArguments(); // ApiTestCmExternalAuthArguments | 
try {
    ApiCommand result = apiInstance.testExternalAuthentication(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#testExternalAuthentication");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiTestCmExternalAuthArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

updateConfig

ApiConfigList updateConfig(message, body)

Update the Cloudera Manager settings.

Update the Cloudera Manager settings.

If a value is set in the given configuration, it will be added to the manager's settings, replacing any existing entry. If a value is unset (its value is null), the existing the setting will be erased.

Settings that are not listed in the input will maintain their current values.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
String message = "message_example"; // String | Optional message describing the changes.
ApiConfigList body = new ApiConfigList(); // ApiConfigList | Settings to update.
try {
    ApiConfigList result = apiInstance.updateConfig(message, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#updateConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
message String Optional message describing the changes. [optional]
body ApiConfigList Settings to update. [optional]

Return type

ApiConfigList

Authorization

basic

HTTP request headers

updateCspType

ApiCommand updateCspType(body)

Updates the CSP type from previous csp type to new csp type, by copying the key_id (used for encryption of configs) from previous csp type to new csp type or from one location to another in same CSP type.

Updates the CSP type from previous csp type to new csp type, by copying the key_id (used for encryption of configs) from previous csp type to new csp type or from one location to another in same CSP type.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiUpdateCspTypeArguments body = new ApiUpdateCspTypeArguments(); // ApiUpdateCspTypeArguments | 
try {
    ApiCommand result = apiInstance.updateCspType(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#updateCspType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiUpdateCspTypeArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

updateDeployment2

ApiDeployment2 updateDeployment2(deleteCurrentDeployment, body)

Apply the supplied deployment description to the system.

Apply the supplied deployment description to the system. This will create the clusters, services, hosts and other objects specified in the argument. This call does not allow for any merge conflicts. If an entity already exists in the system, this call will fail. You can request, however, that all entities in the system are deleted before instantiating the new ones.

You may specify a complete or partial deployment, e.g. you can provide host info with no clusters. However, if you request that the current deployment be deleted, you are required to specify at least one admin user or this call will fail. This is to protect you from creating a system that cannot be logged into again.

If there are any errors creating (or optionally deleting) a deployment, all changes will be rolled back leaving the system exactly as it was before calling this method. The system will never be left in a state where part of the deployment is created and other parts are not.

If the submitted deployment contains entities that require Cloudera Enterprise license, then the license should be provided to Cloudera Manager before making this API call.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
Boolean deleteCurrentDeployment = false; // Boolean | If true, the current deployment is deleted before the specified deployment is applied
ApiDeployment2 body = new ApiDeployment2(); // ApiDeployment2 | The deployment to create
try {
    ApiDeployment2 result = apiInstance.updateDeployment2(deleteCurrentDeployment, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#updateDeployment2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
deleteCurrentDeployment Boolean If true, the current deployment is deleted before the specified deployment is applied [optional] [default to false]
body ApiDeployment2 The deployment to create [optional]

Return type

ApiDeployment2

Authorization

basic

HTTP request headers

updateGlobalTruststore

ApiCommand updateGlobalTruststore(body)

Add/remove certificates to the Auto-TLS certificate truststore.

Add/remove certificates to the Auto-TLS certificate truststore

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
ApiUpdateGlobalTruststoreArguments body = new ApiUpdateGlobalTruststoreArguments(); // ApiUpdateGlobalTruststoreArguments | 
try {
    ApiCommand result = apiInstance.updateGlobalTruststore(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#updateGlobalTruststore");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body ApiUpdateGlobalTruststoreArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

updateLicense

ApiLicense updateLicense(license)

Updates the Cloudera Manager license.

Updates the Cloudera Manager license.

After a new license is installed, the Cloudera Manager needs to be restarted for the changes to take effect.

The license file should be uploaded using a request with content type "multipart/form-data", instead of being encoded into a JSON representation.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ClouderaManagerResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ClouderaManagerResourceApi apiInstance = new ClouderaManagerResourceApi();
File license = new File("/path/to/file.txt"); // File | 
try {
    ApiLicense result = apiInstance.updateLicense(license);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ClouderaManagerResourceApi#updateLicense");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
license File [optional]

Return type

ApiLicense

Authorization

basic

HTTP request headers