Ejemplo n.º 1
0
        public async virtual Task <Response <VMwareCluster> > UpdateAsync(ResourcePatch body = null, CancellationToken cancellationToken = default)
        {
            using var scope = _vMwareClusterClustersClientDiagnostics.CreateScope("VMwareCluster.Update");
            scope.Start();
            try
            {
                var response = await _vMwareClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false);

                return(Response.FromValue(new VMwareCluster(ArmClient, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
Ejemplo n.º 2
0
        public virtual async Task <Response <VMwareClusterResource> > UpdateAsync(ResourcePatch patch, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(patch, nameof(patch));

            using var scope = _vMwareClusterClustersClientDiagnostics.CreateScope("VMwareClusterResource.Update");
            scope.Start();
            try
            {
                var response = await _vMwareClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false);

                return(Response.FromValue(new VMwareClusterResource(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }