Updated on 2022-09-15 GMT+08:00

Modifying a Link

Function

This API is used to modify a link.

URI

PUT /v1.1/{project_id}/clusters/{cluster_id}/cdm/link/{link_name}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

cluster_id

Yes

String

Cluster ID

link_name

Yes

String

Link name

Request Parameters

Response Parameters

Status code: 200

Status code: 500

Example Requests

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

OK

{
  "name" : "rdb_link",
  "validation-result" : { }
}

Status code: 500

An internal service error occurred. For details, 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

Error Codes

See Error Codes.