IWsLicenseGetAvailableLicenses Method
|
Gets information about the licenses purchased. Using the method AvailableAddonLicense() of Aruba WsEndUser,
you can get detailed information on licenses purchased by the user
Namespace:
Aruba.Cloud.WsLicense
Assembly:
Aruba.Cloud.WsLicense (in Aruba.Cloud.WsLicense.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
WsResult<AvailablePleskLicense[]> GetAvailableLicenses()
<OperationContractAttribute>
Function GetAvailableLicenses As WsResult(Of AvailablePleskLicense())
[OperationContractAttribute]
WsResult<array<AvailablePleskLicense^>^>^ GetAvailableLicenses()
[<OperationContractAttribute>]
abstract GetAvailableLicenses : unit -> WsResult<AvailablePleskLicense[]>
function GetAvailableLicenses() : WsResult<AvailablePleskLicense[]>
Return Value
Type:
WsResultAvailablePleskLicense
The method returns an object of class WsResult<AvailablePleskLicense[]>
containing detailed information on licenses purchased with licenses Addon compatible.
The method can also be called by Anonymus user. For further details on the information returned
by the method see the class definition WsResult, AvailablePleskLicense, and AvailableAddonPleskLicense.
Examples
The following example describes a method, called GetAvailableLicense(),
which uses a method GetAvailableLicenses() from Aruba WsEndUser, to obtain license information at affordable prices..
private AvailablePleskLicense[] GetAvailableLicenses()
{
try
{
WsResultOfArrayOfAvailableLicense result = client.GetAvailableLicense();
if (!result.Success)
{
throw new ApplicationException(
String.Format("An error has occurred while invoking GetAvailableLicense(). {0}", result.ResultMessage));
}
return result.Value;
}
catch (Exception ex)
{
throw new ApplicationException(
String.Format("An error has occurred while getting available license information {0}", ex.Message));
}
}
See Also