This API is used to add DLI dump tasks.
POST /v2/{project_id}/streams/{stream_name}/transfer-tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
stream_name |
Yes |
String |
Name of the stream. Maximum: 60 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
destination_type |
Yes |
String |
Dump destination. Possible values:
Default: NOWHERE Enumeration values:
|
dli_destination_descriptor |
No |
Parameter list of the DLI to which data in the DIS stream will be dumped. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_name |
Yes |
String |
Name of the dump task. The task name consists of letters, digits, hyphens (-), and underscores (_). It must be a string of 1 to 64 characters. |
agency_name |
Yes |
String |
Name of the agency created on IAM. DIS uses an agency to access your specified resources. The parameters for creating an agency are as follows:
If agencies have been created, you can obtain available agencies from the agency list by using the "Listing Agencies " API. This parameter cannot be left blank and the parameter value cannot exceed 64 characters. If there are dump tasks on the console, the system displays a message indicating that an agency will be automatically created. The name of the automatically created agency is dis_admin_agency. Maximum: 64 |
deliver_time_interval |
Yes |
Integer |
User-defined interval at which data is imported from the current DIS stream into OBS. If no data is pushed to the DIS stream during the current interval, no dump file package will be generated. Value range: 30-900 Default value: 300 Unit: second Minimum: 30 Maximum: 900 Default: 300 |
consumer_strategy |
No |
String |
Offset.
Default value: LATEST Default: LATEST Enumeration values:
|
dli_database_name |
Yes |
String |
Name of the DLI database to which data in the DIS stream will be dumped. |
dli_table_name |
Yes |
String |
Name of the DLI table to which data in the DIS stream will be dumped. Note: Only tables whose data location is DLI are supported, and you must have the permission to insert data into the tables. |
obs_bucket_path |
Yes |
String |
Name of the OBS bucket used to temporarily store data in the DIS stream. |
file_prefix |
No |
String |
Self-defined directory created in the OBS bucket and used to temporarily store data in the DIS stream. Directory levels are separated by slashes (/) and cannot start with slashes. The value can contain a maximum of 50 characters, including letters, digits, underscores (_), and slashes (/). This parameter is left empty by default. |
retry_duration |
No |
String |
Time duration for DIS to retry if data fails to be dumped to DLI. If the retry time exceeds the value of this parameter, the data that fails to be dumped is backed up to the OBS bucket/file_prefix/dli_error directory. Value range: 0-7,200 Unit: second Default value: 1,800 If this parameter is set to 0, DIS does not retry when the dump fails. |
None
None
None
Status Code |
Description |
---|---|
201 |
Normal response. |
See Error Codes.