public void innerHandle()

in src/main/java/com/awslabs/iot/client/commands/greengrass/groups/GetDeploymentStatusCommandHandlerWithGroupIdAndDeploymentIdCompletion.java [33:50]


    public void innerHandle(String input) {
        List<String> parameters = parameterExtractor.getParameters(input);

        GreengrassGroupId groupId = ImmutableGreengrassGroupId.builder().groupId(parameters.get(GROUP_ID_POSITION)).build();
        String deploymentId = parameters.get(DEPLOYMENT_ID_POSITION);

        Option<GetDeploymentStatusResponse> optionalGetDeploymentStatusResponse = greengrassV1Helper.getDeployments(groupId)
                .filter(deployment -> deployment.deploymentId().equals(deploymentId))
                .headOption()
                .flatMap(deployment -> greengrassV1Helper.getDeploymentStatusResponse(groupId, deployment));

        if (optionalGetDeploymentStatusResponse.isEmpty()) {
            Logger.info(this, String.join("", "No status available for group [", groupId.getGroupId(), "] and deployment [", deploymentId, "]"));
            return;
        }

        Logger.info(this, String.join("", "Status of deployment [", deploymentId, "] is [", optionalGetDeploymentStatusResponse.get().deploymentStatus(), "]"));
    }