Updated on 2023-12-14 GMT+08:00

Creating Datasource Authentication (Discarded)

Function

This API is used to create datasource authentication.

This API has been discarded and is not recommended.

URI

  • URI format

    POST /v2.0/{project_id}/datasource/auth-infos

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

auth_info_name

Yes

String

Authentication information name, which is unique in a project.

user_name

No

String

Username

password

No

String

Password

certificate_location

No

String

Path of the security cluster certificate. Currently, only OBS paths and CER files are supported.

datasource_type

Yes

String

Data source type. Available values are CSS, KRB, passwd, and Kafka_SSL.

krb5_conf

No

String

OBS path of the krb5 configuration file

keytab

No

String

OBS path of the keytab configuration file

truststore_location

No

String

OBS path of the truststore configuration file

truststore_password

No

String

Password of the truststore configuration file

keystore_location

No

String

OBS path of the keystore configuration file

keystore_password

No

String

Password of the keystore configuration file

key_password

No

String

Key password

Response

Table 3 Parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

String

System prompt. If execution succeeds, the message may be left blank.

Example Request

Create a CSS datasource authentication.

{
       "auth_info_name": "test",
       "user_name": "admin",
       "password": "***",
       "certificate_location": "obs://test/CloudSearchService.cer",
       "datasource_type": "CSS"
}

Example Response

{
    "is_success": true,
    "message": "Upload success."
}

Status Codes

Status Code

Description

200

OK

Error Codes

For details, see Error Codes.