code: func (c *Cluster) UpdateNode(input string, version uint64, spec types.NodeSpec) error {
  	return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
  		nodeSpec, err := convert.NodeSpecToGRPC(spec)
  		if err != nil {
  			return errdefs.InvalidParameter(err)
  		}
  
  		ctx, cancel := c.getRequestContext()
  		defer cancel()
  
  		currentNode, err := getNode(ctx, state.controlClient, input)
  		if err != nil {
  			return err
  		}
  
  		_, err = state.controlClient.UpdateNode(
  			ctx,
  			&swarmapi.UpdateNodeRequest{
  				NodeID: currentNode.ID,
  				Spec:   &nodeSpec,
  				NodeVersion: &swarmapi.Version{
  					Index: version,
  				},
  			},
  		)
  		return err
  	})
  }
docs: // UpdateNode updates existing nodes properties.