All URIs are relative to /api/v57
Method | HTTP request | Description |
---|---|---|
readConfig | GET /cm/allHosts/config | Retrieve the default configuration for all hosts. |
updateConfig | PUT /cm/allHosts/config | Update the default configuration values for all hosts. |
ApiConfigList readConfig(view)
Retrieve the default configuration for all hosts.
Retrieve the default configuration for all hosts.
These values will apply to all hosts managed by CM unless overridden at the host level.// 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.AllHostsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
AllHostsResourceApi apiInstance = new AllHostsResourceApi();
String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
ApiConfigList result = apiInstance.readConfig(view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AllHostsResourceApi#readConfig");
e.printStackTrace();
}
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, FULL_WITH_NO_HEALTH_CHECK, SUMMARY] |
ApiConfigList updateConfig(body, message)
Update the default configuration values for all hosts.
Update the default configuration values for all hosts.
Note that this does not override values set at the host level. It just updates the default values that will be inherited by each host's configuration.// 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.AllHostsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
AllHostsResourceApi apiInstance = new AllHostsResourceApi();
ApiConfigList body = new ApiConfigList(); // ApiConfigList | The config values to update.
String message = "message_example"; // String | Optional message describing the changes.
try {
ApiConfigList result = apiInstance.updateConfig(body, message);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AllHostsResourceApi#updateConfig");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ApiConfigList | The config values to update. | [optional] |
message | String | Optional message describing the changes. | [optional] |