The new Desired Nodes API was introduced it #82975. We need to make it [operator-only](https://www.elastic.co/guide/en/elasticsearch/reference/8.3/operator-only-functionality.html#operator-only-functionality).
x-pack/plugin/security/qa/operator-privileges-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/operator/OperatorPrivilegesIT.java
request.setJsonEntity(Strings.toString(builder));
        assertOK(client().performRequest(request));
    }
    private void takeSnapshot(String repoName, String snapshotName) throws IOException {
        final Request request = new Request("POST", "/_snapshot/" + repoName + "/" + snapshotName);
        request.addParameter("wait_for_completion", "true");
        request.setJsonEntity(
            Strings.toString(JsonXContent.contentBuilder().startObject().field("include_global_state", true).endObject())
        );
        assertOK(client().performRequest(request));
    }
    private void restoreSnapshot(String repoName, String snapshotName, String authHeader) throws IOException {
        final Request request = new Request("POST", "/_snapshot/" + repoName + "/" + snapshotName + "/_restore");
        if (authHeader != null) {
            request.setOptions(RequestOptions.DEFAULT.toBuilder().addHeader("Authorization", authHeader));
        }
        request.addParameter("wait_for_completion", "true");
        request.setJsonEntity(
            Strings.toString(JsonXContent.contentBuilder().startObject().field("include_global_state", true).endObject())
        );
        assertOK(client().performRequest(request));
    }
    @SuppressWarnings("unchecked")
    private Map<String, Object> getPersistentSettings() throws IOException {
        final Request getSettingsRequest = new Request("GET", "/_cluster/settings?flat_settings");
        Map<String, Object> response = entityAsMap(client().performRequest(getSettingsRequest));
        return (Map<String, Object>) response.get("persistent");
    }
}