in src/main/java/com/awslabs/iot/client/commands/greengrass/devices/GetLatestDeviceDefinitionVersionCommandHandlerWithGroupIdCompletion.java [35:49]
public void innerHandle(String input) {
List<String> parameters = parameterExtractor.getParameters(input);
GreengrassGroupId groupId = ImmutableGreengrassGroupId.builder().groupId(parameters.get(GROUP_ID_POSITION)).build();
Option<List<Device>> optionalDeviceList = greengrassV1Helper.getGroupInformation(groupId)
.flatMap(greengrassV1Helper::getDevices);
if (optionalDeviceList.isEmpty()) {
Logger.info(this, "No devices found");
return;
}
Logger.info(this, objectPrettyPrinter.prettyPrint(optionalDeviceList.get()));
}