/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='ruleName'> /// Required. The name of the rule to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse DeleteRule(this IAlertOperations operations, string resourceGroupName, string ruleName) { return(Task.Factory.StartNew((object s) => { return ((IAlertOperations)s).DeleteRuleAsync(resourceGroupName, ruleName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='parameters'> /// Required. The rule to create or update. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse CreateOrUpdateRule(this IAlertOperations operations, string resourceGroupName, RuleCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IAlertOperations)s).CreateOrUpdateRuleAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List the alert rules within a resource group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='targetResourceUri'> /// Optional. The resource identifier of the target of the alert rule. /// </param> /// <returns> /// The List Rules operation response. /// </returns> public static RuleListResponse ListRules(this IAlertOperations operations, string resourceGroupName, string targetResourceUri) { return(Task.Factory.StartNew((object s) => { return ((IAlertOperations)s).ListRulesAsync(resourceGroupName, targetResourceUri); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the InsightsManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private InsightsManagementClient(HttpClient httpClient) : base(httpClient) { this._alertOperations = new AlertOperations(this); this._autoscaleOperations = new AutoscaleOperations(this); this._monitoringConfigurationOperations = new MonitoringConfigurationOperations(this); this._apiVersion = "2014-04-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the InsightsManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public InsightsManagementClient(HttpClient httpClient) : base(httpClient) { this._agentDiagnosticSettingsOperations = new AgentDiagnosticSettingsOperations(this); this._alertOperations = new AlertOperations(this); this._autoscaleOperations = new AutoscaleOperations(this); this._monitoringConfigurationOperations = new MonitoringConfigurationOperations(this); this._serviceDiagnosticSettingsOperations = new ServiceDiagnosticSettingsOperations(this); this._storageDiagnosticSettingsOperations = new StorageDiagnosticSettingsOperations(this); this._apiVersion = "2014-04-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='parameters'> /// Required. The rule to create or update. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> CreateOrUpdateRuleAsync(this IAlertOperations operations, string resourceGroupName, RuleCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateRuleAsync(resourceGroupName, parameters, CancellationToken.None)); }
/// <summary> /// List the alert rules within a resource group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='targetResourceUri'> /// Optional. The resource identifier of the target of the alert rule. /// </param> /// <returns> /// The List Rules operation response. /// </returns> public static Task <RuleListResponse> ListRulesAsync(this IAlertOperations operations, string resourceGroupName, string targetResourceUri) { return(operations.ListRulesAsync(resourceGroupName, targetResourceUri, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='ruleName'> /// Required. The name of the rule. /// </param> /// <returns> /// The List incidents operation response. /// </returns> public static Task <IncidentListResponse> ListIncidentsForRuleAsync(this IAlertOperations operations, string resourceGroupName, string ruleName) { return(operations.ListIncidentsForRuleAsync(resourceGroupName, ruleName, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='ruleName'> /// Required. The name of the rule to retrieve. /// </param> /// <returns> /// The Get Rule operation response. /// </returns> public static Task <RuleGetResponse> GetRuleAsync(this IAlertOperations operations, string resourceGroupName, string ruleName) { return(operations.GetRuleAsync(resourceGroupName, ruleName, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.IAlertOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='ruleName'> /// Required. The name of the rule to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteRuleAsync(this IAlertOperations operations, string resourceGroupName, string ruleName) { return(operations.DeleteRuleAsync(resourceGroupName, ruleName, CancellationToken.None)); }