/// <summary> /// Creates a RoutingIntent resource if it doesn't exist else updates the /// existing RoutingIntent. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the RoutingIntent. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='routingIntentName'> /// The name of the per VirtualHub singleton Routing Intent resource. /// </param> /// <param name='routingIntentParameters'> /// Parameters supplied to create or update RoutingIntent. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <RoutingIntent> CreateOrUpdateAsync(this IRoutingIntentOperations operations, string resourceGroupName, string virtualHubName, string routingIntentName, RoutingIntent routingIntentParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a RoutingIntent resource if it doesn't exist else updates the /// existing RoutingIntent. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the RoutingIntent. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='routingIntentName'> /// The name of the per VirtualHub singleton Routing Intent resource. /// </param> /// <param name='routingIntentParameters'> /// Parameters supplied to create or update RoutingIntent. /// </param> public static RoutingIntent CreateOrUpdate(this IRoutingIntentOperations operations, string resourceGroupName, string virtualHubName, string routingIntentName, RoutingIntent routingIntentParameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters).GetAwaiter().GetResult()); }