Exemplo n.º 1
0
 /// <summary>
 /// Create the watcher identified by watcher name.  (see
 /// http://aka.ms/azureautomationsdk/watcheroperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IWatcherOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The create or update parameters for watcher.
 /// </param>
 /// <returns>
 /// The response model for the create or update watcher operation.
 /// </returns>
 public static Task <WatcherCreateOrUpdateResponse> CreateOrUpdateAsync(this IWatcherOperations operations, string resourceGroupName, string automationAccount, WatcherCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create the watcher identified by watcher name.
 /// <see href="http://aka.ms/azureautomationsdk/watcheroperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='watcherName'>
 /// The watcher name.
 /// </param>
 /// <param name='parameters'>
 /// The create or update parameters for watcher.
 /// </param>
 public static Watcher CreateOrUpdate(this IWatcherOperations operations, string resourceGroupName, string automationAccountName, string watcherName, Watcher parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, watcherName, parameters).GetAwaiter().GetResult());
 }