Java 类com.amazonaws.services.ec2.model.StateReason 实例源码

项目:jwrapper-maven-plugin    文件:CarrotElasticCompute.java   
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);

    return image;

}
项目:aws-sdk-java-resources    文件:ImageImpl.java   
@Override
public StateReason getStateReason() {
    return (StateReason) resource.getAttribute("StateReason");
}
项目:aws-sdk-java-resources    文件:InstanceImpl.java   
@Override
public StateReason getStateReason() {
    return (StateReason) resource.getAttribute("StateReason");
}
项目:billow    文件:EC2Instance.java   
public EC2Instance(Instance instance) {
    this.id = instance.getInstanceId();
    this.type = instance.getInstanceType();
    this.lifecycle = instance.getInstanceLifecycle();
    this.hypervisor = instance.getHypervisor();
    this.az = instance.getPlacement().getAvailabilityZone();
    this.group = instance.getPlacement().getGroupName();
    this.tenancy = instance.getPlacement().getTenancy();
    this.vpc = instance.getVpcId();
    this.platform = instance.getPlatform();
    this.kernel = instance.getKernelId();
    this.key = instance.getKeyName();
    this.image = instance.getImageId();
    this.privateIP = instance.getPrivateIpAddress();
    this.publicIP = instance.getPublicIpAddress();
    this.publicHostname = instance.getPublicDnsName();
    this.privateHostname = instance.getPrivateDnsName();
    this.architecture = instance.getArchitecture();
    this.state = instance.getState().getName();
    this.ramdisk = instance.getRamdiskId();
    this.subnet = instance.getSubnetId();
    this.rootDeviceName = instance.getRootDeviceName();
    this.rootDeviceType = instance.getRootDeviceType();
    this.stateTransitionReason = instance.getStateTransitionReason();
    this.spotInstanceRequest = instance.getSpotInstanceRequestId();
    this.virtualizationType = instance.getVirtualizationType();
    this.sourceDestCheck = instance.getSourceDestCheck();
    this.launchTime = new DateTime(instance.getLaunchTime());

    if (instance.getIamInstanceProfile() != null) {
        this.iamInstanceProfile = instance.getIamInstanceProfile().getArn().toString();
    } else {
        this.iamInstanceProfile = null;
    }

    final StateReason stateReason = instance.getStateReason();
    if (stateReason != null)
        this.stateReason = stateReason.getMessage();
    else
        this.stateReason = null;

    this.securityGroups = new ArrayList<>();
    for (GroupIdentifier identifier : instance.getSecurityGroups()) {
        this.securityGroups.add(new SecurityGroup(identifier));
    }

    this.tags = new HashMap<>();
    for (Tag tag : instance.getTags()) {
        this.tags.put(tag.getKey(), tag.getValue());
    }
}
项目:aws-sdk-java-resources    文件:Instance.java   
/**
 * Gets the value of the StateReason attribute. If this resource is not yet
 * loaded, a call to {@code load()} is made to retrieve the value of the
 * attribute.
 */
StateReason getStateReason();
项目:aws-sdk-java-resources    文件:Image.java   
/**
 * Gets the value of the StateReason attribute. If this resource is not yet
 * loaded, a call to {@code load()} is made to retrieve the value of the
 * attribute.
 */
StateReason getStateReason();