netapp_share_replications
Creates, updates, deletes, gets or lists a netapp_share_replications resource.
Overview​
| Name | netapp_share_replications |
| Type | Resource |
| Id | ovh.storage.netapp_share_replications |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Share replication ID |
created_at | string (date-time) | Share replication creation date (wire: createdAt) |
description | string | Share replication description |
destination | object | Share replication destination information |
progress | integer | Percentage of the source share’s data that has been successfully replicated to the destination share |
replica_state | string | Share replica state (active, error, in_sync, out_of_sync) (wire: replicaState) |
source | object | Share replication source information |
status | string | Share replication status (accepted, completed, cutover, cutting_over, deleted, deleting, error, pending) |
A share replication
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Share replication ID |
created_at | string (date-time) | Share replication creation date (wire: createdAt) |
description | string | Share replication description |
destination | object | Share replication destination information |
progress | integer | Percentage of the source share’s data that has been successfully replicated to the destination share |
replica_state | string | Share replica state (active, error, in_sync, out_of_sync) (wire: replicaState) |
source | object | Share replication source information |
status | string | Share replication status (accepted, completed, cutover, cutting_over, deleted, deleting, error, pending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, share_replication_id | Returns the source, destination, status and progress of the replication, in percent. (Beta version) | |
list | select | service_name | Returns the share replications of the service, whether this service is the source or the destination. (Beta version) | |
create | insert | service_name | Creates a share replication from a share of this service to the service given in destinationServiceId. It is returned with status pending, and the replication only starts after it is accepted on the destination service. To find a compatible destination, use List compatible replication destinations. (Beta version) | |
delete | delete | service_name, share_replication_id | Deletes the share replication. Deletion is asynchronous and blocked while the replication is in status cutting_over, deleting or error. If the replication was accepted, the destination share is deleted with it. (Beta version) | |
accept | exec | serviceName, shareReplicationId | Accepts the share replication and creates the destination share on this service, with the name, size and protocol given in the body. The replication must be in status pending. Acceptance is asynchronous: the replication is returned with status accepted, follow its progress until the replica state is in_sync. (Beta version) | |
cutover | exec | serviceName, shareReplicationId | Cuts over the share replication: the destination share becomes the primary, the replication stops, and the source and destination data diverge after it, so the operation cannot be undone. The call must be made on the destination service, and the replication must be in status accepted. The cutover is asynchronous: follow the status of the share replication until it is completed. (Beta version) |
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"}}) |
serviceName | string (uuid) | Service name |
service_name | string (uuid) | Service name (wire: serviceName) |
shareReplicationId | string (uuid) | Share replication ID |
share_replication_id | string (uuid) | Share replication ID (wire: shareReplicationId) |
SELECT examples​
- get
- list
Returns the source, destination, status and progress of the replication, in percent. (Beta version)
SELECT
id,
created_at,
description,
destination,
progress,
replica_state,
source,
status
FROM ovh.storage.netapp_share_replications
WHERE service_name = '{{ service_name }}' -- required
AND share_replication_id = '{{ share_replication_id }}' -- required
;
Returns the share replications of the service, whether this service is the source or the destination. (Beta version)
SELECT
id,
created_at,
description,
destination,
progress,
replica_state,
source,
status
FROM ovh.storage.netapp_share_replications
WHERE service_name = '{{ service_name }}' -- required
;
INSERT examples​
- create
- Manifest
Creates a share replication from a share of this service to the service given in destinationServiceId. It is returned with status pending, and the replication only starts after it is accepted on the destination service. To find a compatible destination, use List compatible replication destinations. (Beta version)
INSERT INTO ovh.storage.netapp_share_replications (
description,
destination_service_id,
source_share_id,
service_name
)
SELECT
'{{ description }}',
'{{ destination_service_id }}',
'{{ source_share_id }}',
'{{ service_name }}'
RETURNING
id,
created_at,
description,
destination,
progress,
replica_state,
source,
status
;
# Description fields are for documentation purposes
- name: netapp_share_replications
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the netapp_share_replications resource.
- name: description
value: "{{ description }}"
description: |
Share replication description
- name: destination_service_id
value: "{{ destination_service_id }}"
description: |
Replication service ID (destination)
- name: source_share_id
value: "{{ source_share_id }}"
description: |
Replication share ID (source)
DELETE examples​
- delete
Deletes the share replication. Deletion is asynchronous and blocked while the replication is in status cutting_over, deleting or error. If the replication was accepted, the destination share is deleted with it. (Beta version)
DELETE FROM ovh.storage.netapp_share_replications
WHERE service_name = '{{ service_name }}' --required
AND share_replication_id = '{{ share_replication_id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- accept
- cutover
Accepts the share replication and creates the destination share on this service, with the name, size and protocol given in the body. The replication must be in status pending. Acceptance is asynchronous: the replication is returned with status accepted, follow its progress until the replica state is in_sync. (Beta version)
EXEC ovh.storage.netapp_share_replications.accept
@serviceName='{{ serviceName }}' --required,
@shareReplicationId='{{ shareReplicationId }}' --required
@@json=
'{
"share": "{{ share }}"
}'
;
Cuts over the share replication: the destination share becomes the primary, the replication stops, and the source and destination data diverge after it, so the operation cannot be undone. The call must be made on the destination service, and the replication must be in status accepted. The cutover is asynchronous: follow the status of the share replication until it is completed. (Beta version)
EXEC ovh.storage.netapp_share_replications.cutover
@serviceName='{{ serviceName }}' --required,
@shareReplicationId='{{ shareReplicationId }}' --required
;