public virtual StorageInsight CreateOrUpdateStorageInsight(
            string resourceGroupName, 
            string workspaceName,
            string name,
            string storageAccountResourceId,
            string storageAccountKey,
            List<string> tables,
            List<string> containers)
        {
            StorageInsightProperties properties = new StorageInsightProperties { Containers = containers, Tables = tables };

            if (!string.IsNullOrWhiteSpace(storageAccountResourceId) || !string.IsNullOrWhiteSpace(storageAccountKey))
            {
                properties.StorageAccount = new StorageAccount { Id = storageAccountResourceId, Key = storageAccountKey };
            }

            var response = OperationalInsightsManagementClient.StorageInsights.CreateOrUpdate(
                resourceGroupName,
                workspaceName,
                new StorageInsightCreateOrUpdateParameters
                {
                    StorageInsight = new StorageInsight { Name = name, Properties = properties }
                });

            return response.StorageInsight;
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the StorageInsight class with
 /// required arguments.
 /// </summary>
 public StorageInsight(StorageInsightProperties properties, string name)
     : this()
 {
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     this.Properties = properties;
     this.Name       = name;
 }
 /// <summary>
 /// Initializes a new instance of the StorageInsight class with
 /// required arguments.
 /// </summary>
 public StorageInsight(StorageInsightProperties properties, string name)
     : this()
 {
     if (properties == null)
     {
         throw new ArgumentNullException("properties");
     }
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     this.Properties = properties;
     this.Name = name;
 }