controllers.tenant_controller module¶
-
class
controllers.tenant_controller.
TenantController
(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_tenant
(body=None)[source]¶ Does a POST request to /public/tenants.
A Vault can provide an additional Cloud Tier where cold data of the Cohesity Cluster is stored in the Cloud. A Vault can also provide archive storage for backup data. This archive data is stored on Tapes and in Cloud Vaults.
- Args:
- body (TenantCreateParameters, optional): Request to add or create
a new tenant.
- Returns:
Tenant: Response from the API. Create Tenants response
- 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_tenant
(body=None)[source]¶ Does a DELETE request to /public/tenants.
Returns success if the specified tenant is deleted.
- Args:
- body (TenantIdData, optional): TODO: type description here.
Example:
- Returns:
list of Tenant: Response from the API. Get Tenants Response.
- 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_download_tenants_proxy
(id=None)[source]¶ Does a GET request to /public/tenants/proxy/image.
Returns the tenant proxy to be downloaded.
- Args:
id (string, optional): Specifies the id of the tenant.
- Returns:
- list of int: Response from the API. Tenants Proxy Download
Response.
- 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_tenants
(ids=None, properties=None, hierarchy=None, include_self=None, skip_invalid_ids=None, status=None)[source]¶ Does a GET request to /public/tenants.
Returns the list of tenants.
- Args:
- ids (list of string, optional): TODO: type description here.
Example:
- properties (list of PropertyEnum, optional): ‘ViewBox’ indicates
view box data for tenant. ‘Vlan’ indicates vlan data for tenant. ‘ProtectionPolicy’ indicates protection policy for tenant. ‘ProtectionJob’ indicates protection job for tenant. ‘Entity’ indicates entity data for tenant. ‘Views’ indicates view data for tenant. ‘ActiveDirectory’ indicates active directory for tenant. ‘LdapProvider’ indicates ldap provider for tenant. ‘SwiftConfig’ indicates Swift configuration for tenant.
- hierarchy (bool, optional): TODO: type description here. Example:
include_self (bool, optional): TODO: type description here.
Example:
- skip_invalid_ids (bool, optional): TODO: type description here.
Example:
- status (list of StatusGetTenantsEnum, optional): Filter by tenant
status.
- Returns:
list of Tenant: Response from the API. Get Tenants Response.
- 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_tenants_proxies
(ids=None)[source]¶ Does a GET request to /public/tenants/proxies.
Returns the list of proxies.
- Args:
- ids (list of string, optional): TODO: type description here.
Example:
- Returns:
- list of TenantProxy: Response from the API. Get Tenants Proxies
Response.
- 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_tenants_proxy_config
(id=None, validate_only=None, connection_id=None)[source]¶ Does a GET request to /public/tenants/proxy/config.
Returns the config for tenants proxy.
- Args:
id (string, optional): Specifies the id of the tenant. validate_only (bool, optional): Specifies whether to only validate
the config request.
- connection_id (long|int, optional): Specifies the id of the
connection.
- Returns:
- list of int: Response from the API. Get Tenants Proxy Config
Response.
- 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_tenant
(body=None)[source]¶ Does a PUT request to /public/tenants.
Returns the tenant that was updated on the Cohesity Cluster.
- Args:
body (TenantUpdate, optional): Request to update existing tenant.
- Returns:
Tenant: Response from the API. Update Tenants Response
- 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_tenant_active_directory
(body=None)[source]¶ Does a PUT request to /public/tenants/activeDirectory.
Returns success if the update for Active Directory is successful for specified tenant.
- Args:
- body (TenantActiveDirectoryUpdateParameters, optional): Request to
update existing active directories.
- Returns:
- TenantActiveDirectoryUpdate: Response from the API. Tenant Active
Directory Mapping Response.
- 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_tenant_entity
(body=None)[source]¶ Does a PUT request to /public/tenants/entity.
Returns success if the update for entity permission data is successful for specified tenant.
- Args:
- body (TenantEntityUpdateParameters, optional): Request to
associate entity for tenant.
- Returns:
- TenantEntityUpdate: Response from the API. Tenant Entity Update
Response.
- 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_tenant_groups
(body=None)[source]¶ Does a PUT request to /public/tenants/groups.
Returns success if the update for groups is successful for specified tenant.
- Args:
- body (TenantGroupUpdateParameters, optional): Request to update
existing tenant groups.
- Returns:
- list of Group: Response from the API. Tenant Group Mapping
Response.
- 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_tenant_ldap_provider
(body=None)[source]¶ Does a PUT request to /public/tenants/ldapProvider.
Returns success if the update for Ldap Providers is successful for specified tenant.
- Args:
- body (TenantLdapProviderUpdateParameters, optional): Request to
update existing ldap providers.
- Returns:
- TenantLdapProviderUpdate: Response from the API. Tenant Ldap
Provider Mapping Response.
- 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_tenant_protection_job
(body=None)[source]¶ Does a PUT request to /public/tenants/protectionJob.
Returns success if the update for protection job is successful for specified tenant.
- Args:
- body (TenantProtectionJobUpdateParameters, optional): Request to
update existing protection jobs.
- Returns:
- TenantProtectionJobUpdate: Response from the API. Tenant
Protection Job Mapping Response.
- 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_tenant_protection_policy
(body=None)[source]¶ Does a PUT request to /public/tenants/policy.
Returns success if the update for protection policy permission data is successful for the specified tenant.
- Args:
- body (TenantProtectionPolicyUpdateParameters, optional): Request
to update existing protection policies.
- Returns:
- TenantProtectionPolicyUpdate: Response from the API. Tenant
Protection Policy Mapping Response.
- 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_tenant_users
(body=None)[source]¶ Does a PUT request to /public/tenants/users.
Returns success if the update for users data is successful for specified tenant.
- Args:
- body (TenantUserUpdateParameters, optional): Request to update
existing users.
- Returns:
- list of User: Response from the API. Tenant Users Mapping
Response.
- 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_tenant_view
(body=None)[source]¶ Does a PUT request to /public/tenants/view.
Returns success if the update for views permission data is successful for specified tenant.
- Args:
- body (TenantViewUpdateParameters, optional): Request to update
existing views.
- Returns:
- TenantViewUpdate: Response from the API. Tenant View Mapping
Response.
- 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_tenant_view_box
(body=None)[source]¶ Does a PUT request to /public/tenants/viewBox.
Returns success if the update for view box data is successful for specified tenant.
- Args:
- body (TenantViewBoxUpdateParameters, optional): Request to update
existing tenant view box.
- Returns:
- TenantViewBoxUpdate: Response from the API. Tenant View Box Update
Response.
- 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_tenant_vlan
(body=None)[source]¶ Does a PUT request to /public/tenants/vlan.
Returns success if the update for vlan data is successful for specified tenant.
- Args:
- body (TenantVlanUpdateParameters, optional): Request to update
existing tenant vlan.
- Returns:
- TenantVlanUpdate: Response from the API. Tenant Vlan Update
Response.
- 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.
-