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:

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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.

Return Value

Type Description
xsd:stringA string representing the version of the API "1.0"

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd:string

The name of an existing RecoveryPlan.

Since SRM API 0.0
offset Pxsd:int

[in] The offset from the top of the document.

Since SRM API 0.0
maxLines Pxsd:int

[in] The maximum number of lines to retrieve.

Since SRM API 0.0
PRequired 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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidArgumentThrown if the offset is larger than the document or maxLines is 0 or negative.
SrmFaultInvalidStateThrown if the RecoveryPlan is not completed, cancelled or error
SrmFaultRecoveryPlanNotFoundThrown 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

NameTypeDescription
_thisManagedObjectReference 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.RuntimeFaultThrown 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:
Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidStateThrown if the RecoveryPlan is not running
SrmFaultRecoveryPlanNotFoundThrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None



RecoveryPlanCancel

Cancel a running RecoveryPlan.
Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidStateThrown if the RecoveryPlan is not paused
SrmFaultRecoveryPlanNotFoundThrown 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:

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.NotSupportedThis operation is no longer supported.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidStateThrown if the RecoveryPlan is not running
SrmFaultRecoveryPlanNotFoundThrown 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:

Warning: This operation is no longer supported.

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
vmodl.fault.NotSupportedas this operation is no longer supported.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidStateThrown if the RecoveryPlan is not paused
SrmFaultRecoveryPlanNotFoundThrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None



RecoveryPlanSettings

Get the settings for the named RecoveryPlan.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultRecoveryPlanNotFoundThrown 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:

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
name Pxsd:string

The name of an existing RecoveryPlan.

Since SRM API 0.0
mode PSrmApiRecoveryMode

The mode in which to run the RecoveryPlan

Since SRM API 0.0
PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDuplicateNameThrown if there are multiple recovery plans that have the specified name.
SrmFaultInvalidStateThrown if the RecoveryPlan is not uninitialized
SrmFaultRecoveryPlanNotFoundThrown if the RecoveryPlan 'name' cannot be found.

Events

Type
None



SrmLogin

Begin a session with the SRM server.
Required Privileges
System.Anonymous

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
username Pxsd:string

A username to be used to login to the vCenter server.

Since SRM API 0.0
password Pxsd:string

A password to be used to login to the vCenter server.

Since SRM API 0.0
PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultAlreadyLoggedInFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.
samlToken Pxsd: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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultInvalidLoginThrown if the given token is not valid.

Events

Type
None



SrmLogout

End a user Session with the SRM server
Required Privileges
System.Anonymous

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmApi used to make the method call.

Return Value

Type Description
None

Faults

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

Events

Type
None