Examples of UnmonitorInstancesResponse


Examples of com.amazon.ec2.UnmonitorInstancesResponse

    /**
     * See comment for monitorInstances.
     */
    public UnmonitorInstancesResponse unmonitorInstances(UnmonitorInstances unmonitorInstances) {
        UnmonitorInstancesResponse response = new UnmonitorInstancesResponse();
        MonitorInstancesResponseType param1 = new MonitorInstancesResponseType();
        MonitorInstancesResponseSetType param2 = new MonitorInstancesResponseSetType();

        MonitorInstancesType mit = unmonitorInstances.getUnmonitorInstances();
        MonitorInstancesSetType mist = mit.getInstancesSet();
        MonitorInstancesSetItemType[] items = mist.getItem();

        if (null != items) {
            for (int i = 0; i < items.length; i++) {
                String instanceId = items[i].getInstanceId();
                MonitorInstancesResponseSetItemType param3 = new MonitorInstancesResponseSetItemType();
                param3.setInstanceId(instanceId);
                InstanceMonitoringStateType param4 = new InstanceMonitoringStateType();
                param4.setState("disabled");
                param3.setMonitoring(param4);
                param2.addItem(param3);
            }
        }

        param1.setInstancesSet(param2);
        param1.setRequestId(UUID.randomUUID().toString());
        response.setUnmonitorInstancesResponse(param1);
        return response;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.