/** * <p> * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is * because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank * and its encryption status is used for the volume encryption status. * </p> * * @param blockDeviceMappings * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. * This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, * it is not blank and its encryption status is used for the volume encryption status. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; }
/** * <p> * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is * because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank * and its encryption status is used for the volume encryption status. * </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 * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. * This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, * it is not blank and its encryption status is used for the volume encryption status. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList<BlockDeviceMapping>(blockDeviceMappings.length)); } for (BlockDeviceMapping ele : blockDeviceMappings) { this.blockDeviceMappings.add(ele); } return this; }
/** * The block device mapping. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param blockDeviceMappings The block device mapping. * * @return A reference to this updated object so that method calls can be chained * together. */ public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { if (getBlockDeviceMappings() == null) setBlockDeviceMappings(new java.util.ArrayList<BlockDeviceMapping>(blockDeviceMappings.length)); for (BlockDeviceMapping value : blockDeviceMappings) { getBlockDeviceMappings().add(value); } return this; }
/** * <p> * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is * because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank * and its encryption status is used for the volume encryption status. * </p> * * @param blockDeviceMappings * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. * This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, * it is not blank and its encryption status is used for the volume encryption status. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings) { setBlockDeviceMappings(blockDeviceMappings); return this; }
private void setupCustomDeviceMapping(RunInstancesRequest riRequest) { if (StringUtils.isNotBlank(customDeviceMapping)) { riRequest.setBlockDeviceMappings(DeviceMappingParser.parse(customDeviceMapping)); } }
/** * <p> * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is * because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank * and its encryption status is used for the volume encryption status. * </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 * One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. * This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, * it is not blank and its encryption status is used for the volume encryption status. * @return Returns a reference to this object so that method calls can be chained together. */ public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings) { if (this.blockDeviceMappings == null) { setBlockDeviceMappings(new com.amazonaws.internal.SdkInternalList<BlockDeviceMapping>(blockDeviceMappings.length)); } for (BlockDeviceMapping ele : blockDeviceMappings) { this.blockDeviceMappings.add(ele); } return this; }
rir.setBlockDeviceMappings(mappings); return rir;