Ejemplo n.º 1
0
        public virtual Response <CapacityReservationGroup> Update(CapacityReservationGroupUpdateOptions options, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(options, nameof(options));

            using var scope = _capacityReservationGroupClientDiagnostics.CreateScope("CapacityReservationGroup.Update");
            scope.Start();
            try
            {
                var response = _capacityReservationGroupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, options, cancellationToken);
                return(Response.FromValue(new CapacityReservationGroup(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
Ejemplo n.º 2
0
        public virtual Response <CapacityReservationGroup> Update(CapacityReservationGroupUpdate parameters, CancellationToken cancellationToken = default)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            using var scope = _capacityReservationGroupClientDiagnostics.CreateScope("CapacityReservationGroup.Update");
            scope.Start();
            try
            {
                var response = _capacityReservationGroupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, parameters, cancellationToken);
                return(Response.FromValue(new CapacityReservationGroup(ArmClient, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }