capabilities_region_notebook_workspacebackupretentionpolicies
Creates, updates, deletes, gets or lists a capabilities_region_notebook_workspacebackupretentionpolicies resource.
Overview​
| Name | capabilities_region_notebook_workspacebackupretentionpolicies |
| Type | Resource |
| Id | ovh.cloud_ai.capabilities_region_notebook_workspacebackupretentionpolicies |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
lifetime_eviction_threshold | integer | Position in the backup history from which the lifetime-based eviction can be applied to a workspace backup (wire: lifetimeEvictionThreshold) |
lifetime_in_days | integer | Maximum number of retention days for a given notebook's workspace backups which is at or after lifetime_eviction_threshold index in history (wire: lifetimeInDays) |
retained_number | integer | The number of retained workspace backups for a given notebook (wire: retainedNumber) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region, service_name | Get the applied notebook backup retention policy for the parent public cloud project and region | |
update | update | region, service_name | Override notebook backup retention policy for the parent public cloud project and region |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
region | string | Region |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
Get the applied notebook backup retention policy for the parent public cloud project and region
SELECT
lifetime_eviction_threshold,
lifetime_in_days,
retained_number
FROM ovh.cloud_ai.capabilities_region_notebook_workspacebackupretentionpolicies
WHERE region = '{{ region }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
UPDATE examples​
- update
Override notebook backup retention policy for the parent public cloud project and region
UPDATE ovh.cloud_ai.capabilities_region_notebook_workspacebackupretentionpolicies
SET
lifetime_eviction_threshold = {{ lifetime_eviction_threshold }},
lifetime_in_days = {{ lifetime_in_days }},
retained_number = {{ retained_number }}
WHERE
region = '{{ region }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
lifetime_eviction_threshold,
lifetime_in_days,
retained_number;