/// <summary> /// Enable, disable, or update tags for an alert processing rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='alertProcessingRuleName'> /// The name that needs to be updated. /// </param> /// <param name='alertProcessingRulePatch'> /// Parameters supplied to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AlertProcessingRule> UpdateAsync(this IAlertProcessingRulesOperations operations, string resourceGroupName, string alertProcessingRuleName, PatchObject alertProcessingRulePatch, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, alertProcessingRuleName, alertProcessingRulePatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete an alert processing rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='alertProcessingRuleName'> /// The name of the alert processing rule that needs to be deleted. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AlertProcessingRulesDeleteHeaders> DeleteAsync(this IAlertProcessingRulesOperations operations, string resourceGroupName, string alertProcessingRuleName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, alertProcessingRuleName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Get an alert processing rule by name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='alertProcessingRuleName'> /// The name of the alert processing rule that needs to be fetched. /// </param> public static AlertProcessingRule GetByName(this IAlertProcessingRulesOperations operations, string resourceGroupName, string alertProcessingRuleName) { return(operations.GetByNameAsync(resourceGroupName, alertProcessingRuleName).GetAwaiter().GetResult()); }
/// <summary> /// List all alert processing rules in a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <AlertProcessingRule> > ListByResourceGroupAsync(this IAlertProcessingRulesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all alert processing rules in a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> public static IPage <AlertProcessingRule> ListByResourceGroup(this IAlertProcessingRulesOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// List all alert processing rules in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <AlertProcessingRule> > ListBySubscriptionAsync(this IAlertProcessingRulesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all alert processing rules in a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <AlertProcessingRule> ListByResourceGroupNext(this IAlertProcessingRulesOperations operations, string nextPageLink) { return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List all alert processing rules in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <AlertProcessingRule> ListBySubscription(this IAlertProcessingRulesOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Enable, disable, or update tags for an alert processing rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='alertProcessingRuleName'> /// The name that needs to be updated. /// </param> /// <param name='alertProcessingRulePatch'> /// Parameters supplied to the operation. /// </param> public static AlertProcessingRule Update(this IAlertProcessingRulesOperations operations, string resourceGroupName, string alertProcessingRuleName, PatchObject alertProcessingRulePatch) { return(operations.UpdateAsync(resourceGroupName, alertProcessingRuleName, alertProcessingRulePatch).GetAwaiter().GetResult()); }
/// <summary> /// Create or update an alert processing rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Resource group name where the resource is created. /// </param> /// <param name='alertProcessingRuleName'> /// The name of the alert processing rule that needs to be created/updated. /// </param> /// <param name='alertProcessingRule'> /// Alert processing rule to be created/updated. /// </param> public static AlertProcessingRule CreateOrUpdate(this IAlertProcessingRulesOperations operations, string resourceGroupName, string alertProcessingRuleName, AlertProcessingRule alertProcessingRule) { return(operations.CreateOrUpdateAsync(resourceGroupName, alertProcessingRuleName, alertProcessingRule).GetAwaiter().GetResult()); }