Querying a Link

Function

This API is used to query the link list.

URI

  • URI format
    GET /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. When the parameter is set to all, all links are queried.

Request

Sample request
GET /v1.1/1551c7f6c808414d8e9f3c514a170f2e/clusters/6ec9a0a4-76be-4262-8697-e7af1fac7920/cdm/link/sftplink 

Response

  • Sample response
    {
        "links": [
            {
                "link-config-values": {
                    "configs": [
                        {
                            "name": "linkConfig",
                            "inputs": [
                                {
                                    "size": 128,
                                    "name": "linkConfig.server",
                                    "type": "STRING",
                                    "mandatory": true,
                                    "value": "10.120.85.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
                                }
                            ]
                        }
                    ]
                },
                "creation-user": "cdm",
                "name": "sftp_link",
                "creation-date": 1516674482640,
                "connector-name": "sftp-connector",
                "update-date": 1516674476022,
                "enabled": true,
                "update-user": "cdm"
            }
        ]
    }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    links

    Yes

    List

    Link list. For details, see Description of the links parameter.

  • Description of the links parameter

    Parameter

    Mandatory

    Type

    Description

    link-config-values

    Yes

    Dictionary

    Link configuration. For details, see Description of the link-config-values parameter.

    creation-user

    Yes

    String

    User who created a link

    name

    Yes

    String

    Link name

    creation-date

    Yes

    Timestamp

    Time when a link is created

    connector-name

    Yes

    String

    Connector name

    update-date

    Yes

    Timestamp

    Time when a link is updated

    enabled

    No

    Boolean

    Whether to activate a link

    update-user

    No

    String

    User who updated a link

  • Description of the link-config-values parameter

    Parameter

    Mandatory

    Type

    Description

    configs

    Yes

    List

    Data structure of link configuration items. For details, see Description of the configs parameter.

  • Description of the configs parameter

    Parameter

    Mandatory

    Type

    Description

    name

    Yes

    String

    Configuration name. The link configuration name is fixed to linkConfig.

    inputs

    Yes

    List

    Parameter list. For details, see Description of the inputs parameter.

  • Description of the inputs parameter

    Parameter

    Mandatory

    Type

    Description

    size

    No

    String

    Maximum length of the parameter

    name

    Yes

    String

    Parameter name

    type

    No

    String

    Parameter type

    defaultValue

    No

    String

    Default value of the parameter

    dependent

    No

    Boolean

    Whether the parameter is affected by other components

    value

    No

    String

    Parameter value

    mandatory

    No

    Boolean

    Whether the parameter is mandatory

    editable

    No

    String

    Whether a parameter can be edited

    sensitive

    No

    Boolean

    Whether the parameter is a password

Return Value

  • Normal

    200

  • 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.