@Test public void testAdvancedAddBlockDeviceFromSnapshot() { RegisterImageBackedByEbsOptions options = new RegisterImageBackedByEbsOptions(); options.addBlockDeviceFromSnapshot("deviceName", "virtualName", "snapshotId", true, "gp2", 0, false); assertEquals(options.buildFormParameters().entries(), ImmutableMultimap.builder() .put("BlockDeviceMapping.1.Ebs.DeleteOnTermination", "true") .put("BlockDeviceMapping.1.Ebs.VolumeType", "gp2") .put("BlockDeviceMapping.1.Ebs.Iops", "0") .put("BlockDeviceMapping.1.DeviceName", "deviceName") .put("BlockDeviceMapping.1.VirtualName", "virtualName") .put("BlockDeviceMapping.1.Ebs.SnapshotId", "snapshotId") .build() .entries()); }
public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) { addAdvancedEbsOptions(deleteOnTermination, volumeType, iops, encrypted); addEphemeralBlockDeviceFromSnapshot(deviceName, virtualName, snapshotId); return this; }
RegisterImageBackedByEbsOptions extends RegisterImageOptions { public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) { addAdvancedEbsOptions(deleteOnTermination, volumeType, iops, encrypted); addEphemeralBlockDeviceFromSnapshot(deviceName, virtualName, snapshotId); return this; } }
RegisterImageBackedByEbsOptions extends RegisterImageOptions { public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) { addAdvancedEbsOptions(deleteOnTermination, volumeType, iops, encrypted); addEphemeralBlockDeviceFromSnapshot(deviceName, virtualName, snapshotId); return this; }  }
RegisterImageBackedByEbsOptions extends RegisterImageOptions { public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) { addAdvancedEbsOptions(deleteOnTermination, volumeType, iops, encrypted); addEphemeralBlockDeviceFromSnapshot(deviceName, virtualName, snapshotId); return this; }  RegisterImageBackedByEbsOptions addEphemeralBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewEphemeralBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId, boolean deleteOnTermination,
            @Nullable String volumeType, @Nullable Integer iops, boolean encrypted); RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName,
                                                            @Nullable String virtualName,
                                                            int volumeSize,
                                                            boolean deleteOnTermination,
                                                            @Nullable String volumeType,
                                                            @Nullable Integer iops,
                                                            boolean encrypted); RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName,
                                                                     @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); @Override RegisterImageBackedByEbsOptions asArchitecture(Architecture architecture); @Override RegisterImageBackedByEbsOptions withDescription(String info); @Override RegisterImageBackedByEbsOptions withKernelId(String kernelId); @Override RegisterImageBackedByEbsOptions withRamdisk(String ramDiskId); }
RegisterImageBackedByEbsOptions extends RegisterImageOptions { public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) { addAdvancedEbsOptions(deleteOnTermination, volumeType, iops, encrypted); addEphemeralBlockDeviceFromSnapshot(deviceName, virtualName, snapshotId); return this; }  RegisterImageBackedByEbsOptions addEphemeralBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewEphemeralBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName,
            @Nullable String virtualName, String snapshotId, boolean deleteOnTermination,
            @Nullable String volumeType, @Nullable Integer iops, boolean encrypted); RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName,
                                                            @Nullable String virtualName,
                                                            int volumeSize,
                                                            boolean deleteOnTermination,
                                                            @Nullable String volumeType,
                                                            @Nullable Integer iops,
                                                            boolean encrypted); RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName,
                                                                     @Nullable String virtualName, String snapshotId); RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName,
            @Nullable String virtualName, int volumeSize); @Override RegisterImageBackedByEbsOptions asArchitecture(Architecture architecture); @Override RegisterImageBackedByEbsOptions withDescription(String info); @Override RegisterImageBackedByEbsOptions withKernelId(String kernelId); @Override RegisterImageBackedByEbsOptions withRamdisk(String ramDiskId);  }