controllers_v2.security_controller module

class controllers_v2.security_controller.SecurityController(config=None, client=None, call_back=None)[source]

Bases: cohesity_management_sdk.controllers_v2.base_controller.BaseController

A Controller to access Endpoints in the cohesity_management_sdk API.

create_clientcsr(body)[source]

Does a POST request to /clientcsr.

Create two Certificate Signing Request on the cluster with the given details one each for client and server. Each service can have at most one outstanding pair of CSR.

Args:
body (CommonCsrRequestParams): Specifies the parameters to create

the Certificate Signing Requests.

Returns:

CreateCSRResponse: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

create_csr(body)[source]

Does a POST request to /csr.

Create a Certificate Signing Request on the cluster with the given details. Each service has at most one outstanding CSR.

Args:
body (CommonCsrRequestParams): Specifies the parameters to create

a Certificate Signing Request.

Returns:

CommonCsrResponseParams: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

delete_csr(id)[source]

Does a DELETE request to /csr/{id}.

Delete a Certificate Signing Request on the cluster.

Args:

id (string): Specifies the id of the csr to be deleted.

Returns:

void: Response from the API. No Content

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_ciphers()[source]

Does a GET request to /ciphers.

Gets the list of ciphers enabled on the cluster.

Returns:
ResponseWithTwoListsAListOfEnabledCiphersAndAListOfDisabledCiphers:

Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_csr_by_id(id)[source]

Does a GET request to /csr/{id}.

List the specified Certificate Signing Request.

Args:

id (string): Specifies the id of the csr.

Returns:

CommonCsrResponseParams: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_csr_list(service_name=None, ids=None)[source]

Does a GET request to /csr.

List Certificate Signing Requests on the cluster with service name filtering.

Args:
service_name (ServiceName1Enum, optional): Specifies the Cohesity

service name for which the CSR is generated. If this is not specified, all the csrs on the cluster will be returned.

ids (list of string, optional): Specifies the ids of the csrs. If

this is not specified, all the csrs on the cluster will be returned.

Returns:

list of CommonCsrResponseParams: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

import_certificate_by_clientcsr(body)[source]

Does a POST request to /clientcsr/certificate.

Import the signed certificates on the cluster after the Certificate Signing Requests are created.

Args:
body (ImportCertificateByClientcsrRequest): Specifies the

parameters to import the certificate.

Returns:

ImportCertificateResponse: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

modify_ciphers(body)[source]

Does a POST request to /ciphers.

Enable/Disable a list of ciphers on the cluster.

Args:
body (RequestToEnableDisableAListOfCiphers): Enable/Disable

ciphers.

Returns:
ResponseWithTwoListsAListOfEnabledCiphersAndAListOfDisabledCiphers:

Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

update_certificate_by_csr(body)[source]

Does a POST request to /csr/certificate.

Update the signed certificate on the cluster after a Certificate Signing Request is created.

Args:
body (UpdateCertificateByCsrRequest): Specifies the parameters to

update the certificate.

Returns:

UpdateCertificateResponse: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.