CreateRecoveryPlan
The
createRecoveryPlan
method
creates a recovery plan. You call the method by passing the name and folder of the plan, and
the protection group(s) that must be included in the plan. Synopsis
CreateRecoveryPlanTask createRecoveryPlan( String name, drextapi.Folder folder, ProtectionGroup[] groups, @optional String description, @optional TestNetworkMapping[] mapping)
Parameter
| Description
|
---|---|
name
| Specifies the name of the plan. Must be unique in the parent folder, and
contain between 1 and 80 characters. |
folder
| Specifies the folder where the plan is
created.
|
groups
| Specifies the protection groups that are
added to the recovery plan.
|
description
| Optional parameter. Specifies the recovery plan description. Should not
contain more than 4096 characters. |
mapping
| Optional parameter. Specifies the test network mappings. For more
information, see GetTestNetworkMappings. |
CreateRecoveryPlanTask is a task object that contains
information about the status of the operation.
vCenter Site Recovery Manager 伺服器
retains the object for 30 minutes after
the task finishes. IsCreateRecoveryPlanComplete
returns true if the task for creating a recovery plan is complete.
GetCreateRecoveryPlanFailure
returns the failure during the operation for creating a recovery plan. If you
pass a name of a plan that exists, the failure is DuplicateNames.
If the operation is
successful, the
GetNewRecoveryPlan
returns the created recovery plan.
The recovery plan name can not be the same
as the folder in which it will be created.
If a task fails, its error field may contain one of the following:
- DuplicateNamesif a plan with this name already exists.
- InvalidArgumentif the name parameter is empty string
- InvalidTypeif folder parameter isn't meant to hold a recovery plans.
- InvalidPrimaryNetworkif mapping parameter containsTestNetworkMappingwith an invalid network on primary site. For example, uplink DVPortgroup.
- InvalidSecondaryNetworkif mapping parameter contains TestNetworkMapping with an invalid network on secondary site. For example uplink DVPortgroup.
- NoPermissionif user doesn't haveVcDr.RecoveryProfile.com.vmware.vcDr.Createprivilege on the specified folder orVcDr.ProtectionProfile.com.vmware.vcDr.AssignToRecoveryPlanprivilege on all protection groups in the plan.
- StringArgumentTooLongif the size of either name or description of the plan is too long.
- UnknownPrimaryNetworkif mapping parameter contains TestNetworkMapping with a network that does not exist on primary site.
- UnknownSecondaryNetworkif mapping containsTestNetworkMappingwith a network that does not exist on secondary site.
Faults
- DirectionError
- InvalidArgument
- ProtectionGroupNotFound
- RemoteSiteNotEnabled
- RuntimeFault
- StringArgumentTooLong
For information about the
faults that
Site Recovery Manager
throws, see
Faults in Site Recovery Manager API.