當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。