Modifying a Link
Function
This API is used to modify a link that you have created.
URI
- URI format
PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name} - Parameter description
Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain the project ID, see Obtaining the Project ID, Account Name, and AK/SK.
cluster_id
Yes
String
Cluster ID. Obtain the value from the response for Creating a Cluster.
link_name
Yes
String
Link name
- Parameter description of a message body
The parameters for modifying a link are the same as those for creating a link. For details, see Request in Creating a Link.
Request
Sample request
PUT /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/link/rdb_link
{
"links": [{
"enabled": true,
"update-user": null,
"name": "mysql_link",
"link-config-values": {
"configs": [
{
"name": "linkConfig",
"inputs": [
{
"name": "linkConfig.databaseType",
"value": "MYSQL"
},
{
"name": "linkConfig.host",
"value": "10.120.85.24"
},
{
"name": "linkConfig.port",
"value": "3306"
},
{
"name": "linkConfig.database",
"value": "DB_name"
},
{
"name": "linkConfig.username",
"value": "username"
},
{
"name": "linkConfig.password",
"value": "Add password here"
},
{
"name": "linkConfig.fetchSize",
"value": "100000"
},
{
"name": "linkConfig.usingNative",
"value": "true"
}
]
}
]
},
"connector-name": "generic-jdbc-connector",
"creation-date": 1496654788622,
"update-date": 1496654788622,
"creation-user": null
}]
}
Response
- Successful sample response
{ "validation-result": [{ }] } - Failed sample response
{ "validation-result": [{ "linkConfig": [{ "message": "Can't connect to the database with given credentials: The authentication type 12 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.", "status": "ERROR" }] }] } - Parameter description
Parameter
Mandatory
Type
Description
validation-result
Yes
List
Validation structure
- If a link fails to be modified, the failure cause is returned. For details, see Description of the validation-result parameter.
- If a link is successfully modified, a blank list is returned.
- Description of the validation-result parameter
Parameter
Mandatory
Type
Description
linkConfig
No
List
Validation result of link creation or update. For details, see Description of the linkConfig parameter.
- Description of the linkConfig parameter
Parameter
Mandatory
Type
Description
message
No
String
Error message
status
No
Enumeration
- ERROR
- WARNING
Return Value
- Normal
- Abnormal
Return Value
Description
400 Bad Request
Request error. For details about the returned error code, see Error Code.
401 Unauthorized
Authentication failed.
403 Forbidden
No operation permission.
404 Not Found
The requested resource is not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
Service unavailable.
Last Article: Querying a Link
Next Article: Deleting a Link
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.