Skip to main content

capabilities_region_notebook_workspacebackupretentionpolicies

Creates, updates, deletes, gets or lists a capabilities_region_notebook_workspacebackupretentionpolicies resource.

Overview​

Namecapabilities_region_notebook_workspacebackupretentionpolicies
TypeResource
Idovh.cloud_ai.capabilities_region_notebook_workspacebackupretentionpolicies

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
lifetime_eviction_thresholdintegerPosition in the backup history from which the lifetime-based eviction can be applied to a workspace backup (wire: lifetimeEvictionThreshold)
lifetime_in_daysintegerMaximum 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_numberintegerThe number of retained workspace backups for a given notebook (wire: retainedNumber)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregion, service_nameGet the applied notebook backup retention policy for the parent public cloud project and region
updateupdateregion, service_nameOverride 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.

NameDatatypeDescription
api_hoststringThe 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"}})
regionstringRegion
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

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​

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;