Updating a Data Connection
Function
This API is used to update a data connection.
Debugging
You can debug this API in API Explorer. Automatic authentication is supported. API Explorer can automatically generate sample SDK code and provide the sample SDK code debugging.
URI
PUT /v2/{project_id}/data-connectors/{connector_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
connector_id |
Yes |
String |
Data connection ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
data_connector |
Yes |
DataConnector object |
Data connection. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
connector_name |
Yes |
String |
Data connection name |
source_type |
Yes |
String |
The data connection type. The options are as follows:
|
source_info |
Yes |
String |
Data source information, in JSON format. The content varies from one data connection to another. For details about the source_info content for each data source, see the example request. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
String |
The operation result of the mapping update request. Value succeeded indicates that the operation is successful, and value failed indicates that the operation fails. |
Example Request
/v2/274ee662a7e24cc99bfc858c4558dbf6/data-connector/7d169c6c-ab50-4a56-a5d2-240ca20aabda { "data_connector" : { "connector_name" : "mrs-mysql-connector", "source_type" : "RDS_MYSQL", "source_info" : "{\"db_name\":\"default\",\"user_name\":\"mrs\",\"password\":\"*****\",\"rds_instance_id\":\"3aa55f1cb4c3491686936130f21e9f16in01\"}" } }
Example Response
Status code: 200
Data connection updated.
{ "result" : "succeed" }
Status Codes
See Status Codes.
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot