com.amazonaws.services.ec2.model.Instance.getBlockDeviceMappings()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中com.amazonaws.services.ec2.model.Instance.getBlockDeviceMappings()方法的一些代码示例,展示了Instance.getBlockDeviceMappings()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getBlockDeviceMappings()方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Instance
类名称:Instance
方法名:getBlockDeviceMappings

Instance.getBlockDeviceMappings介绍

[英]Any block device mapping entries for the instance.
[中]实例的任何块设备映射项。

代码示例

代码示例来源:origin: aws/aws-sdk-java

if (getArchitecture() != null)
  sb.append("Architecture: ").append(getArchitecture()).append(",");
if (getBlockDeviceMappings() != null)
  sb.append("BlockDeviceMappings: ").append(getBlockDeviceMappings()).append(",");
if (getClientToken() != null)
  sb.append("ClientToken: ").append(getClientToken()).append(",");

代码示例来源:origin: aws/aws-sdk-java

hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode());
hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode());

代码示例来源:origin: aws-amplify/aws-sdk-android

/**
 * Any block device mapping entries for the instance.
 * <p>
 * Returns a reference to this object so that method calls can be chained together.
 *
 * @param blockDeviceMappings Any block device mapping entries for the instance.
 *
 * @return A reference to this updated object so that method calls can be chained
 *         together.
 */
public Instance withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) {
  if (getBlockDeviceMappings() == null) setBlockDeviceMappings(new java.util.ArrayList<InstanceBlockDeviceMapping>(blockDeviceMappings.length));
  for (InstanceBlockDeviceMapping value : blockDeviceMappings) {
    getBlockDeviceMappings().add(value);
  }
  return this;
}

代码示例来源:origin: aws/aws-sdk-java

if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false)
  return false;
if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null)
  return false;
if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == false)
  return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)

代码示例来源:origin: aws-amplify/aws-sdk-android

if (getRootDeviceType() != null) sb.append("RootDeviceType: " + getRootDeviceType() + ",");
if (getRootDeviceName() != null) sb.append("RootDeviceName: " + getRootDeviceName() + ",");
if (getBlockDeviceMappings() != null) sb.append("BlockDeviceMappings: " + getBlockDeviceMappings() + ",");
if (getVirtualizationType() != null) sb.append("VirtualizationType: " + getVirtualizationType() + ",");
if (getInstanceLifecycle() != null) sb.append("InstanceLifecycle: " + getInstanceLifecycle() + ",");

代码示例来源:origin: aws-amplify/aws-sdk-android

hashCode = prime * hashCode + ((getRootDeviceType() == null) ? 0 : getRootDeviceType().hashCode()); 
hashCode = prime * hashCode + ((getRootDeviceName() == null) ? 0 : getRootDeviceName().hashCode()); 
hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode()); 
hashCode = prime * hashCode + ((getVirtualizationType() == null) ? 0 : getVirtualizationType().hashCode()); 
hashCode = prime * hashCode + ((getInstanceLifecycle() == null) ? 0 : getInstanceLifecycle().hashCode());

代码示例来源:origin: aws-amplify/aws-sdk-android

if (other.getRootDeviceName() == null ^ this.getRootDeviceName() == null) return false;
if (other.getRootDeviceName() != null && other.getRootDeviceName().equals(this.getRootDeviceName()) == false) return false; 
if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null) return false;
if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == false) return false; 
if (other.getVirtualizationType() == null ^ this.getVirtualizationType() == null) return false;
if (other.getVirtualizationType() != null && other.getVirtualizationType().equals(this.getVirtualizationType()) == false) return false;

代码示例来源:origin: jenkinsci/ec2-plugin

private List<String> getResourcesToTag(Instance inst) {
  List<String> resources = new ArrayList<>();
  resources.add(inst.getInstanceId());
  for(InstanceBlockDeviceMapping blockDeviceMapping : inst.getBlockDeviceMappings()) {
    resources.add(blockDeviceMapping.getEbs().getVolumeId());
  }
  return resources;
}

代码示例来源:origin: stackoverflow.com

// First get the EC2 instance from the id
DescribeInstancesRequest describeInstancesRequest = new DescribeInstancesRequest().withInstanceIds(instanceId);
DescribeInstancesResult describeInstancesResult = ec2.describeInstances(describeInstancesRequest);
Instance instance = describeInstancesResult.getReservations().get(0).getInstances().get(0);

// Then get the mappings
List<InstanceBlockDeviceMapping> mappingList = instance.getBlockDeviceMappings();
for(InstanceBlockDeviceMapping mapping: mappingList) {
  System.out.println(mapping.getEbs().getVolumeId());
}

代码示例来源:origin: org.kuali.common/kuali-aws

protected InstanceBlockDeviceMapping getRootVolumeMapping(Instance instance) {
  checkNotNull(instance, "instance");
  String rootDeviceName = instance.getRootDeviceName();
  List<InstanceBlockDeviceMapping> mappings = instance.getBlockDeviceMappings();
  for (InstanceBlockDeviceMapping mapping : mappings) {
    if (rootDeviceName.equals(mapping.getDeviceName())) {
      return mapping;
    }
  }
  throw illegalState("Unable to locate the root volume mapping for [%s]", instance.getInstanceId());
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

if (getArchitecture() != null)
  sb.append("Architecture: ").append(getArchitecture()).append(",");
if (getBlockDeviceMappings() != null)
  sb.append("BlockDeviceMappings: ").append(getBlockDeviceMappings()).append(",");
if (getClientToken() != null)
  sb.append("ClientToken: ").append(getClientToken()).append(",");

代码示例来源:origin: aws-amplify/aws-sdk-android

instance.getBlockDeviceMappings().add(InstanceBlockDeviceMappingStaxUnmarshaller.getInstance().unmarshall(context));
continue;

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode());
hashCode = prime * hashCode + ((getBlockDeviceMappings() == null) ? 0 : getBlockDeviceMappings().hashCode());
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode());

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false)
  return false;
if (other.getBlockDeviceMappings() == null ^ this.getBlockDeviceMappings() == null)
  return false;
if (other.getBlockDeviceMappings() != null && other.getBlockDeviceMappings().equals(this.getBlockDeviceMappings()) == false)
  return false;
if (other.getClientToken() == null ^ this.getClientToken() == null)

相关文章

Instance类方法