code: func (a *API) UpdateProvisionBroker(cid CIDType, cfg *ProvisionBroker) (*ProvisionBroker, error) {
  	if cfg == nil {
  		return nil, fmt.Errorf("Invalid provision broker request config [nil]")
  	}
  
  	if cid == nil || *cid == "" {
  		return nil, fmt.Errorf("Invalid provision broker request CID [none]")
  	}
  
  	brokerCID := string(*cid)
  
  	matched, err := regexp.MatchString(config.ProvisionBrokerCIDRegex, brokerCID)
  	if err != nil {
  		return nil, err
  	}
  	if !matched {
  		return nil, fmt.Errorf("Invalid provision broker request CID [%s]", brokerCID)
  	}
  
  	jsonCfg, err := json.Marshal(cfg)
  	if err != nil {
  		return nil, err
  	}
  
  	if a.Debug {
  		a.Log.Printf("[DEBUG] update broker provision request, sending JSON: %s", string(jsonCfg))
  	}
  
  	result, err := a.Put(brokerCID, jsonCfg)
  	if err != nil {
  		return nil, err
  	}
  
  	broker := &ProvisionBroker{}
  	if err := json.Unmarshal(result, broker); err != nil {
  		return nil, err
  	}
  
  	return broker, nil
  }
docs: // UpdateProvisionBroker updates a broker definition [request].