// UpdateConnector sets the configuration of an existing connector.
//
// It returns information about the connector after the change has been made
// and an indicator if that connector was created or just configuration update.
UpdateConnector sets the configuration of an existing connector.

It returns information about the connector after the change has been made
and an indicator if that connector was created or just configuration update.
// UpdateConnector sets the configuration of an existing connector . // // It returns information about the connector after the change has been made // and an indicator if that connector was created or just configuration update .
func (c *Client) UpdateConnector(clusterName, name string, config ConnectorConfig) (connector Connector, err error) {
	if clusterName == "" {
		err = errRequired("clusterName")
		return
	}
	if name == "" {
		err = errRequired("name")
		return
	}
	send, derr := json.Marshal(config)
	if derr != nil {
		err = derr
		return
	}
	path := fmt.Sprintf(connectorPath+"/config", clusterName, name)
	resp, respErr := c.Do(http.MethodPut, path, contentTypeJSON, send)
	if respErr != nil {
		err = respErr
		return
	}
	err = c.ReadJSON(resp, &connector)
	return
}
func ( c * Client ) UpdateConnector ( clusterName , name string , config ConnectorConfig ) ( connector Connector , err error ) { if clusterName == " " { err = errRequired ( " " ) return } if name == " " { err = errRequired ( " " ) return } send , derr := json . Marshal ( config ) if derr != nil { err = derr return } path := fmt . Sprintf ( connectorPath + " " , clusterName , name ) resp , respErr := c . Do ( http . MethodPut , path , contentTypeJSON , send ) if respErr != nil { err = respErr return } err = c . ReadJSON ( resp , & connector ) return }
UpdateConnector sets the configuration of an existing connector.
UpdateConnector sets the configuration of an existing connector .
// # Set connector config // PUT /api/proxy-connect/(string: clusterName)/connectors/(string: name)/config // updated := !(resp.StatusCode == http.StatusCreated)