# Managed Object - SrmApi

Property of
  SrmServiceInstanceContent
See also
  SrmApiRecoveryMode, SrmApiSettings
Since
  SRM API 0.0

## Managed Object Description

Deprecated. This interface provides legacy-only interface to SRM, and its use is deprecated in favor of SrmServiceInstance.

This is the Site Recovery Manager server external API interface.

SNMP EVENTS: Users may need to configure the VC Server to cause these to be forwarded to the registered SNMP Server.

Callers of this API are strongly encouraged to listen for the following SNMP Events DrRecoveryProfilePromptDisplay - The Recovery Plan/Profile is paused waiting for user input

Callers of this API are encouraged to listen for the following SNMP Events Should also listen for VC Event that a VM cannot boot due to a Prompt requiring user attention.

ADDITIONAL:

- DrRecoveryProfilePromptResponse - The RecoveryPlan is no longer paused waiting for user input
- DrRecoveryVmBegin - Starting recovery of a particular VM
- DrRecoveryVmEnd - Completed recovery of a particular VM
- DrRecoveryVmResultSuccess - A particular VM was recovered successfully
- DrRecoveryVmResultFailure - A particular VM failed recovery
- DrRecoveryVmResultWarning - A particular VM was recovered but there may have been errors
- DrRecoveryProfileExecuteTestBegin - A recovery is starting in Test mode
- DrRecoveryProfileExecuteTestEnd - A recovery has finished running in Test mode
- DrRecoveryProfileExecuteBegin - A recovery is starting in Recovery mode
- DrRecoveryProfileExecuteEnd - A recovery has finished running in Recovery mode

Please note: ListRecoveryPlans returns plans with their full path name (as folders are supported in this release and plans are no longer required to have unique names), as such, it is advisable to use the Full Path to the plan instead of the user-visible name.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
GetApiVersion, GetFinalStatus, ListRecoveryPlans, RecoveryPlanAnswerPrompt, RecoveryPlanCancel, RecoveryPlanPause, RecoveryPlanResume, RecoveryPlanSettings, RecoveryPlanStart, SrmLogin, SrmLoginByToken, SrmLogout

# GetApiVersion

Get a string that represents the version of the API.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.

Return Value

Type | Description
--- | ---
xsd:string | A string representing the version of the API "1.0"

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetFinalStatus

Get the XML strings that describe how the RecoveryPlan executed

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Since SRM API 0.0
offset P | xsd:int | [in] The offset from the top of the document. Since SRM API 0.0
maxLines P | xsd:int | [in] The maximum number of lines to retrieve. Since SRM API 0.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string[] | A string array containing an XML representation of all steps

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidArgument | Thrown if the offset is larger than the document or maxLines is 0 or negative.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not completed, cancelled or error
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# ListRecoveryPlans

Retrieve a list of names containing every RecoveryPlan at this DR site.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.

Return Value

Type | Description
--- | ---
xsd:string[] | An array of strings containing the names of all known RecoveryPlans.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# RecoveryPlanAnswerPrompt

Answer the current prompt being displayed in a RecoveryPlan. This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real reacovery.
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Warning: In order to answer multiple prompts, you must use the version2 API. Since SRM API 0.0

P Required privilege: name

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not running
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# RecoveryPlanCancel

Cancel a running RecoveryPlan.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Since SRM API 0.0

P Required privilege: name

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not paused
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# RecoveryPlanPause

Pause a running RecoveryPlan.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real reacovery.
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Warning: This operation is no longer supported. Since SRM API 0.0

P Required privilege: name

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.NotSupported | This operation is no longer supported.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not running
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# RecoveryPlanResume

Resume a paused RecoveryPlan.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real recovery.
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery.

Warning: This operation is no longer supported.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Since SRM API 0.0

P Required privilege: name

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.NotSupported | as this operation is no longer supported.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not paused
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# RecoveryPlanSettings

Get the settings for the named RecoveryPlan.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Since SRM API 0.0

P Required privilege: name

Return Value

Type | Description
--- | ---
SrmApiSettings |

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# RecoveryPlanStart

Start running a RecoveryPlan in either Test or Recovery mode.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real reacovery.
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
name P | xsd:string | The name of an existing RecoveryPlan. Since SRM API 0.0
mode P | SrmApiRecoveryMode | The mode in which to run the RecoveryPlan Since SRM API 0.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateName | Thrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidState | Thrown if the RecoveryPlan is not uninitialized
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None

# SrmLogin

Begin a session with the SRM server.

Required Privileges
  System.Anonymous

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
username P | xsd:string | A username to be used to login to the vCenter server. Since SRM API 0.0
password P | xsd:string | A password to be used to login to the vCenter server. Since SRM API 0.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultAlreadyLoggedInFault | Thrown if there is already a logged in session from this client.
SrmFaultInvalidLogin |

Events

Type
None

# SrmLoginByToken

Begin a session with the SRM server.

Required Privileges
  System.Anonymous
Since
  SRM API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.
samlToken P | xsd:string | An XML encoded SAML token used to login to the SRM server. The SAML token should either be a bearer token or a holder of key token delegated to the SRM solution user. Since SRM API 4.0

P Required privilege: samlToken

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultInvalidLogin | Thrown if the given token is not valid.

Events

Type
None

# SrmLogout

End a user Session with the SRM server

Required Privileges
  System.Anonymous

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmApi used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultNotAuthenticated | Thrown if there is no session (no login() call was made)

Events

Type
None