Querying a Link
Function
This API is used to query a link.
URI
GET /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project 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). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
links |
Array of links objects |
Link list. For details, see the descriptions of links parameters. |
fromTo-unMapping |
String |
Source and destination data sources not supported by table/file migration |
batchFromTo-mapping |
String |
Source and destination data sources supported by entire DB migration |
Parameter |
Type |
Description |
---|---|---|
link-config-values |
link-config-values object |
Link parameters. For details, see the descriptions of link-config-values parameters. |
creation-user |
String |
User who created the link |
name |
String |
Link name |
id |
Integer |
Link ID |
creation-date |
Long |
Time when the link was created |
connector-name |
String |
Connector name. The mappings between the connectors and links are as follows:- generic-jdbc-connector: link to a relational database - obs-connector: link to OBS - hdfs-connector: link to HDFS- hbase-connector: link to HBase or 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 or DCS- nas-connector: link to NAS or SFS- kafka-connector: link to Kafka- dis-connector: link to DIS- elasticsearch-connector: link to Elasticsearch or Cloud Search Service- dli-connector: link to DLI- **opentsdb-connector: link to CloudTable OpenTSDB- http-connector: link to an HTTP or HTTPS server (No link parameters are required.);- dms-kafka-connector: link to DMS Kafka |
update-date |
Long |
Time when the link was updated |
enabled |
Boolean |
Whether to activate the link. The default value is true. |
update-user |
String |
User who updated the link |
Parameter |
Type |
Description |
---|---|---|
configs |
Array of configs objects |
Data structure of link parameters. For details, see the descriptions of configs parameters. |
extended-configs |
extended-configs object |
Extended configuration. For details, see the descriptions of extended-configs parameters. |
validators |
Array of strings |
Validator |
Parameter |
Type |
Description |
---|---|---|
inputs |
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-cofig-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 |
String |
Configuration name. The value is fromJobConfig for a source job, toJobConfig for a destination job, and linkConfig for a link. |
id |
Integer |
Configuration ID |
type |
String |
Configuration type |
Example Requests
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/link/sftplink
Example Responses
Status code: 200
OK
{ "links" : [ { "link-config-values" : { "configs" : [ { "inputs" : [ { "size" : 128, "name" : "linkConfig.server", "type" : "STRING", "mandatory" : true, "value" : "100.94.8.163" }, { "defaultValue" : 22, "name" : "linkConfig.port", "type" : "INTEGER", "mandatory" : true, "value" : 22 }, { "size" : 32, "name" : "linkConfig.username", "type" : "STRING", "mandatory" : true, "value" : "root" }, { "size" : 32, "name" : "linkConfig.password", "sensitive" : true, "type" : "STRING", "mandatory" : true } ], "name" : "linkConfig" } ] }, "creation-user" : "cdm", "name" : "sftp_link", "creation-date" : 1516674482640, "connector-name" : "sftp-connector", "update-date" : 1516674476022, "enabled" : true, "update-user" : "cdm" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions to perform this operation. |
404 |
The requested resource was not found. |
500 |
An internal service error occurred. For details, 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot