CertManagerResourceApi

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

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.

generateCertificate

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.

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.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();
}

Parameters

Name Type Description Notes
body ApiCertificateRequest [optional]

Return type

File

Authorization

basic

HTTP request headers

getTruststore

File getTruststore(type)

Gets the Auto-TLS truststore contents.

Gets the Auto-TLS truststore contents

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.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();
}

Parameters

Name Type Description Notes
type String truststore type. Must be "JKS" or "PEM". [optional]

Return type

File

Authorization

basic

HTTP request headers

getTruststorePassword

String getTruststorePassword()

Gets the configured CM truststore password.

Gets the configured CM truststore password

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.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();
}

Parameters

This endpoint does not need any parameter.

Return type

String

Authorization

basic

HTTP request headers