Skip to main content

netapp_share_replications

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

Overview​

Namenetapp_share_replications
TypeResource
Idovh.storage.netapp_share_replications

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Share replication ID
created_atstring (date-time)Share replication creation date (wire: createdAt)
descriptionstringShare replication description
destinationobjectShare replication destination information
progressintegerPercentage of the source share’s data that has been successfully replicated to the destination share
replica_statestringShare replica state (active, error, in_sync, out_of_sync) (wire: replicaState)
sourceobjectShare replication source information
statusstringShare replication status (accepted, completed, cutover, cutting_over, deleted, deleting, error, pending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, share_replication_idReturns the source, destination, status and progress of the replication, in percent. (Beta version)
listselectservice_nameReturns the share replications of the service, whether this service is the source or the destination. (Beta version)
createinsertservice_nameCreates 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)
deletedeleteservice_name, share_replication_idDeletes 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)
acceptexecserviceName, shareReplicationIdAccepts 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)
cutoverexecserviceName, shareReplicationIdCuts 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.

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"}})
serviceNamestring (uuid)Service name
service_namestring (uuid)Service name (wire: serviceName)
shareReplicationIdstring (uuid)Share replication ID
share_replication_idstring (uuid)Share replication ID (wire: shareReplicationId)

SELECT examples​

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
;

INSERT examples​

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
;

DELETE examples​

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.

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 }}"
}'
;