Package com.amazonaws.services.ec2.model.transform

Examples of com.amazonaws.services.ec2.model.transform.InstanceStaxUnmarshaller


    return additionalWorkerAllocated;
  }

  private void launchInstance(String instanceId)
  {
    StartInstancesRequest startInstancesRequest = new StartInstancesRequest();
    List<String> instancesIdsToLaunch = new ArrayList<String>();
    instancesIdsToLaunch.add(instanceId);
    startInstancesRequest.setInstanceIds(instancesIdsToLaunch);
    ec2Client.startInstances(startInstancesRequest);
    updateInstanceState(instanceId, "running");
  }
View Full Code Here


  }

  private Image newImageWithStatus(final String state, final String code,
      final String message) {

    final StateReason reason = new StateReason();
    reason.setCode(code);
    reason.setMessage(message);

    final Image image = new Image();
    image.setState(state);
    image.setStateReason(reason);
View Full Code Here

  public void stopInstance() throws ClientProtocolException, IOException
  {
    String instanceId = getInstanceId();
    List<String> instancesId = new ArrayList<String>();
    instancesId.add(instanceId);
    StopInstancesRequest stopInstancesRequest = new StopInstancesRequest(instancesId);
    amazonEC2Client.stopInstances(stopInstancesRequest);
  }
View Full Code Here

    private void addTag(AmazonEC2Client ec2, NetworkInterface o, String key, String value) {
        addTag(ec2, o.getNetworkInterfaceId(), key, value);
    }

    private void addTag(AmazonEC2Client ec2, String id, String key, String value) {
        Tag tag = new Tag(key, value);
        List<Tag> tags = Lists.newArrayList();
        tags.add(tag);

        CreateTagsRequest request = new CreateTagsRequest();
        request.setResources(Collections.singletonList(id));
View Full Code Here

    final Collection<String> resourceList = new ArrayList<String>(1);
    resourceList.add(resourceId);

    final Collection<Tag> tagList = new ArrayList<Tag>(1);
    tagList.add(new Tag(key, value));

    request.setResources(resourceList);
    request.setTags(tagList);

    logger.info("tag create request=" + request);
View Full Code Here

    final Collection<String> resourceList = new ArrayList<String>(1);
    resourceList.add(resourceId);

    final Collection<Tag> tagList = new ArrayList<Tag>(1);
    tagList.add(new Tag(key, value));

    request.setResources(resourceList);
    request.setTags(tagList);

    logger.info("tag delete request=" + request);
View Full Code Here

   *
   * @param instanceIds
   */
  public static void terminateInstances(List<String> instanceIds) {
    // terminate
    TerminateInstancesRequest request = new TerminateInstancesRequest(instanceIds);
    getEC2Client().terminateInstances(request);
  }
View Full Code Here

   *
   * @param instanceIds
   */
  public static void terminateInstances(String... instanceIds) {
    // terminate
    TerminateInstancesRequest request = new TerminateInstancesRequest();
    getEC2Client().terminateInstances(request.withInstanceIds(instanceIds));
  }
View Full Code Here

     * Returns the marshaled request configured with additional parameters to
     * enable operation dry-run.
     */
    @Override
    public Request<RunInstancesRequest> getDryRunRequest() {
        Request<RunInstancesRequest> request = new RunInstancesRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
View Full Code Here

     * Returns the marshaled request configured with additional parameters to
     * enable operation dry-run.
     */
    @Override
    public Request<RunInstancesRequest> getDryRunRequest() {
        Request<RunInstancesRequest> request = new RunInstancesRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.ec2.model.transform.InstanceStaxUnmarshaller

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.