/// <summary> /// Create a variable. (see /// http://aka.ms/azureautomationsdk/variableoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Automation.IVariableOperations. /// </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 parameters supplied to the create or update variable /// operation. /// </param> /// <returns> /// The response model for the create or update variable operation. /// </returns> public static Task <VariableCreateOrUpdateResponse> CreateOrUpdateAsync(this IVariableOperations operations, string resourceGroupName, string automationAccount, VariableCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None)); }
/// <summary> /// Create a variable. /// <see href="http://aka.ms/azureautomationsdk/variableoperations" /> /// </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='variableName'> /// The variable name. /// </param> /// <param name='parameters'> /// The parameters supplied to the create or update variable operation. /// </param> public static Variable CreateOrUpdate(this IVariableOperations operations, string resourceGroupName, string automationAccountName, string variableName, VariableCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, variableName, parameters).GetAwaiter().GetResult()); }