ListProtectedDatastores

This method retrieves the list of datastores that are protected by the specified protection group. A datastore can be a VMFS volume, a NAS directory, or a local file system path.

Synopsis

vim.Datastore[] listProtectedDatastores( )

Returns Datastore[] is an array of all Datastore objects protected by this protection group.

Faults

  • RuntimeFault
  • vmodl.fault.NotSupported if this protection group is not a SAN group.

See Faults in Site Recovery Manager API for more details.

Example for ListProtectedDatastores

List < ManagedObjectReference > datastores = srmPortType.listProtectedDatastores(ManagedObjectReference _this);

Where ManagedObjectReference _this = _protectionGroupRef;
where _protectionGroupRef can be taken from:
  SrmServiceInstanceContent content = _srmPortType.retrieveContent(_svcRef);
ManagedObjectReference _protectionRef = content.getProtection();
List < ManagedObjectReference > groups = srmPortType.listProtectionGroups(_protectionRef);
_protectionGroupRef = groups.get(0);