SelectInstance Method

Gets the instance where a HealthVault account should be created for the specified account location.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: (1.15.1003.9505)

HealthServiceInstance^ SelectInstance(
	Location^ preferredLocation


Type: Microsoft.Health..::..Location
A user's preferred geographical location, used to select the best instance in which to create a new HealthVault account. If there is a location associated with the credential that will be used to log into the account, that location should be used.

Return Value

A HealthServiceInstance object represents the selected instance, or null if no suitable instance exists.

If no suitable instance can be found, a null value is returned. This can happen, for example, if the account location is not supported by HealthVault. Currently the returned instance IDs all parse to integers, but that is not guaranteed and should not be relied upon.

Microsoft.Health..::..HealthServiceException The HealthVault service returned an error.
System..::..ArgumentException If preferredLocation is null.