Esempio n. 1
0
 /// <summary>
 /// Gets all actions of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ActionResponse> > ListByAlertRuleAsync(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAlertRuleWithHttpMessagesAsync(resourceGroupName, workspaceName, ruleId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets all actions of alert rule.
 /// </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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ActionResponse> > ListByAlertRuleNextAsync(this IActionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAlertRuleNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Creates or updates the action of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='actionId'>
 /// Action ID
 /// </param>
 /// <param name='action'>
 /// The action
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ActionResponse> CreateOrUpdateAsync(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, string actionId, ActionRequest action, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, ruleId, actionId, action, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Gets the action of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='actionId'>
 /// Action ID
 /// </param>
 public static ActionResponse Get(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, string actionId)
 {
     return(operations.GetAsync(resourceGroupName, workspaceName, ruleId, actionId).GetAwaiter().GetResult());
 }
Esempio n. 5
0
 /// <summary>
 /// Gets all actions of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 public static IPage <ActionResponse> ListByAlertRule(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId)
 {
     return(operations.ListByAlertRuleAsync(resourceGroupName, workspaceName, ruleId).GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Gets all actions of alert rule.
 /// </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 <ActionResponse> ListByAlertRuleNext(this IActionsOperations operations, string nextPageLink)
 {
     return(operations.ListByAlertRuleNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// Delete the action of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='actionId'>
 /// Action ID
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, string actionId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, ruleId, actionId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 8
0
 /// <summary>
 /// Delete the action of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='actionId'>
 /// Action ID
 /// </param>
 public static void Delete(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, string actionId)
 {
     operations.DeleteAsync(resourceGroupName, workspaceName, ruleId, actionId).GetAwaiter().GetResult();
 }
Esempio n. 9
0
 /// <summary>
 /// Creates or updates the action of alert rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='ruleId'>
 /// Alert rule ID
 /// </param>
 /// <param name='actionId'>
 /// Action ID
 /// </param>
 /// <param name='action'>
 /// The action
 /// </param>
 public static ActionResponse CreateOrUpdate(this IActionsOperations operations, string resourceGroupName, string workspaceName, string ruleId, string actionId, ActionRequest action)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, ruleId, actionId, action).GetAwaiter().GetResult());
 }