docs: private void setupAzureClient(StageInfo stage, RemoteStoreFileEncryptionMaterial encMat)
    throws IllegalArgumentException, SnowflakeSQLException
    {
      // Save the client creation parameters so that we can reuse them,
      // to reset the Azure client.
      this.stageInfo = stage;
      this.encMat = encMat;
  
      logger.debug("Setting up the Azure client ");
  
      try
      {
        URI storageEndpoint = buildAzureStorageEndpointURI(stage.getEndPoint(), stage.getStorageAccount());
  
        StorageCredentials azCreds;
        String sasToken = (String) stage.getCredentials().get("AZURE_SAS_TOKEN");
        if (sasToken != null)
        {
          // We are authenticated with a shared access token.
          azCreds = new StorageCredentialsSharedAccessSignature(sasToken);
        }
        else
        {
          // Use anonymous authentication.
          azCreds = StorageCredentialsAnonymous.ANONYMOUS;
        }
  
        if (encMat != null)
        {
          byte[] decodedKey = Base64.decode(encMat.getQueryStageMasterKey());
          encryptionKeySize = decodedKey.length * 8;
  
          if (encryptionKeySize != 128 &&
              encryptionKeySize != 192 &&
              encryptionKeySize != 256)
          {
            throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,
                                            ErrorCode.INTERNAL_ERROR.getMessageCode(),
                                            "unsupported key size", encryptionKeySize);
          }
        }
        this.azStorageClient = new CloudBlobClient(storageEndpoint, azCreds);
      }
      catch (URISyntaxException ex)
      {
        throw new IllegalArgumentException("invalid_azure_credentials");
      }
    }