This API is used to update existing templates in DLI.
PUT /v1.0/{project_id}/streaming/job-templates/{template_id}
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. |
template_id |
Yes |
String |
Template ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Template name. Length range: 0 to 57 characters. |
desc |
No |
String |
Template description. Length range: 0 to 512 characters. |
sql_body |
No |
String |
Stream SQL statement, which includes at least the following three parts: source, query, and sink. Length range: 0 to 1024 x 1024 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
{ "name": "simple_stream_sql", "desc": "Example of quick start", "sql_body": "select * from source_table" }
{ "is_success": "true", "message": "The template is updated successfully.", }
Table 4 describes status codes.
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.