class RunImpl {

    @NotNull
    public static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception {
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs();
        httpClientInputs.setUrl(createRunClientUrl());
        if (commonInputs.getRequestBody().isEmpty()) {
            try {
                httpClientInputs.setBody(createRunBody(createRunInputs));
            } catch (JsonProcessingException e) {
                return getFailureResultsMap(e);
            }
        } else {
            httpClientInputs.setBody(commonInputs.getRequestBody());
        }
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(POST);
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        setCommonHttpInputs(httpClientInputs, commonInputs);
        return new HttpClientService().execute(httpClientInputs);
    }

}