/// <summary>
 /// Create or Update the module identified by module name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </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='moduleName'>
 /// The name of module.
 /// </param>
 /// <param name='parameters'>
 /// The create or update parameters for module.
 /// </param>
 public static Module CreateOrUpdate(this IModuleOperations operations, string resourceGroupName, string automationAccountName, string moduleName, ModuleCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, moduleName, parameters).GetAwaiter().GetResult());
 }
示例#2
0
 /// <summary>
 /// Create the module identified by module name.  (see
 /// http://aka.ms/azureautomationsdk/moduleoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IModuleOperations.
 /// </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 module.
 /// </param>
 /// <returns>
 /// The response model for the create or update module operation.
 /// </returns>
 public static Task <ModuleCreateOrUpdateResponse> CreateOrUpdateAsync(this IModuleOperations operations, string resourceGroupName, string automationAccount, ModuleCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }