Examples of SpotPlacement


Examples of com.amazonaws.services.ec2.model.SpotPlacement

        //*************************** Add the availability zone ************************//
        // Setup the availability zone to use. Note we could retrieve the availability
        // zones using the ec2.describeAvailabilityZones() API. For this demo we will just use
        // us-east-1b.
        SpotPlacement placement = new SpotPlacement("us-east-1b");
        launchSpecification.setPlacement(placement);

        //*************************** Add the placement group ************************//
        // Setup the placement group to use with whatever name you desire.
        // For this demo we will just use "ADVANCED-DEMO-PLACEMENT-GROUP".
View Full Code Here

Examples of com.amazonaws.services.ec2.model.SpotPlacement

        launchSpecification.setSecurityGroups(securityGroups);

        // If a placement group has been set, then we will use it in the request.
        if (placementGroupName != null && !placementGroupName.equals("")) {
            // Setup the placement group to use with whatever name you desire.
            SpotPlacement placement = new SpotPlacement();
            placement.setGroupName(placementGroupName);
            launchSpecification.setPlacement(placement);
        }

        // Check to see if we need to set the availability zone name.
        if (availabilityZoneName != null && !availabilityZoneName.equals("")) {
            // Setup the availability zone to use. Note we could retrieve the availability
            // zones using the ec2.describeAvailabilityZones() API.
            SpotPlacement placement = new SpotPlacement(availabilityZoneName);
            launchSpecification.setPlacement(placement);
        }

        if (availabilityZoneGroupName != null && !availabilityZoneGroupName.equals("")) {
            // Set the availability zone group.
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.