Skip to main content

replications

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

Overview

Namereplications
TypeResource
Idgoogle.netapp.replications

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the Replication. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.
clusterLocationstringOptional. Location of the user cluster.
createTimestring (google-datetime)Output only. Replication create time.
descriptionstringA description about this replication relationship.
destinationVolumestringOutput only. Full name of destination volume resource. Example : "projects/{project}/locations/{location}/volumes/{volume_id}"
destinationVolumeParametersobjectRequired. Input only. Destination volume parameters (id: DestinationVolumeParameters)
healthybooleanOutput only. Condition of the relationship. Can be one of the following: - true: The replication relationship is healthy. It has not missed the most recent scheduled transfer. - false: The replication relationship is not healthy. It has missed the most recent scheduled transfer.
hybridPeeringDetailsobjectOutput only. Hybrid peering details. (id: HybridPeeringDetails)
hybridReplicationTypestringOutput only. Type of the hybrid replication.
hybridReplicationUserCommandsobjectOutput only. Copy pastable snapmirror commands to be executed on onprem cluster by the customer. (id: UserCommands)
labelsobjectResource labels to represent user provided metadata.
mirrorStatestringOutput only. Indicates the state of mirroring.
replicationSchedulestringRequired. Indicates the schedule for replication.
rolestringOutput only. Indicates whether this points to source or destination.
sourceVolumestringOutput only. Full name of source volume resource. Example : "projects/{project}/locations/{location}/volumes/{volume_id}"
statestringOutput only. State of the replication.
stateDetailsstringOutput only. State details of the replication.
transferStatsobjectOutput only. Replication transfer statistics. (id: TransferStats)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, volumesId, replicationsIdDescribe a replication for a volume.
listselectprojectsId, locationsId, volumesIdpageSize, pageToken, orderBy, filterReturns descriptions of all replications for a volume.
createinsertprojectsId, locationsId, volumesIdreplicationIdCreate a new replication for a volume.
patchupdateprojectsId, locationsId, volumesId, replicationsIdupdateMaskUpdates the settings of a specific replication.
deletedeleteprojectsId, locationsId, volumesId, replicationsIdDeletes a replication.
stopexecprojectsId, locationsId, volumesId, replicationsIdStop Cross Region Replication.
resumeexecprojectsId, locationsId, volumesId, replicationsIdResume Cross Region Replication.
reverse_directionexecprojectsId, locationsId, volumesId, replicationsIdReverses direction of replication. Source becomes destination and destination becomes source.
establish_peeringexecprojectsId, locationsId, volumesId, replicationsIdEstablish replication peering.
syncexecprojectsId, locationsId, volumesId, replicationsIdSyncs the replication. This will invoke one time volume data transfer from source to destination.

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
locationsIdstring
projectsIdstring
replicationsIdstring
volumesIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
replicationIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Describe a replication for a volume.

SELECT
name,
clusterLocation,
createTime,
description,
destinationVolume,
destinationVolumeParameters,
healthy,
hybridPeeringDetails,
hybridReplicationType,
hybridReplicationUserCommands,
labels,
mirrorState,
replicationSchedule,
role,
sourceVolume,
state,
stateDetails,
transferStats
FROM google.netapp.replications
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND volumesId = '{{ volumesId }}' -- required
AND replicationsId = '{{ replicationsId }}' -- required;

INSERT examples

Create a new replication for a volume.

INSERT INTO google.netapp.replications (
data__name,
data__replicationSchedule,
data__labels,
data__description,
data__destinationVolumeParameters,
data__clusterLocation,
projectsId,
locationsId,
volumesId,
replicationId
)
SELECT
'{{ name }}',
'{{ replicationSchedule }}',
'{{ labels }}',
'{{ description }}',
'{{ destinationVolumeParameters }}',
'{{ clusterLocation }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ volumesId }}',
'{{ replicationId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the settings of a specific replication.

UPDATE google.netapp.replications
SET
data__name = '{{ name }}',
data__replicationSchedule = '{{ replicationSchedule }}',
data__labels = '{{ labels }}',
data__description = '{{ description }}',
data__destinationVolumeParameters = '{{ destinationVolumeParameters }}',
data__clusterLocation = '{{ clusterLocation }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND replicationsId = '{{ replicationsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a replication.

DELETE FROM google.netapp.replications
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND volumesId = '{{ volumesId }}' --required
AND replicationsId = '{{ replicationsId }}' --required;

Lifecycle Methods

Stop Cross Region Replication.

EXEC google.netapp.replications.stop 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@volumesId='{{ volumesId }}' --required,
@replicationsId='{{ replicationsId }}' --required
@@json=
'{
"force": {{ force }}
}';