code: func (c *Cluster) UpdateConfig(input string, version uint64, spec types.ConfigSpec) error {
  	return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
  		config, err := getConfig(ctx, state.controlClient, input)
  		if err != nil {
  			return err
  		}
  
  		configSpec := convert.ConfigSpecToGRPC(spec)
  
  		_, err = state.controlClient.UpdateConfig(ctx,
  			&swarmapi.UpdateConfigRequest{
  				ConfigID: config.ID,
  				ConfigVersion: &swarmapi.Version{
  					Index: version,
  				},
  				Spec: &configSpec,
  			})
  		return err
  	})
  }
docs: // UpdateConfig updates a config in a managed swarm cluster.
  // Note: this is not exposed to the CLI but is available from the API only