controllers_v2.search_controller module¶
-
class
controllers_v2.search_controller.
SearchController
(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.
-
search_indexed_objects
(body)[source]¶ Does a POST request to /data-protect/search/indexed-objects.
List all the indexed objects like files and folders, emails, mailboxes etc., from protected objects.
- Args:
- body (SearchIndexedObjectsRequestParams): Specifies the parameters
to search for indexed objects.
- Returns:
SearchIndexedObjectsResponseBody: 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.
-
search_protected_objects
(search_string=None, environments=None, snapshot_actions=None, tenant_ids=None, include_tenants=None, protection_group_ids=None, object_ids=None, storage_domain_ids=None, filter_snapshot_from_usecs=None, filter_snapshot_to_usecs=None, os_types=None, source_ids=None)[source]¶ Does a GET request to /data-protect/search/protected-objects.
List Protected Objects.
- Args:
- search_string (string, optional): Specifies the search string to
filter the objects. This search string will be applicable for objectnames and Protection Group names. User can specify a wildcard character ‘*’ as a suffix to a string where all object and their Protection Group names are matched with the prefix string. For example, if vm1 and vm2 are the names of objects, user can specify vm* to list the objects. If not specified, then all the objects with Protection Groups will be returned which will match other filtering criteria.
- environments (list of Environment20Enum, optional): Specifies the
environment type to filter objects.
- snapshot_actions (list of SnapshotActions2Enum, optional):
Specifies a list of recovery actions. Only snapshots that applies to these actions will be returned.
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- include_tenants (bool, optional): If true, the response will
include Objects which belongs to all tenants which the current user has permission to see.
- protection_group_ids (list of string, optional): Specifies a list
of Protection Group ids to filter the objects. If specified, the objects protected by specified Protection Group ids will be returned.
- object_ids (list of long|int, optional): Specifies a list of
Object ids to filter.
- storage_domain_ids (list of long|int, optional): Specifies the
Storage Domain ids to filter objects for which Protection Groups are writing data to Cohesity Views on the specified Storage Domains.
- filter_snapshot_from_usecs (long|int, optional): Specifies the
timestamp in Unix time epoch in microseconds to filter the objects if the Object has a successful snapshot after this value.
- filter_snapshot_to_usecs (long|int, optional): Specifies the
timestamp in Unix time epoch in microseconds to filter the objects if the Object has a successful snapshot before this value.
- os_types (list of OsType1Enum, optional): Specifies the operating
system types to filter objects on.
- source_ids (list of long|int, optional): Specifies a list of
Protection Source object ids to filter the objects. If specified, the object which are present in those Sources will be returned.
- Returns:
ProtectedObjectsSearchResult: 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.
-