当前位置: 首页>>代码示例>>Java>>正文


Java StateReason类代码示例

本文整理汇总了Java中com.amazonaws.services.ec2.model.StateReason的典型用法代码示例。如果您正苦于以下问题:Java StateReason类的具体用法?Java StateReason怎么用?Java StateReason使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StateReason类属于com.amazonaws.services.ec2.model包,在下文中一共展示了StateReason类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newImageWithStatus

import com.amazonaws.services.ec2.model.StateReason; //导入依赖的package包/类
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;

}
 
开发者ID:jwrapper,项目名称:jwrapper-maven-plugin,代码行数:15,代码来源:CarrotElasticCompute.java

示例2: getStateReason

import com.amazonaws.services.ec2.model.StateReason; //导入依赖的package包/类
@Override
public StateReason getStateReason() {
    return (StateReason) resource.getAttribute("StateReason");
}
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:5,代码来源:ImageImpl.java

示例3: EC2Instance

import com.amazonaws.services.ec2.model.StateReason; //导入依赖的package包/类
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());
    }
}
 
开发者ID:airbnb,项目名称:billow,代码行数:52,代码来源:EC2Instance.java

示例4: getStateReason

import com.amazonaws.services.ec2.model.StateReason; //导入依赖的package包/类
/**
 * 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();
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:7,代码来源:Instance.java


注:本文中的com.amazonaws.services.ec2.model.StateReason类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。