# Managed Object - SrmServiceInstance

See also
  SrmLicenseInfo, SrmLocalSiteInfo, SrmRemoteSite, SrmServiceInstanceContent, SrmSiteConnectionSpec, SrmSiteHostThumbprintInfo, SrmSolutionUserInfo
Since
  SRM API 0.0

## Managed Object Description

The ServiceInstance managed object is the singleton object which provides access to the functionality of the Site Recovery Manager server.

Properties

Name | Type | Description
--- | --- | ---
content P | SrmServiceInstanceContent | The properties of service instance. This property is identical to the return value from retrieveContent method. Note: This API doesn't support the property collector.

P Required privilege: System.Anonymous

Methods

Methods defined in this Managed Object
BreakPairing_Task, GetLicenseInfo, GetLocalSiteInfo, GetPairedSite, GetPairedSiteSolutionUserInfo, GetSiteName, GetSolutionUserInfo, PairSrm_Task, ProbeSsl, ReconfigureConnection_Task, RetrieveContent, SrmLoginByTokenLocale, SrmLoginLocale, SrmLoginRemoteSite, SrmLoginRemoteSiteByToken, SrmLoginSites, SrmLoginSitesByToken, SrmLogoutLocale

# BreakPairing_Task

Remove the connection with the remote SRM server. This operation will automatically logout from the remote site.

Required Privileges
  VcDr.RemoteSite.com.vmware.vcDr.Edit
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
site P | SrmRemoteSite | The remote SRM server to remove. Since SRM API 11.0

P Required privilege: site

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmExtApiTask |

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.
SrmFaultInvalidArgument |

Events

Type
None

# GetLicenseInfo

Get assigned license information.

Required Privileges
  System.View
Since
  SRM API 11.0

Parameters

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

Return Value

Type | Description
--- | ---
SrmLicenseInfo |

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

# GetLocalSiteInfo

Get information for the local site.

Required Privileges
  System.View
Since
  SRM API 5.0

Parameters

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

Return Value

Type | Description
--- | ---
SrmLocalSiteInfo |

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

# GetPairedSite

Get the remote site.

A remote site may be acting as a secondary site for this site, or may be acting as a primary site with this site as its secondary.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

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

Return Value

Type | Description
--- | ---
SrmRemoteSite |

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.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# GetPairedSiteSolutionUserInfo

Get information about the paired site's service account.

Required Privileges
  System.Anonymous
Since
  SRM API 4.0

Parameters

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

Return Value

Type | Description
--- | ---
SrmSolutionUserInfo |

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.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# GetSiteName

Deprecated. This method has been deprecated as of version 5. Users should not rely on it in production code, as it is not guaranteed to provide valid information in future releases. Instead, users should use siteName.

Get the name of the current site.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

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

Return Value

Type | Description
--- | ---
xsd:string |

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

# GetSolutionUserInfo

Get information about this server's service account.

Required Privileges
  System.Anonymous
Since
  SRM API 4.0

Parameters

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

Return Value

Type | Description
--- | ---
SrmSolutionUserInfo |

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

# PairSrm_Task

Establish persistent network connection with a remote SRM server. Remote SRM server must have the same VC extension key.

Required Privileges
  VcDr.RemoteSite.com.vmware.vcDr.Edit
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
spec P | SrmSiteConnectionSpec | The connection spec to the remote PSC node. Since SRM API 11.0

P Required privilege: spec

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmExtApiTask |

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

# ProbeSsl

Returns (host, thumbprint) tuples for all PSC/MGMT/DR hosts to which SRM should connect under specified root PSC node.

Required Privileges
  System.View
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
host P | xsd:string | Host name or IP address of the root PSC node. Since SRM API 11.0
port* P | xsd:int | Port of the root PSC node. When not provided the default value of 443 is used. Since SRM API 11.0
vcHost* P | xsd:string | Host where the VC is running. In case of embedded environment this field should not be specified. In this case the host on which the VC is running is the PSC host. Since SRM API 11.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
SrmSiteHostThumbprintInfo[] | Array of HostThumbprintInfo structures. Each entry contains host address and required thumbprint to establish connection to the services on that host.

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.
SrmSiteFaultSitePairingFault | that contains the original error when a network connection cannot be established, there are invalid arguments or there was other error.

Events

Type
None

# ReconfigureConnection_Task

Reconfigure RemoteSite object with connection information for remote PSC node. This method propagates the changed values to the paired site.

Required Privileges
  VcDr.RemoteSite.com.vmware.vcDr.Edit
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
site P | SrmRemoteSite | RemoteSite object to reconfigure. Since SRM API 11.0
spec P | SrmSiteConnectionSpec | The dr.site.ConnectionSpec to use for the remote PSC node connection. Since SRM API 11.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmExtApiTask |

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.
SrmFaultInvalidArgument |

