Пример #1
0
        public virtual Response <AppServicePlan> Update(AppServicePlanUpdateOptions options, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(options, nameof(options));

            using var scope = _appServicePlanClientDiagnostics.CreateScope("AppServicePlan.Update");
            scope.Start();
            try
            {
                var response = _appServicePlanRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options, cancellationToken);
                return(Response.FromValue(new AppServicePlan(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
        public virtual Response <AppServicePlan> Update(AppServicePlanPatchOptions appServicePlan, CancellationToken cancellationToken = default)
        {
            if (appServicePlan == null)
            {
                throw new ArgumentNullException(nameof(appServicePlan));
            }

            using var scope = _clientDiagnostics.CreateScope("AppServicePlan.Update");
            scope.Start();
            try
            {
                var response = _appServicePlansRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appServicePlan, cancellationToken);
                return(Response.FromValue(new AppServicePlan(this, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }