Example usage for com.amazonaws.services.ec2.model InstanceStateChange setInstanceId

List of usage examples for com.amazonaws.services.ec2.model InstanceStateChange setInstanceId

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model InstanceStateChange setInstanceId.

Prototype


public void setInstanceId(String instanceId) 

Source Link

Document

The ID of the instance.

Usage

From source file:jp.primecloud.auto.aws.typica.converter.InstanceStateChangeTerminateConverter.java

License:Open Source License

@Override
protected InstanceStateChange convertObject(TerminatingInstanceDescription from) {
    InstanceStateChange to = new InstanceStateChange();

    to.setInstanceId(from.getInstanceId());

    InstanceState previousState = new InstanceState();
    previousState.setCode(from.getPreviousStateCode());
    previousState.setName(from.getPreviousState());
    to.setPreviousState(previousState);/*from  w w  w  . j  a v a2s.c o  m*/

    InstanceState currentState = new InstanceState();
    currentState.setCode(from.getShutdownStateCode());
    currentState.setName(from.getShutdownState());
    to.setCurrentState(currentState);

    return to;
}