controllers_v2.audit_log_controller module

class controllers_v2.audit_log_controller.AuditLogController(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.

get_audit_logs(search_string=None, usernames=None, domains=None, entity_types=None, actions=None, start_time_usecs=None, end_time_usecs=None, tenant_ids=None, include_tenants=None, start_index=None, count=None)[source]

Does a GET request to /audit-logs.

Get a cluster audit logs.

Args:
search_string (string, optional): Search audit logs by

‘entityName’ or ‘details’.

usernames (list of string, optional): Specifies a list of

usernames, only audit logs made by these users will be returned.

domains (list of string, optional): Specifies a list of domains,

only audit logs made by user in these domains will be returned.

entity_types (list of EntityTypes2Enum, optional): Specifies a

list of entity types, only audit logs containing these entity types will be returned.

actions (list of Actions1Enum, optional): Specifies a list of

actions, only audit logs containing these actions will be returned.

start_time_usecs (long|int, optional): Specifies a unix timestamp

in microseconds, only audit logs made after this time will be returned.

end_time_usecs (long|int, optional): Specifies a unix timestamp in

microseconds, only audit logs made before this time will be returned.

tenant_ids (list of string, optional): Specifies a list of tenant

ids, only audit logs made by these tenants will be returned.

include_tenants (bool, optional): If true, the response will

include Protection Groups which were created by all tenants which the current user has permission to see. If false, then only Protection Groups created by the current user will be returned.

start_index (long|int, optional): Specifies a start index. The

oldest logs before this index will skipped, only audit logs from this index will be fetched.

count (long|int, optional): Specifies the number of indexed

obejcts to be fetched from the specified start index.

Returns:

AuditLogs: 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_audit_logs_actions()[source]

Does a GET request to /audit-logs/actions.

Get all actions of cluster audit logs.

Returns:

AuditLogsActions: 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_audit_logs_entity_types()[source]

Does a GET request to /audit-logs/entity-types.

Get all entity types of cluster audit logs.

Returns:

AuditLogsEntityTypes: 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_filer_audit_log_configs()[source]

Does a GET request to /audit-logs/filer-configs.

Get filer audit log configs.

Returns:

FilerAuditLogConfigs: 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_filer_audit_log_configs(body)[source]

Does a PUT request to /audit-logs/filer-configs.

Update filer audit log configs.

Args:
body (FilerAuditLogConfigs): Specifies the filer audit log config

to update.

Returns:

FilerAuditLogConfigs: 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.