controllers.view_boxes_controller module¶
-
class
controllers.view_boxes_controller.
ViewBoxesController
(config=None, client=None, call_back=None)[source]¶ Bases:
cohesity_management_sdk.controllers.base_controller.BaseController
A Controller to access Endpoints in the cohesity_management_sdk API.
-
create_view_box
(body)[source]¶ Does a POST request to /public/viewBoxes.
Returns the created Domain (View Box).
- Args:
- body (CreateViewBoxParams): Request to create a Storage Domain
(View Box) configuration.
- Returns:
ViewBox: 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_view_box
(id)[source]¶ Does a DELETE request to /public/viewBoxes/{id}.
Returns delete status upon completion.
- Args:
id (long|int): Id of the Storage Domain (View Box)
- 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_view_box_by_id
(id, fetch_stats=None)[source]¶ Does a GET request to /public/viewBoxes/{id}.
Returns the Domain (View Box) corresponding to the specified Domain (View Box) Id.
- Args:
id (long|int): Id of the Storage Domain (View Box) fetch_stats (bool, optional): Specifies whether to include usage
and performance statistics.
- Returns:
ViewBox: 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_view_boxes
(tenant_ids=None, all_under_hierarchy=None, ids=None, names=None, cluster_partition_ids=None, fetch_stats=None, fetch_time_series_schema=None, template_id=None)[source]¶ Does a GET request to /public/viewBoxes.
If no parameters are specified, all Domains (View Boxes) currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.
- Args:
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- ids (list of long|int, optional): Filter by a list of Storage
Domain (View Box) ids. If empty, View Boxes are not filtered by id.
- names (list of string, optional): Filter by a list of Storage
Domain (View Box) Names. If empty, Storage Domains (View Boxes) are not filtered by Name.
- cluster_partition_ids (list of long|int, optional): Filter by a
list of Cluster Partition Ids.
- fetch_stats (bool, optional): Specifies whether to include usage
and performance statistics.
- fetch_time_series_schema (bool, optional): Specifies whether to
get time series schema info of the view box.
- template_id (int|long, optional): Filter list of Storage Domain
(View Box) by the properties of the template like dedup, compression. If empty, Storage Domains (View Boxes) are not filtered.
- Returns:
list of ViewBox: 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_view_box
(id, body)[source]¶ Does a PUT request to /public/viewBoxes/{id}.
Returns the updated Domain (View Box).
- Args:
id (long|int): Id of the Storage Domain (View Box) body (CreateViewBoxParams): Request to update a Storage Domain
(View Box) configuration.
- Returns:
ViewBox: 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.
-