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
- Format
- Parameter description
Table 1 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details on how to obtain the project ID, see Obtaining a Project ID.
data_source_id
Yes
Data source ID
Request
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
|
url |
No |
String |
Data source URL Contains 1 to 255 characters.
|
description |
No |
String |
Data source description Contains a maximum of 65535 characters. |
is_protected |
No |
Bool |
Whether the data source is protected
The current version does not support this function. |
is_public |
No |
Bool |
Whether the data source is public
The current version does not support this function. |
Response
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
The current version does not support this function. |
is_public |
Bool |
Whether the data source is public
The current version does not support this function. |
type |
String |
Data source type |
id |
String |
Data source ID |
name |
String |
Data source name |
Example
- Example request
{ "name": "my-data-source-update", "url": "/simple/mapreduce/input", "is_protected": false, "is_public": false, "type": "hdfs", "description": "this is the data source template" }
- Example response
{ "data_source": { "name": "my-data-source-update", "type": "hdfs", "url": "/simple/mapreduce/input", "description": "this is the data source template", "created_at": "2017-06-22T08:28:57", "updated_at": "2017-06-22T08:30:08", "id": "e275a927-fe72-4b8b-a634-e47a11dca181", "tenant_id": "5a3314075bfa49b9ae360f4ecd333695", "is_public": false, "is_protected": false } }
Status Code
Table 4 describes the status code of this API.
For the description about error status codes, see Status 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