RecoveryPlanGetInfo

This method retrieves status information about a given recovery plan, including the name of the recovery plan and its current state.

Synopsis

RecoveryPlan.Info RecoveryPlanGetInfo( )
RecoveryPlan.Info
is a data object that describes details of this recovery plan, including:
  • name
    is the name of this recovery plan.
  • description
    is a description of this recovery plan.
  • protectionGroups[]
    is an array of protection groups that will be recovered as part of this plan.
  • state
    – the state of this recovery plan, enumerated as:
    • cancelling
      – recovery plan is in the process of cancelling
    • error
      – recovery plan has errors
    • failedOver
      – recovery plan has failed over
    • needsCleanup
      – need to cleanup a test run
    • needsFailover
      – need to re‐run recovery (failover)
    • needsReprotect
      – need to re‐run reprotect
    • needsRollback
      – need to re‐run rollback
    • prompting
      – recovery plan is running, but requires user‐interaction before it may continue
    • protecting
      – recovery plan is protecting to remote site, run peer recovery plan on remote site
    • ready
      – recovery plan is not in a running state and may be run
    • running
      – recovery plan is currently running

Faults

  • RuntimeFault
For information about the faults that
Site Recovery Manager
throws, see Faults in Site Recovery Manager API.
Examples for RecoveryPlanGetInfo
SrmRecoveryPlanInfo planInfo = srmPortType.recoveryPlanGetInfo(ManagedObjectReference _this); Where ManagedObjectReference _this = _recoveryPlan; where _recoveryPlan can be taken from: SrmServiceInstanceContent content = _srmPortType.retrieveContent(_svcRef); ManagedObjectReference _recoveryRef = content.getRecovery(); List < ManagedObjectReference > plans = srmPortType.listPlans( _recoveryRef); ManagedObjectReference _recoveryPlan = plans.get(0);
The sample C# and Java code below combines
ListPlans
with
RecoveryPlanGetInfo
to retrieve a specified plan.
C# sample code for recovery plan
ManagedObjectReference[] plans = _service.ListPlans(_sic.recovery); if (plans != null && plans.Length > 0) { for (int i = 0; i < plans.Length; ++i) { SrmRecoveryPlanInfo info = _service.RecoveryPlanGetInfo(plans[i]); Console.WriteLine("RecoveryPlan : " + info.name); if (info.name.Equals(planName)) { Console.Write(" RecoveryPlan state : "); Console.WriteLine(info.state); } } }
Java sample code for recovery plan
private static void listPlans() throws Exception { List<ManagedObjectReference> plans = srmPort.listPlans(serviceContent.getRecovery()); if (plans != null && plans.size() > 0) { for (int i = 0; i < plans.size(); ++i) { SrmRecoveryPlanInfo info = srmPort.recoveryPlanGetInfo(plans.get(i)); System.out.println("RecoveryPlan : " + info.getName()); if (info.getName().equals(planName)) { System.out.print(" RecoveryPlan state : "); System.out.println(info.getState()); } } } }