in src/main/java/com/awslabs/iot/client/commands/greengrass/groups/GetLatestDeploymentStatusCommandHandlerWithGroupIdCompletion.java [32:48]
public void innerHandle(String input) {
List<String> parameters = parameterExtractor.getParameters(input);
GreengrassGroupId groupId = ImmutableGreengrassGroupId.builder().groupId(parameters.get(GROUP_ID_POSITION)).build();
Option<GetDeploymentStatusResponse> optionalGetDeploymentStatusResponse = greengrassV1Helper.getLatestDeployment(groupId)
.flatMap(deployment -> greengrassV1Helper.getDeploymentStatusResponse(groupId, deployment));
if (optionalGetDeploymentStatusResponse.isEmpty()) {
Logger.info(this, String.join("", "No status available the latest deployment of group [", groupId.getGroupId(), "]"));
return;
}
GetDeploymentStatusResponse getDeploymentStatusResponse = optionalGetDeploymentStatusResponse.get();
Logger.info(this, String.join("", "Status of the latest deployment of [", groupId.getGroupId(), "] is [", getDeploymentStatusResponse.deploymentStatus(), "]"));
}