All URIs are relative to https://localhost/api/v46
Method | HTTP request | Description |
---|---|---|
generateCertificate | POST /certs/generateCertificate | Exchange a cert request token for a certificate. |
getTruststore | GET /certs/truststore | Gets the Auto-TLS truststore contents. |
getTruststorePassword | GET /certs/truststorePassword | Gets the configured CM truststore password. |
File generateCertificate(body)
Exchange a cert request token for a certificate.
Exchange a cert request token for a certificate. The token must be a valid token generated by the certmanager utility. The resulting certificate will containin a TLS certificate in JKS and PEM formats. It might optionally contain a private key in JKS and PEM format, corresponding to the certificate. The tar file is designed to be consumed by the "cm install_certs" command to install TLS certificates on a Cloudera Manager agent host.
// 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.CertManagerResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CertManagerResourceApi apiInstance = new CertManagerResourceApi();
ApiCertificateRequest body = new ApiCertificateRequest(); // ApiCertificateRequest |
try {
File result = apiInstance.generateCertificate(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CertManagerResourceApi#generateCertificate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ApiCertificateRequest | [optional] |
File getTruststore(type)
Gets the Auto-TLS truststore contents.
Gets the Auto-TLS truststore contents
// 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.CertManagerResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CertManagerResourceApi apiInstance = new CertManagerResourceApi();
String type = "type_example"; // String | truststore type. Must be \"JKS\" or \"PEM\".
try {
File result = apiInstance.getTruststore(type);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CertManagerResourceApi#getTruststore");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
type | String | truststore type. Must be "JKS" or "PEM". | [optional] |
String getTruststorePassword()
Gets the configured CM truststore password.
Gets the configured CM truststore password
// 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.CertManagerResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CertManagerResourceApi apiInstance = new CertManagerResourceApi();
try {
String result = apiInstance.getTruststorePassword();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CertManagerResourceApi#getTruststorePassword");
e.printStackTrace();
}
This endpoint does not need any parameter.
String