netapp_share_snapshot_policies
Creates, updates, deletes, gets or lists a netapp_share_snapshot_policies resource.
Overview​
| Name | netapp_share_snapshot_policies |
| Type | Resource |
| Id | ovh.storage.netapp_share_snapshot_policies |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Snapshot policy ID |
status | string | Association status between the share and the snapshot policy (active, error, updating) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, share_id | 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. | |
update | update | service_name, share_id, snapshot_policy_id | 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. |
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"}}) |
service_name | string (uuid) | Service name (wire: serviceName) |
share_id | string (uuid) | Share ID (wire: shareId) |
SELECT examples​
- get
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​
- update
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;