cm_client.CertManagerResourceApi

All URIs are relative to /api/v57

Method HTTP request Description
generate_certificate POST /certs/generateCertificate Exchange a cert request token for a certificate.
get_truststore GET /certs/truststore Gets the Auto-TLS truststore contents.
get_truststore_password GET /certs/truststorePassword Gets the configured CM truststore password.

generate_certificate

str generate_certificate(body=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

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.CertManagerResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiCertificateRequest() # ApiCertificateRequest |  (optional)

try:
    # Exchange a cert request token for a certificate.
    api_response = api_instance.generate_certificate(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertManagerResourceApi->generate_certificate: %s\n" % e)

Parameters

Name Type Description Notes
body ApiCertificateRequest [optional]

Return type

str

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_truststore

str get_truststore(type=type)

Gets the Auto-TLS truststore contents.

Gets the Auto-TLS truststore contents

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.CertManagerResourceApi(cm_client.ApiClient(configuration))
type = 'type_example' # str | truststore type. Must be \"JKS\" or \"PEM\". (optional)

try:
    # Gets the Auto-TLS truststore contents.
    api_response = api_instance.get_truststore(type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertManagerResourceApi->get_truststore: %s\n" % e)

Parameters

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

Return type

str

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_truststore_password

str get_truststore_password()

Gets the configured CM truststore password.

Gets the configured CM truststore password

Example

from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = cm_client.CertManagerResourceApi(cm_client.ApiClient(configuration))

try:
    # Gets the configured CM truststore password.
    api_response = api_instance.get_truststore_password()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CertManagerResourceApi->get_truststore_password: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]