* for each instance request. We could verify that all of the specified instances
* exist to detect an error which would require a listVirtualMachines.
*/
public MonitorInstancesResponse monitorInstances(MonitorInstances monitorInstances) {
MonitorInstancesResponse response = new MonitorInstancesResponse();
MonitorInstancesResponseType param1 = new MonitorInstancesResponseType();
MonitorInstancesResponseSetType param2 = new MonitorInstancesResponseSetType();
MonitorInstancesType mit = monitorInstances.getMonitorInstances();
MonitorInstancesSetType mist = mit.getInstancesSet();
MonitorInstancesSetItemType[] misit = mist.getItem();
if (null != misit) {
for (int i = 0; i < misit.length; i++) {
String instanceId = misit[i].getInstanceId();
MonitorInstancesResponseSetItemType param3 = new MonitorInstancesResponseSetItemType();
param3.setInstanceId(instanceId);
InstanceMonitoringStateType param4 = new InstanceMonitoringStateType();
param4.setState("disabled");
param3.setMonitoring(param4);
param2.addItem(param3);
}
}
param1.setRequestId(UUID.randomUUID().toString());
param1.setInstancesSet(param2);
response.setMonitorInstancesResponse(param1);
return response;
}