Events

Type
None

# RetrieveContent

Retrieves the properties of the service instance.

Required Privileges
  System.Anonymous

Parameters

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

Return Value

Type | Description
--- | ---
SrmServiceInstanceContent | The properties belonging to the service instance, including various object managers.

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

# SrmLoginByTokenLocale

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 SrmServiceInstance 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 be a bearer or a holder of key token. Since SRM API 4.0
locale* P | xsd:string | The locale for this session. Since SRM API 4.0

*Need not be set 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.
vim.fault.InvalidLogin | Thrown if the given token is not valid.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultInvalidTokenLifetime | Thrown if the SSO token is either expired or not yet valid. Usually thrown when there is a time skew between the local clock and the SSO server. This exception is not supported from methods with
SrmFaultNoPermission | Thrown if the given user has no permission.

Events

Type
None

# SrmLoginLocale

Begin a session with the SRM server.

Required Privileges
  System.Anonymous
Since
  SRM API 2.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
username P | xsd:string | A username to be used to login to the VC server. Since SRM API 2.0
password P | xsd:string | A password to be used to login to the VC server. Since SRM API 2.0
locale* P | xsd:string | The locale for this session. Since SRM API 2.0

*Need not be set 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.
vim.fault.InvalidLogin | Thrown if the given credentials are not valid.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultNoPermission | Thrown if the given user has no permission.

Events

Type
None

# SrmLoginRemoteSite

Log in to the remote SRM server using the provided credentials. loginRemoteSite should be invoked when escalated privileges are required on the remote site and the current session has already been authenticated using login.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
remoteUsername P | xsd:string | A username to be used to login to the remote VC server. Since SRM API 3.0
remotePassword P | xsd:string | A password to be used to login to the remote VC server. Since SRM API 3.0
locale* P | xsd:string | The locale for this session. Since SRM API 3.0

*Need not be set 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.
vim.fault.InvalidLogin | Thrown if the given credentials are not valid.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# SrmLoginRemoteSiteByToken

Log in to the remote SRM server using the provided credentials. loginRemoteSite should be invoked when escalated privileges are required on the remote site and the current session has already been authenticated using login.

Required Privileges
  System.View
Since
  SRM API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
remoteSamlToken P | xsd:string | Since SRM API 4.0
locale* P | xsd:string | The locale for this session. Since SRM API 4.0

*Need not be set 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.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
vim.fault.InvalidLogin | Thrown if the given credentials are not valid.
vim.fault.NotAuthenticated | Thrown if there is no session (no call to login was made).
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionDownFault | Thrown if the remote site is not reachable.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# SrmLoginSites

Log in to the local and remote SRM servers using the provided credentials. loginSites is needed when escalated privileges are required on the remote site for performing operations (for example, protecting virtual machines).

Required Privileges
  System.Anonymous
Since
  SRM API 2.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance used to make the method call.
username P | xsd:string | A username to be used to login to the local VC server. Since SRM API 2.0
password P | xsd:string | A password to be used to login to the local VC server. Since SRM API 2.0
remoteUsername P | xsd:string | A username to be used to login to the remote VC server. Since SRM API 2.0
remotePassword P | xsd:string | A password to be used to login to the remote VC server. Since SRM API 2.0
locale* P | xsd:string | The locale for this session. Since SRM API 2.0

*Need not be set 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.
vim.fault.InvalidLogin | Thrown if the given credentials are not valid.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultNoPermission | Thrown if the given user has no permission.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# SrmLoginSitesByToken

Log in to the local and remote VC servers using the provided tokens. loginSitesByToken is needed when escalated privileges are required on the remote site for performing operations (for example, protecting virtual machines).

Required Privileges
  System.Anonymous
Since
  SRM API 4.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance 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 be a bearer or a holder of key token. Since SRM API 4.0
remoteSamlToken P | xsd:string | An XML encoded SAML token used to login to the remote SRM server. The SAML token should be a bearer or a holder of key token. Since SRM API 4.0
locale* P | xsd:string | The locale for this session. Since SRM API 4.0

*Need not be set 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.
vim.fault.InvalidLogin | Thrown if the given credentials are not valid.
vim.fault.InvalidLocale | Thrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFault | Thrown if there is already an established session.
SrmFaultConnectionDownFault | Thrown if the remote site is not reachable.
SrmFaultConnectionLimitReached | Thrown if the configured connection limit has been reached.
SrmFaultNoPermission | Thrown if the given user has no permission.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled.

Events

Type
None

# SrmLogoutLocale

Log out sites and terminate the current session.

Required Privileges
  System.Anonymous
Since
  SRM API 2.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmServiceInstance 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.
vim.fault.NotAuthenticated | Thrown if there is no session (no call to login was made).

Events

Type
None