in src/Program.cs [731:774]
private void ValidateArgumentsCoherency()
{
// Queued ingestion
if (string.Equals(m_targetServiceType, KustoIngestionConstants.DmClusterServiceType, StringComparison.OrdinalIgnoreCase))
{
var sb = new StringBuilder();
if (m_args.ForceSync.HasValue)
{
sb.Append("forceSync");
}
if (m_args.BatchSizeInMBs.HasValue)
{
sb.Append(", dataBatchSize");
}
if (m_args.FilesInBatch.HasValue)
{
sb.Append(", filesInBatch");
}
if (m_args.ParallelRequests.HasValue)
{
sb.Append(", parallelRequests");
}
if (sb.Length > 0)
{
throw new UtilsArgumentException(
$"Command line arguments error. The following arguments are not supported when working with '{m_kcsb.ServiceName}' endpoint: '{sb.ToString()}'", null);
}
}
ValidateSourcePath();
if (!string.IsNullOrEmpty(m_args.ConnectToStorageWithManagedIdentity))
{
if (!m_args.ConnectToStorageWithManagedIdentity.Equals(AadManagedIdentityTokenCredentialsProvider.SystemAssignedManagedIdentityKeyword) &&
!Guid.TryParse(m_args.ConnectToStorageWithManagedIdentity, out _))
{
throw new UtilsArgumentException(
$"Command line arguments error. If 'ConnectToStorageWithManagedIdentity' expected either Guid or \"system\".", null);
}
}
}