code: func (a *API) UpdateCheckBundle(cfg *CheckBundle) (*CheckBundle, error) {
  	if cfg == nil {
  		return nil, fmt.Errorf("Invalid check bundle config [nil]")
  	}
  
  	bundleCID := string(cfg.CID)
  
  	matched, err := regexp.MatchString(config.CheckBundleCIDRegex, bundleCID)
  	if err != nil {
  		return nil, err
  	}
  	if !matched {
  		return nil, fmt.Errorf("Invalid check bundle CID [%s]", bundleCID)
  	}
  
  	jsonCfg, err := json.Marshal(cfg)
  	if err != nil {
  		return nil, err
  	}
  
  	if a.Debug {
  		a.Log.Printf("[DEBUG] update check bundle, sending JSON: %s", string(jsonCfg))
  	}
  
  	result, err := a.Put(bundleCID, jsonCfg)
  	if err != nil {
  		return nil, err
  	}
  
  	checkBundle := &CheckBundle{}
  	if err := json.Unmarshal(result, checkBundle); err != nil {
  		return nil, err
  	}
  
  	return checkBundle, nil
  }
docs: // UpdateCheckBundle updates passed check bundle.