IWsEndUserGetVMPerformance Method
|
The method return information about virtual server actual state. 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> GetVMPerformance(
int VmID,
VMPInformationType infoTypes
)
<OperationContractAttribute>
Function GetVMPerformance (
VmID As Integer,
infoTypes As VMPInformationType
) As WsResult(Of VMPerformanceResult)
[OperationContractAttribute]
WsResult<VMPerformanceResult^>^ GetVMPerformance(
int VmID,
VMPInformationType^ infoTypes
)
[<OperationContractAttribute>]
abstract GetVMPerformance :
VmID : int *
infoTypes : VMPInformationType -> WsResult<VMPerformanceResult>
function GetVMPerformance(
VmID : int,
infoTypes : VMPInformationType
) : WsResult<VMPerformanceResult>
Parameters
- VmID
- Type: SystemInt32
The ID of the Virtual server - infoTypes
- Type: VMPInformationType
Object of type VMPInformationType specifying the desired informations
Return Value
Type:
WsResultVMPerformanceResult
The method return an object of type VMPerformanceResult, folowed by the information set requested
Examples public VMPerformanceResult GetVMPerformance()
{
int vmID = 12
VMPInformationType infoTypes = new VMPInformationType()
{
BANDWIDTH = true,
CPU = true,
IO = true,
NET = false
};
using (var client = new WsEndUserClient())
{
WsResultOfVMPerformanceResult result = client.GetVMPerformance(vmID, infoTypes);
if (result.Success)
return result.Value;
else
{
throw new CodedException(GetErrorCode(result.ResultCode), result.ResultMessage);
}
}
}
See Also