Example #1
0
        public async virtual Task <Response <VnetRoute> > UpdateVnetRouteAsync(string routeName, VnetRoute route, CancellationToken cancellationToken = default)
        {
            if (routeName == null)
            {
                throw new ArgumentNullException(nameof(routeName));
            }
            if (route == null)
            {
                throw new ArgumentNullException(nameof(route));
            }

            using var scope = _clientDiagnostics.CreateScope("ServerfarmVirtualNetworkConnection.UpdateVnetRoute");
            scope.Start();
            try
            {
                var response = await _appServicePlansRestClient.UpdateVnetRouteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeName, route, cancellationToken).ConfigureAwait(false);

                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
        public virtual async Task <Response <VnetRoute> > UpdateVnetRouteAsync(string routeName, VnetRoute route, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(routeName, nameof(routeName));
            Argument.AssertNotNull(route, nameof(route));

            using var scope = _serverfarmVirtualNetworkConnectionAppServicePlansClientDiagnostics.CreateScope("ServerfarmVirtualNetworkConnectionResource.UpdateVnetRoute");
            scope.Start();
            try
            {
                var response = await _serverfarmVirtualNetworkConnectionAppServicePlansRestClient.UpdateVnetRouteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, routeName, route, cancellationToken).ConfigureAwait(false);

                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }