Examples of StopInstancesType


Examples of com.amazon.ec2.StopInstancesType

        return toStartInstancesResponse(engine.startInstances(request));
    }

    public StopInstancesResponse stopInstances(StopInstances stopInstances) {
        EC2StopInstances request = new EC2StopInstances();
        StopInstancesType sit = stopInstances.getStopInstances();
        Boolean force = sit.getForce();

        // -> toEC2StopInstances
        InstanceIdSetType iist = sit.getInstancesSet();
        InstanceIdType[] items = iist.getItem();
        if (null != items) {  // -> should not be empty
            for (int i = 0; i < items.length; i++)
                request.addInstanceId(items[i].getInstanceId());
        }

        if (force)
            request.setForce(sit.getForce());
        return toStopInstancesResponse(engine.stopInstances(request));
    }
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.