Updating a Data Source

Function

This API is used to update a data source. If the data source does not exist, the system reports an error. This API is compatible with Sahara.

URI

Request

Table 2 Request parameter description

Parameter

Mandatory

Type

Description

name

No

String

Data source name

Contains 1 to 80 characters and consists of letters, digits, hyphens (-), and underscores (_) only.

type

Yes

String

Data source type

  • hdfs
  • obs
  • swift (not supported by the current version)

url

No

String

Data source URL

Contains 1 to 255 characters.

  • If the data source type is HDFS, the value is /Save path of the data source.
  • If the data source type is OBS, the value is s3a://Save path of the data source.

description

No

String

Data source description

Contains a maximum of 65535 characters.

is_protected

No

Bool

Whether the data source is protected

  • true
  • false

The current version does not support this function.

is_public

No

Bool

Whether the data source is public

  • true
  • false

The current version does not support this function.

Response

Table 3 Response parameter description

Parameter

Type

Description

description

String

Data source description

url

String

Data source URL

tenant_id

String

Project ID. For details on how to obtain the project ID, see Obtaining a Project ID.

created_at

String

Data source creation time

updated_at

String

Data source update time

is_protected

Bool

Whether the data source is protected

  • true
  • false

The current version does not support this function.

is_public

Bool

Whether the data source is public

  • true
  • false

The current version does not support this function.

type

String

Data source type

id

String

Data source ID

name

String

Data source name

Example

Status Code

Table 4 describes the status code of this API.

Table 4 Status code

Status Code

Description

202

The data source has been successfully updated.

For the description about error status codes, see Status Codes.