Skip to main content

netapp_share_snapshot_policies

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

Overview​

Namenetapp_share_snapshot_policies
TypeResource
Idovh.storage.netapp_share_snapshot_policies

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Snapshot policy ID
statusstringAssociation status between the share and the snapshot policy (active, error, updating)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, share_idReturns the snapshot policy applied to the share and the status of its assignment. A share that was never assigned a policy uses the default snapshot policy of the service.
updateupdateservice_name, share_id, snapshot_policy_idApplies one of the snapshot policies of the service to the share. The share and the policy must be available, and the default policy cannot be assigned, so a share cannot be moved back to it. The update is asynchronous: follow the snapshot policy status of the share until active.

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"}})
service_namestring (uuid)Service name (wire: serviceName)
share_idstring (uuid)Share ID (wire: shareId)

SELECT examples​

Returns the snapshot policy applied to the share and the status of its assignment. A share that was never assigned a policy uses the default snapshot policy of the service.

SELECT
id,
status
FROM ovh.storage.netapp_share_snapshot_policies
WHERE service_name = '{{ service_name }}' -- required
AND share_id = '{{ share_id }}' -- required
;

UPDATE examples​

Applies one of the snapshot policies of the service to the share. The share and the policy must be available, and the default policy cannot be assigned, so a share cannot be moved back to it. The update is asynchronous: follow the snapshot policy status of the share until active.

UPDATE ovh.storage.netapp_share_snapshot_policies
SET
snapshot_policy_id = '{{ snapshot_policy_id }}'
WHERE
service_name = '{{ service_name }}' --required
AND share_id = '{{ share_id }}' --required
AND snapshot_policy_id = '{{ snapshot_policy_id }}' --required;