Ejemplo n.º 1
0
 public virtual Response <ScalingPlan> Update(ScalingPlanUpdateOptions options = null, CancellationToken cancellationToken = default)
 {
     using var scope = _scalingPlanClientDiagnostics.CreateScope("ScalingPlan.Update");
     scope.Start();
     try
     {
         var response = _scalingPlanRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options, cancellationToken);
         return(Response.FromValue(new ScalingPlan(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
Ejemplo n.º 2
0
        public virtual Response <ScalingPlanResource> Update(PatchableScalingPlanData data, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(data, nameof(data));

            using var scope = _scalingPlanClientDiagnostics.CreateScope("ScalingPlanResource.Update");
            scope.Start();
            try
            {
                var response = _scalingPlanRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken);
                return(Response.FromValue(new ScalingPlanResource(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }