/// <summary> /// Create or update the log profile. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Insights.ILogProfilesOperations. /// </param> /// <param name='name'> /// Required. The name of the log profile. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the operation. /// </param> /// <returns> /// Generic empty response. We only pass it to ensure json error /// handling /// </returns> public static Task <EmptyResponse> CreateOrUpdateAsync(this ILogProfilesOperations operations, string name, LogProfileCreatOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(name, parameters, CancellationToken.None)); }
/// <summary> /// Create or update a log profile in Azure Monitoring REST API. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='logProfileName'> /// The name of the log profile. /// </param> /// <param name='parameters'> /// Parameters supplied to the operation. /// </param> public static LogProfileResource CreateOrUpdate(this ILogProfilesOperations operations, string logProfileName, LogProfileResource parameters) { return(operations.CreateOrUpdateAsync(logProfileName, parameters).GetAwaiter().GetResult()); }