IWsEndUserGetVMPerformances Method
|
The methods return information about the actual status of virtual servers requested
The available information sets are CPU and Net info. The servers with VMWare hypervisor have additional data regarding RAM and Hard Disk.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
WsResult<VMPerformanceResult[]> GetVMPerformances(
int[] VmIDs,
VMPInformationType infoTypes
)
<OperationContractAttribute>
Function GetVMPerformances (
VmIDs As Integer(),
infoTypes As VMPInformationType
) As WsResult(Of VMPerformanceResult())
[OperationContractAttribute]
WsResult<array<VMPerformanceResult^>^>^ GetVMPerformances(
array<int>^ VmIDs,
VMPInformationType^ infoTypes
)
[<OperationContractAttribute>]
abstract GetVMPerformances :
VmIDs : int[] *
infoTypes : VMPInformationType -> WsResult<VMPerformanceResult[]>
function GetVMPerformances(
VmIDs : int[],
infoTypes : VMPInformationType
) : WsResult<VMPerformanceResult[]>
Parameters
- VmIDs
- Type: SystemInt32
Array containing the IDs of requested virtual servers - infoTypes
- Type: VMPInformationType
Object of type VMPInformationType specifying the desired informations
Return Value
Type:
WsResultVMPerformanceResultThe method return an array of VMPerformanceResult: one object for each ID specified in the request
Examples
The following example shows a user-defined method, called GetVMPerformances(), which performs a
call to the WsEndUser, asking for CPU, IO, BANDWIDTH info for the Virtual Servers having ID = 12 and ID = 14
public VMPerformanceResult[] GetVMPerformances()
{
int[] vmIDs = {12, 14}
VMPInformationType infoTypes = new VMPInformationType()
{
BANDWIDTH = true,
CPU = true,
IO = true,
NET = false
};
using (var client = new WsEndUserClient())
{
WsResultOfVMPerformanceResult result = client.GetVMPerformances(vmIDs, infoTypes);
if (result.Success)
return result.Value;
else
{
throw new CodedException(GetErrorCode(result.ResultCode), result.ResultMessage);
}
}
}
See Also