Convert Acquia Clear Varnish For One URL Curl Command to Drupal::httpClient()
I found the solution: https://docs.acquia.com/cloud-platform/performance/varnish/manually-purge/#manually-clearing-caches-for-applications-using-ssl
PHP way:
    $varnishUrl = 'https://bal-' . $elbDomain . '.prod.hosting.acquia.com' . $nodeUrl;
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $varnishUrl);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PURGE');
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    $headers = [];
    $headers[] = &quot;X-Acquia-Purge: {$xAcquiaPurge}&quot;;
    $headers[] = &quot;Host: example.com&quot;;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_exec($curl);
    $code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    if ($code == 200) {
      return $code;
      curl_close($curl);
    }
    $errorMsg = curl_getinfo($curl);
    \Drupal::logger('module_name')-&gt;error(json_encode($errorMsg));
    curl_close($curl);

Drupal way:
    $varnishUrl = 'https://bal-' . $elbDomain . '.prod.hosting.acquia.com' . $nodeUrl;
    $options = [
         'verify' =&gt; false,
         'headers' =&gt; [
           'X-Acquia-Purge' =&gt; $xAcquiaPurge,
           'Host' =&gt; 'example.com',
         ],
       ];
       try {
         $client = \Drupal::httpClient();
         $response = $client-&gt;request('PURGE', $varnishUrl, $options);
         $code = $response-&gt;getStatusCode();
         if ($code == 200) {
           return $code;
         }
       }
       catch (RequestException $e) {
         watchdog_exception('module_name', $e);
       }