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

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

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

Instance.setBlockDeviceMappings介绍

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

代码示例

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

/**
 * <p>
 * Any block device mapping entries for the instance.
 * </p>
 * 
 * @param blockDeviceMappings
 *        Any block device mapping entries for the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Instance withBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMapping> blockDeviceMappings) {
  setBlockDeviceMappings(blockDeviceMappings);
  return this;
}

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

/**
 * <p>
 * Any block device mapping entries for the instance.
 * </p>
 * <p>
 * <b>NOTE:</b> This method appends the values to the existing list (if any). Use
 * {@link #setBlockDeviceMappings(java.util.Collection)} or {@link #withBlockDeviceMappings(java.util.Collection)}
 * if you want to override the existing values.
 * </p>
 * 
 * @param blockDeviceMappings
 *        Any block device mapping entries for the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Instance withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) {
  if (this.blockDeviceMappings == null) {
    setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList<InstanceBlockDeviceMapping>(blockDeviceMappings.length));
  }
  for (InstanceBlockDeviceMapping ele : blockDeviceMappings) {
    this.blockDeviceMappings.add(ele);
  }
  return this;
}

代码示例来源: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: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * Any block device mapping entries for the instance.
 * </p>
 * 
 * @param blockDeviceMappings
 *        Any block device mapping entries for the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Instance withBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMapping> blockDeviceMappings) {
  setBlockDeviceMappings(blockDeviceMappings);
  return this;
}

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

/**
 * <p>
 * Any block device mapping entries for the instance.
 * </p>
 * <p>
 * <b>NOTE:</b> This method appends the values to the existing list (if any). Use
 * {@link #setBlockDeviceMappings(java.util.Collection)} or {@link #withBlockDeviceMappings(java.util.Collection)}
 * if you want to override the existing values.
 * </p>
 * 
 * @param blockDeviceMappings
 *        Any block device mapping entries for the instance.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Instance withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings) {
  if (this.blockDeviceMappings == null) {
    setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList<InstanceBlockDeviceMapping>(blockDeviceMappings.length));
  }
  for (InstanceBlockDeviceMapping ele : blockDeviceMappings) {
    this.blockDeviceMappings.add(ele);
  }
  return this;
}

相关文章

Instance类方法