Modifying a Link
Function
This API is used to modify a link.
Calling Method
For details, see Calling APIs.
URI
PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Project ID and Account ID. |
cluster_id |
Yes |
String |
Cluster ID |
link_name |
Yes |
String |
Link name |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
links |
Yes |
Array of links objects |
Link list. For details, see the descriptions of links parameters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
link-config-values |
Yes |
link-config-values object |
Link parameters. For details, see the descriptions of link-config-values parameters. |
creation-user |
No |
String |
User who created a link |
name |
Yes |
String |
Link name |
id |
No |
Integer |
Link ID |
creation-date |
No |
Long |
Time when a link was created |
connector-name |
Yes |
String |
Connector name. The corresponding link parameter is generic-jdbc-connector, which indicates a relational database link. obs-connector: link to OBS hdfs-connector: link to HDFS hbase-connector: link to HBase and link to CloudTable hive-connector: link to Hive ftp-connector/sftp-connector: link to an FTP or SFTP server mongodb-connector: link to MongoDB redis-connector: link to Redis/DCS kafka-connector: link to Kafka dis-connector: link to DIS elasticsearch-connector: link to Elasticsearch/Cloud Search Service (CSS) dli-connector: link to DLIhttp-connector: link to HTTP/HTTPS (No link parameters are required.) dms-kafka-connector: link to DMSKafka |
update-date |
No |
Long |
Time when a link was updated |
enabled |
No |
Boolean |
Whether to activate the link. The default value is true. |
update-user |
No |
String |
User who updated a link |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
configs |
Yes |
Array of configs objects |
Data structure of link parameters. For details, see the descriptions of configs parameters. |
extended-configs |
No |
extended-configs object |
Extended configuration. For details, see the descriptions of extended-configs parameters. |
validators |
No |
Array of strings |
Validator |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
inputs |
Yes |
Array of Input objects |
Input parameter list. Each element in the list is in name,value format. For details, see the descriptions of inputs parameters. In the from-config-values data structure, the value of this parameter varies with the source link type. For details, see section "Source Job Parameters" in the Cloud Data Migration User Guide. In the to-config-values data structure, the value of this parameter varies with the destination link type. For details, see section "Destination Job Parameters" in the Cloud Data Migration User Guide. For details about the inputs parameter in the driver-config-values data structure, see the job parameter descriptions. |
name |
Yes |
String |
Configuration name. The value is fromJobConfig for a source job, toJobConfig for a destination job, and linkConfig for a link. |
id |
No |
Integer |
Configuration ID, which is generated by the system. You do not need to set this parameter. |
type |
No |
String |
Configuration type, which is generated by the system. You do not need to set this parameter. The value can be LINK (for link management APIs) or JOB (for job management APIs). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Parameter name.
|
value |
Yes |
Object |
Parameter value, which must be a string. |
type |
No |
String |
Value type, such as STRING and INTEGER. The value is set by the system. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
validation-result |
Array of validationResult objects |
Validation structure. If a link fails to be created, the failure cause is returned. For details, see the descriptions of validation-result parameters. If a link is successfully created, an empty list is returned. |
Parameter |
Type |
Description |
---|---|---|
linkConfig |
Array of validationLinkConfig objects |
Validation result of link creation or update. For details, see the descriptions of validationLinkConfig parameters. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Error message |
status |
String |
Error level, for example, ERROR or WARNING |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
message |
String |
Error message |
status |
String |
Error level, for example, ERROR or WARNING |
Example Requests
Modifying a link named mysql_link
PUT /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/link/rdb_link { "links" : [ { "link-config-values" : { "configs" : [ { "inputs" : [ { "name" : "linkConfig.databaseType", "value" : "MYSQL" }, { "name" : "linkConfig.host", "value" : "100.94.8.163" }, { "name" : "linkConfig.port", "value" : "3306" }, { "name" : "linkConfig.database", "value" : "DB_name" }, { "name" : "linkConfig.username", "value" : "username" }, { "name" : "linkConfig.password", "value" : "DB_password" }, { "name" : "linkConfig.fetchSize", "value" : "100000" }, { "name" : "linkConfig.usingNative", "value" : "false" } ], "name" : "linkConfig" } ] }, "name" : "mysql_link", "creation-date" : 1496654788622, "connector-name" : "generic-jdbc-connector", "update-date" : 1496654788622, "enabled" : true } ] }
Example Responses
Status code: 200
Request succeeded.
{ "validation-result" : [ { } ] }
Status code: 500
Internal service error. For details about the returned error code, see Error Codes.
{ "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" } ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
No operation permissions. |
404 |
No resources found. |
500 |
Internal service error. For details about the returned error code, see Error Codes. |
503 |
Service unavailable. |
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.