controllers_v2.protection_sources_controller module

class controllers_v2.protection_sources_controller.ProtectionSourcesController(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.

delete_protection_source_registration(id)[source]

Does a DELETE request to /data-protect/sources/registrations/{id}.

Delete Protection Source Registration.

Args:
id (long|int): Specifies the ID of the Protection Source

Registration.

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_catalogs_for_vdc(id)[source]

Does a GET request to /data-protect/sources/virtual-datacenter/{id}/catalogs.

Get the list of catalogs associated with a VMware virtual datacenter.

Args:

id (long|int): Specifies the ID of the VMware virtual datacenter.

Returns:

VDCCatalogs: 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_protection_source_registration(id)[source]

Does a GET request to /data-protect/sources/registrations/{id}.

Get a Protection Source registration.

Args:
id (long|int): Specifies the id of the Protection Source

registration.

Returns:

SourceRegistration: 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_protection_sources(tenant_ids=None, include_tenants=None)[source]

Does a GET request to /data-protect/sources.

Get a List of Protection Sources.

Args:
tenant_ids (list of string, optional): TenantIds contains ids of

the tenants for which Sources are to be returned.

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

include Sources which belong belong to all tenants which the current user has permission to see. If false, then only Sources for the current user will be returned.

Returns:

Sources: 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_source_attribute_filters(source_uuid, environment=None)[source]

Does a GET request to /data-protect/sources/filters.

Get a List of attribute filters for leaf entities within a a source

Args:
source_uuid (string): Specifies the source UUID of the parent

entity.

environment (Environment23Enum, optional): Specifies the

environment type of the Protection Source.

Returns:
SourceAttributeFiltersResponseParams: 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_source_registrations(tenant_ids=None, include_tenants=None)[source]

Does a GET request to /data-protect/sources/registrations.

Get the list of Protection Source registrations.

Args:
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 Registrations which were created by all tenants which the current user has permission to see. If false, then only Registrations created by the current user will be returned.

Returns:

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

protection_source_by_id(id)[source]

Does a GET request to /data-protect/sources/{id}.

Get a Protection Source.

Args:

id (long|int): Specifies the id of the Protection Source.

Returns:

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

register_protection_source(body)[source]

Does a POST request to /data-protect/sources/registrations.

Register a Protection Source.

Args:
body (SourceRegistrationParameters): Specifies the parameters to

register a Protection Source.

Returns:

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

test_connection_protection_source(body)[source]

Does a POST request to /data-protect/sources/test-connection.

Test connection to a source.

Args:
body (TestConnectionRequestParameters): Specifies the parameters

to test connectivity with a source.

Returns:

TestConnectionResponseParameters: 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_protection_source_registration(id, body)[source]

Does a PUT request to /data-protect/sources/registrations/{id}.

Update Protection Source registration.

Args:
id (long|int): Specifies the id of the Protection Source

registration.

body (SourceRegistrationUpdateParameters): Specifies the

parameters to update the registration.

Returns:

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