/// <summary>
 /// You can retrieve historical usage metrics for a site by issuing an
 /// HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebSiteOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webSiteName'>
 /// Required. The name of the web site.
 /// </param>
 /// <param name='slotName'>
 /// Optional. The name of the slot.
 /// </param>
 /// <param name='parameters'>
 /// Required. The Get Web Site Historical Usage Metrics parameters.
 /// </param>
 /// <returns>
 /// The Get Web Site Historical Usage Metrics operation response.
 /// </returns>
 public static Task<WebSiteGetHistoricalUsageMetricsResponse> GetHistoricalUsageMetricsAsync(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, string slotName, WebSiteGetHistoricalUsageMetricsParameters parameters)
 {
     return operations.GetHistoricalUsageMetricsAsync(resourceGroupName, webSiteName, slotName, parameters, CancellationToken.None);
 }
예제 #2
0
     public WebSiteGetHistoricalUsageMetricsResponse GetWebAppUsageMetrics(string resourceGroupName, string webSiteName, string slotName,  IList<string> metricNames,
 DateTime? startTime, DateTime? endTime, string timeGrain, bool instanceDetails)
     {
         WebSiteGetHistoricalUsageMetricsParameters parameters = new WebSiteGetHistoricalUsageMetricsParameters();
         parameters.MetricNames = metricNames;
         parameters.IncludeInstanceBreakdown = instanceDetails;
         parameters.EndTime = endTime;
         parameters.StartTime = startTime;
         parameters.TimeGrain = timeGrain;
         var usageMetrics = WrappedWebsitesClient.WebSites.GetHistoricalUsageMetrics(resourceGroupName, webSiteName, slotName,parameters);
         return usageMetrics;
     }
 /// <summary>
 /// You can retrieve historical usage metrics for a site by issuing an
 /// HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebSiteOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webSiteName'>
 /// Required. The name of the web site.
 /// </param>
 /// <param name='slotName'>
 /// Optional. The name of the slot.
 /// </param>
 /// <param name='parameters'>
 /// Required. The Get Web Site Historical Usage Metrics parameters.
 /// </param>
 /// <returns>
 /// The Get Web Site Historical Usage Metrics operation response.
 /// </returns>
 public static WebSiteGetHistoricalUsageMetricsResponse GetHistoricalUsageMetrics(this IWebSiteOperations operations, string resourceGroupName, string webSiteName, string slotName, WebSiteGetHistoricalUsageMetricsParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IWebSiteOperations)s).GetHistoricalUsageMetricsAsync(resourceGroupName, webSiteName, slotName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }