Package com.amazon.ec2

Examples of com.amazon.ec2.PlacementRequestType$Factory


        if (ec2Request != null) {
            ec2Request.setKeyName(request.getParameter("KeyName"));
            ec2Request.setPublicKeyMaterial(request.getParameter("PublicKeyMaterial"));
        }

        ImportKeyPairResponse EC2Response = EC2SoapServiceImpl.toImportKeyPair(ServiceProvider.getInstance().getEC2Engine().importKeyPair(ec2Request));
        serializeResponse(response, EC2Response);
    }
View Full Code Here


                        "Missing required parameter - Description/LaunchPermission should be provided");
            }
        }

        // -> execute the request
        ModifyImageAttributeResponse EC2response = EC2SoapServiceImpl.toModifyImageAttributeResponse(
                ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute( ec2request ));
        serializeResponse(response, EC2response);
    }
View Full Code Here

                throw new EC2ServiceException(ClientError.MissingParamter, "Missing required parameter - Description/LaunchPermission should be provided");
            }
        }

        // -> execute the request
        ModifyImageAttributeResponse EC2response =
            EC2SoapServiceImpl.toModifyImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute(ec2request));
        serializeResponse(response, EC2response);
    }
View Full Code Here

            throw new EC2ServiceException( ClientError.MissingParamter,
                    "Missing parameter - InstanceType/UserData should be provided");
        }

        // -> execute the request
        ModifyInstanceAttributeResponse EC2response = EC2SoapServiceImpl.toModifyInstanceAttributeResponse(
                ServiceProvider.getInstance().getEC2Engine().modifyInstanceAttribute( ec2Request ));
        serializeResponse(response, EC2response);
    }
View Full Code Here

        } else {
            throw new EC2ServiceException(ClientError.MissingParamter, "Missing parameter - InstanceType/UserData should be provided");
        }

        // -> execute the request
        ModifyInstanceAttributeResponse EC2response =
            EC2SoapServiceImpl.toModifyInstanceAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyInstanceAttribute(ec2Request));
        serializeResponse(response, EC2response);
    }
View Full Code Here

     * @see <a href="http://docs.amazonwebservices.com/AWSEC2/2010-11-15/APIReference/index.html?ApiReference-query-RunInstances.html">RunInstances</a>
     */
    public RunInstancesResponse runInstances(RunInstances runInstances) {
        RunInstancesType rit = runInstances.getRunInstances();
        GroupSetType gst = rit.getGroupSet();
        PlacementRequestType prt = rit.getPlacement();
        UserDataType userData = rit.getUserData();
        String type = rit.getInstanceType();
        String keyName = rit.getKeyName();

        EC2RunInstances request = new EC2RunInstances();

        request.setTemplateId(rit.getImageId());

        if (rit.getMinCount() < 1) {
            throw new EC2ServiceException(ClientError.InvalidParameterValue, "Value of parameter MinCount should be greater than 0");
        } else
            request.setMinCount(rit.getMinCount());

        if (rit.getMaxCount() < 1) {
            throw new EC2ServiceException(ClientError.InvalidParameterValue, "Value of parameter MaxCount should be greater than 0");
        } else
            request.setMaxCount(rit.getMaxCount());

        if (null != type)
            request.setInstanceType(type);
        if (null != prt)
            request.setZoneName(prt.getAvailabilityZone());
        if (null != userData)
            request.setUserData(userData.getData());
        if (null != keyName)
            request.setKeyName(rit.getKeyName());

View Full Code Here

        if (0 == count) {
            throw new EC2ServiceException( ClientError.MissingParamter, "Missing required parameter - InstanceId");
        }

        // -> execute the request
        RebootInstancesResponse EC2response = EC2SoapServiceImpl.toRebootInstancesResponse( ServiceProvider.getInstance().getEC2Engine().rebootInstances(EC2request));
        serializeResponse(response, EC2response);
    }
View Full Code Here

        if (0 == count) {
            throw new EC2ServiceException(ClientError.MissingParamter, "Missing required parameter - InstanceId");
        }

        // -> execute the request
        RebootInstancesResponse EC2response = EC2SoapServiceImpl.toRebootInstancesResponse(ServiceProvider.getInstance().getEC2Engine().rebootInstances(EC2request));
        serializeResponse(response, EC2response);
    }
View Full Code Here

        String[] description = request.getParameterValues( "Description" );
        if ( null != description && 0 < description.length )
            EC2request.setDescription( description[0] );

        // -> execute the request
        RegisterImageResponse EC2response = EC2SoapServiceImpl.toRegisterImageResponse( ServiceProvider.getInstance().getEC2Engine().registerImage( EC2request ));
        serializeResponse(response, EC2response);
    }
View Full Code Here

        String[] description = request.getParameterValues("Description");
        if (null != description && 0 < description.length)
            EC2request.setDescription(description[0]);

        // -> execute the request
        RegisterImageResponse EC2response = EC2SoapServiceImpl.toRegisterImageResponse(ServiceProvider.getInstance().getEC2Engine().registerImage(EC2request));
        serializeResponse(response, EC2response);
    }
View Full Code Here

TOP

Related Classes of com.amazon.ec2.PlacementRequestType$Factory

Copyright © 2018 www.massapicom. 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.