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 PSrmServiceInstanceContent

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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
site PSrmRemoteSite

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

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

Return Value

Type Description
SrmLicenseInfo

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



GetLocalSiteInfo

Get information for the local site.
Required Privileges
System.View
Since
SRM API 5.0

Parameters

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

Return Value

Type Description
SrmLocalSiteInfo

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



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

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

Return Value

Type Description
SrmRemoteSite

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

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

Return Value

Type Description
SrmSolutionUserInfo

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

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

Return Value

Type Description
xsd:string

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



GetSolutionUserInfo

Get information about this server's service account.
Required Privileges
System.Anonymous
Since
SRM API 4.0

Parameters

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

Return Value

Type Description
SrmSolutionUserInfo

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



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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
spec PSrmSiteConnectionSpec

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



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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
host Pxsd:string

Host name or IP address of the root PSC node.

Since SRM API 11.0
port* Pxsd:int

Port of the root PSC node. When not provided the default value of 443 is used.

Since SRM API 11.0
vcHost* Pxsd: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 PRequired 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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmSiteFaultSitePairingFaultthat 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
site PSrmRemoteSite

RemoteSite object to reconfigure.

Since SRM API 11.0
spec PSrmSiteConnectionSpec

The dr.site.ConnectionSpec to use for the remote PSC node connection.

Since SRM API 11.0
PRequired privilege - see tooltip for details

Return Value

Type Description
ManagedObjectReference
to a SrmExtApiTask

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

Events

Type
None



RetrieveContent

Retrieves the properties of the service instance.
Required Privileges
System.Anonymous

Parameters

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

Return Value

Type Description
SrmServiceInstanceContentThe properties belonging to the service instance, including various object managers.

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



SrmLoginByTokenLocale

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

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance 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 be a bearer or a holder of key token.

Since SRM API 4.0
locale* Pxsd:string

The locale for this session.

Since SRM API 4.0
*Need not be set 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.
vim.fault.InvalidLoginThrown if the given token is not valid.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultInvalidTokenLifetimeThrown 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
SrmFaultNoPermissionThrown 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

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

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

Since SRM API 2.0
password Pxsd:string

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

Since SRM API 2.0
locale* Pxsd:string

The locale for this session.

Since SRM API 2.0
*Need not be set 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.
vim.fault.InvalidLoginThrown if the given credentials are not valid.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultNoPermissionThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
remoteUsername Pxsd:string

A username to be used to login to the remote VC server.

Since SRM API 3.0
remotePassword Pxsd:string

A password to be used to login to the remote VC server.

Since SRM API 3.0
locale* Pxsd:string

The locale for this session.

Since SRM API 3.0
*Need not be set 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.
vim.fault.InvalidLoginThrown if the given credentials are not valid.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultRemoteSiteNotEnabledThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance used to make the method call.
remoteSamlToken Pxsd:string

Since SRM API 4.0
locale* Pxsd:string

The locale for this session.

Since SRM API 4.0
*Need not be set 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.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
vim.fault.InvalidLoginThrown if the given credentials are not valid.
vim.fault.NotAuthenticatedThrown if there is no session (no call to login was made).
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionDownFaultThrown if the remote site is not reachable.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultRemoteSiteNotEnabledThrown 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

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

A username to be used to login to the local VC server.

Since SRM API 2.0
password Pxsd:string

A password to be used to login to the local VC server.

Since SRM API 2.0
remoteUsername Pxsd:string

A username to be used to login to the remote VC server.

Since SRM API 2.0
remotePassword Pxsd:string

A password to be used to login to the remote VC server.

Since SRM API 2.0
locale* Pxsd:string

The locale for this session.

Since SRM API 2.0
*Need not be set 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.
vim.fault.InvalidLoginThrown if the given credentials are not valid.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultNoPermissionThrown if the given user has no permission.
SrmFaultRemoteSiteNotEnabledThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance 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 be a bearer or a holder of key token.

Since SRM API 4.0
remoteSamlToken Pxsd: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* Pxsd:string

The locale for this session.

Since SRM API 4.0
*Need not be set 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.
vim.fault.InvalidLoginThrown if the given credentials are not valid.
vim.fault.InvalidLocaleThrown if the requested locale is invalid or unavailable.
SrmFaultAlreadyLoggedInFaultThrown if there is already an established session.
SrmFaultConnectionDownFaultThrown if the remote site is not reachable.
SrmFaultConnectionLimitReachedThrown if the configured connection limit has been reached.
SrmFaultNoPermissionThrown if the given user has no permission.
SrmFaultRemoteSiteNotEnabledThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmServiceInstance 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.
vim.fault.NotAuthenticatedThrown if there is no session (no call to login was made).

Events

Type
None