controllers.remote_restore_controller module

class controllers.remote_restore_controller.RemoteRestoreController(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_remote_vault_restore_task(body)[source]

Does a POST request to /public/remoteVaults/restoreTasks.

Returns the id of the remote Vault restore Task that was created. After a Vault is searched by a search Job, this operation can be called to create a task that restores the indexes and/or the Snapshots of a Protection Job, which were archived on a remote Vault (External Target). This is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster.

Args:
body (CreateRemoteVaultRestoreTaskParameters): Request to create a

remote Vault restore task.

Returns:

UniversalId: 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_remote_vault_search_job(body)[source]

Does a POST request to /public/remoteVaults/searchJobs.

A search Job finds Protection Jobs that archived data to a Vault (External Target) which also match the specified search criteria. The results can be optionally filtered by specifying a Cluster match string, a Protection Job match string, a start time and an end time. This is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster. NOTE: A Vault is equivalent to an External Target in the Cohesity Dashboard. A search Job is equivalent to a search task in the Cohesity Dashboard.

Args:
body (CreateRemoteVaultSearchJobParameters): Request to create a

search of a remote Vault.

Returns:

CreatedRemoteVaultSearchJobUid: 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_stop_remote_vault_search_job(body)[source]

Does a DELETE request to /public/remoteVaults/searchJobs.

This is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster.

Args:
body (StopRemoteVaultSearchJobParameters): Request to stop a

Remote Vault Search Job.

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_remote_vault_search_job_results(search_job_id, cluster_id, cluster_incarnation_id, page_count=None, cluster_name=None, cookie=None)[source]

Does a GET request to /public/remoteVaults/searchJobResults.

Specify a unique id of the search Job using a combination of the searchJobId, clusterId, and clusterIncarnationId parameters, which are all required. The results can be optionally filtered by the remote Cluster name. This is part of the CloudRetrieve functionality for finding and restoring archived data from a remote Vault.

Args:
search_job_id (long|int): Specifies the id of the remote Vault

search Job assigned by the Cohesity Cluster. Used in combination with the clusterId and clusterIncarnationId to uniquely identify the search Job.

cluster_id (long|int): Specifies the Cohesity Cluster id where the

search Job was created. Used in combination with the searchJobId and clusterIncarnationId to uniquely identify the search Job.

cluster_incarnation_id (long|int): Specifies the incarnation id of

the Cohesity Cluster where the search Job was created. Used in combination with the searchJobId and clusterId to uniquely identify the search Job.

page_count (int, optional): Specifies the number of Protection

Jobs to return in the response to support pagination.

cluster_name (string, optional): Optionally filter the result by

the remote Cohesity Cluster name.

cookie (string, optional): Specifies the opaque string cookie

returned by the previous response, to get next set of results. Used in combination with pageCount to support pagination.

Returns:

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

list_cloud_domain_migration()[source]

Does a GET request to /public/remoteVaults/cloudDomainMigration.

Returns the Cloud domain migration info.

Returns:

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

list_remote_vault_restore_tasks()[source]

Does a GET request to /public/remoteVaults/restoreTasks.

A remote Vault restore task can restore archived data from a Vault (External Target) to this local Cluster. This is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster.

Returns:
list of RemoteVaultRestoreTaskStatus: 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.

list_remote_vault_search_job_by_id(id)[source]

Does a GET request to /public/remoteVaults/searchJobs/{id}.

Specify an id for a completed or running search Job. A search Job finds data that has been archived to a Vault (External Target). The returned results do not include Job Run (Snapshot) information. It is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster.

Args:
id (long|int): Specifies the id of the remote Vault search Job to

return.

Returns:

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

list_remote_vault_search_jobs()[source]

Does a GET request to /public/remoteVaults/searchJobs.

List all the searches of remote Vaults (External Targets) that have run or are running on this Cohesity Cluster. A search finds Protection Jobs that have archived to a Vault (External Target). This is part of the CloudRetrieve functionality for finding and restoring archived data from remote Vaults to an alternative (non-original) Cluster. NOTE: A Vault is equivalent to an External Target in the Cohesity Dashboard. A search Job is equivalent to a search task in the Cohesity Dashboard.

Returns:
list of RemoteVaultSearchJobInformation: 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.

schedule_cloud_domain_migration()[source]

Does a POST request to /public/remoteVaults/cloudDomainMigration.

Returns the updated bandwidth limits.

Returns:

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

upload_vault_encryption_keys(id, body=None)[source]

Does a PUT request to /public/remoteVaults/encryptionKeys/{id}.

This request contains multiple files stored as multipart mime data. Each file has a key used to encrypt data between a remote Cluster and the remote Vault. Content of the file should be same as the file downloaded from the remote Cluster.

Args:

id (long|int): Specifies a unique id of the Vault. body (list of VaultEncryptionKey, optional): Request to upload

encryption keys of a remote Vault.

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.