/// <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.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Get Historical Usage Metrics
 /// Web hosting plan operation.
 /// </param>
 /// <returns>
 /// The Get Historical Usage Metrics Web hosting plan operation
 /// response.
 /// </returns>
 public static Task<WebHostingPlanGetHistoricalUsageMetricsResponse> GetHistoricalUsageMetricsAsync(this IWebHostingPlanOperations operations, string resourceGroupName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters)
 {
     return operations.GetHistoricalUsageMetricsAsync(resourceGroupName, webHostingPlanName, parameters, CancellationToken.None);
 }
Ejemplo n.º 2
0
     public WebHostingPlanGetHistoricalUsageMetricsResponse GetAppServicePlanHistoricalUsageMetrics(string resourceGroupName, string appServicePlanName, IList<string> metricNames,
 DateTime? startTime, DateTime? endTime, string timeGrain, bool instanceDetails)
     {
         WebHostingPlanGetHistoricalUsageMetricsParameters parameters = new WebHostingPlanGetHistoricalUsageMetricsParameters();
         parameters.MetricNames = metricNames;
         parameters.IncludeInstanceBreakdown = instanceDetails;
         parameters.EndTime = endTime;
         parameters.StartTime = startTime;
         parameters.TimeGrain = timeGrain;
         var response = WrappedWebsitesClient.WebHostingPlans.GetHistoricalUsageMetrics(resourceGroupName, appServicePlanName, parameters);
         return response;
     }
 /// <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.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Get Historical Usage Metrics
 /// Web hosting plan operation.
 /// </param>
 /// <returns>
 /// The Get Historical Usage Metrics Web hosting plan operation
 /// response.
 /// </returns>
 public static WebHostingPlanGetHistoricalUsageMetricsResponse GetHistoricalUsageMetrics(this IWebHostingPlanOperations operations, string resourceGroupName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IWebHostingPlanOperations)s).GetHistoricalUsageMetricsAsync(resourceGroupName, webHostingPlanName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }