/// <summary> /// The List Log Definitions operation lists the log definitions for /// the resource. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Insights.ILogDefinitionOperations. /// </param> /// <param name='resourceUri'> /// Required. The resource identifier of the target resource to get /// logs for. /// </param> /// <param name='filterString'> /// Optional. An OData $filter expression that supports querying by the /// name of the log definition. For example, "name.value eq /// 'Percentage CPU'". Name is optional, meaning the expression may be /// "". /// </param> /// <returns> /// The List Log Definitions operation response. /// </returns> public static LogDefinitionListResponse GetLogDefinitions(this ILogDefinitionOperations operations, string resourceUri, string filterString) { return(Task.Factory.StartNew((object s) => { return ((ILogDefinitionOperations)s).GetLogDefinitionsAsync(resourceUri, filterString); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the InsightsClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public InsightsClient(HttpClient httpClient) : base(httpClient) { this._eventOperations = new EventOperations(this); this._logDefinitionOperations = new LogDefinitionOperations(this); this._logOperations = new LogOperations(this); this._metricDefinitionOperations = new MetricDefinitionOperations(this); this._metricOperations = new MetricOperations(this); this._usageMetricOperations = new UsageMetricsOperations(this); this._apiVersion = "2014-04-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The List Log Definitions operation lists the log definitions for /// the resource. /// </summary> /// <param name='operations'> /// Reference to the Microsoft.Azure.Insights.ILogDefinitionOperations. /// </param> /// <param name='resourceUri'> /// Required. The resource identifier of the target resource to get /// logs for. /// </param> /// <param name='filterString'> /// Optional. An OData $filter expression that supports querying by the /// name of the log definition. For example, "name.value eq /// 'Percentage CPU'". Name is optional, meaning the expression may be /// "". /// </param> /// <returns> /// The List Log Definitions operation response. /// </returns> public static Task <LogDefinitionListResponse> GetLogDefinitionsAsync(this ILogDefinitionOperations operations, string resourceUri, string filterString) { return(operations.GetLogDefinitionsAsync(resourceUri, filterString, CancellationToken.None)); }