Deleting a Log Transfer Task¶
Function¶
This API is used to delete an OBS transfer task.
URI¶
DELETE /v2/{project_id}/transfers
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining the Account ID, Project ID, Log Group ID, and Log Stream ID. Minimum length: 32 characters Maximum length: 32 characters |
Parameter | Mandatory | Type | Description |
---|---|---|---|
log_transfer_id | Yes | String | Log transfer ID. You can obtain the ID by calling the API for querying a log transfer task or for creating a log transfer task. Minimum length: 36 characters Maximum length: 36 characters |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token obtained from IAM. Minimum length: 1000 characters Maximum length: 2000 characters |
Content-Type | Yes | String | Set this parameter to application/json;charset=UTF-8. Minimum length: 30 characters Maximum length: 30 characters |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
log_group_id | String | Log group ID. Minimum length: 36 characters Maximum length: 36 characters |
log_group_name | String | Log group name. Minimum length: 1 character Maximum length: 64 characters |
log_streams | Array of log_streams objects | Log stream list. |
log_transfer_id | String | Log transfer task ID. Minimum length: 36 characters Maximum length: 36 characters |
log_transfer_info | Table 6 object | Log transfer information. |
Parameter | Type | Description |
---|---|---|
log_stream_id | String | Log stream ID. Minimum length: 36 characters Maximum length: 36 characters |
log_stream_name | String | Log stream name. Minimum length: 1 character Maximum length: 64 characters |
Parameter | Type | Description |
---|---|---|
log_agency_transfer | Table 7 object | Information about delegated log transfer. This parameter is returned for a delegated log transfer task. |
log_create_time | Integer | Time when the log transfer task was created. Minimum value: 0 Maximum value: 9999999999999 |
log_storage_format | String | Log transfer format. The value can be RAW or JSON. RAW indicates raw log format, whereas JSON indicates JSON format. JSON and RAW are supported for OBS and DIS transfer tasks, but only RAW is supported for DMS transfer tasks. Enumerated values:
|
log_transfer_detail | Object | Log transfer details. |
log_transfer_mode | String | Log transfer mode. cycle indicates periodical transfer, whereas realTime indicates real-time transfer. cycle is available to OBS transfer tasks and realTime is available to DIS and DMS transfer tasks. Enumerated values:
|
log_transfer_status | String | Log transfer status. ENABLE indicates that log transfer is enabled, DISABLE indicates that log transfer is disabled, and EXCEPTION indicates that log transfer is abnormal. Enumerated values:
|
log_transfer_type | String | Log transfer type. You can transfer logs to OBS, DIS, and DMS. Enumerated values:
|
Parameter | Type | Description |
---|---|---|
agency_domain_id | String | Delegator account ID. Minimum length: 1 character Maximum length: 128 characters |
agency_domain_name | String | Delegator account name. Minimum length: 1 character Maximum length: 128 characters |
agency_name | String | Name of the agency created by the delegator. Minimum length: 1 character Maximum length: 128 characters |
agency_project_id | String | Project ID of the delegator. Minimum length: 32 characters Maximum length: 32 characters |
be_agency_domain_id | String | Account ID of the delegated party (ID of the account that created the log transfer task). Minimum length: 1 character Maximum length: 128 characters |
be_agency_project_id | String | Project ID of the delegated party (project ID of the account that created the log transfer task). Minimum length: 32 characters Maximum length: 32 characters |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. Minimum length: 8 characters Maximum length: 8 characters |
error_msg | String | Error message. Enumerated value:
|
Status code: 500
Parameter | Type | Description |
---|---|---|
error_code | String | Error code. Minimum length: 8 characters Maximum length: 8 characters |
error_msg | String | Error message. |
Example Request¶
Deleting a log transfer task based on the task ID
DELETE https://{endpoint}/v2/{project_id}/transfers
/v2/{project_id}/transfers?log_transfer_id=cfc43c45-9edc-4a03-8578-0eb00cxxxxxx
Example Response¶
Status code: 200
The log transfer task is deleted.
{
"log_group_id" : "9a7e2183-2d6d-4732-9a9b-e897fd4e49e0",
"log_group_name" : "lts-group-kafka",
"log_streams" : [{
"log_stream_id" : "839dac89-35af-4db2-ab4a-a7dda0d0d3f8",
"log_stream_name" : "lts-topic-kafka"
}
],
"log_transfer_id" : "ddced522-233a-4181-a5fc-7b458c819afc",
"log_transfer_info" : {
"log_create_time" : 1634802241847,
"log_storage_format" : "JSON",
"log_agency_transfer" : {
"agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
"agency_domain_name" : "paas_apm_z004xxxxx_xx",
"agency_name" : "test20210325",
"agency_project_id" : "2a473356cca5487f8373be891bfxxxxx",
"be_agency_domain_id" : "1d26cc8c86a840e28a4f8d0d078xxxxx",
"be_agency_project_id" : "2a473356cca5487f8373be891bfxxxxx"
},
"log_transfer_detail" : {
//The following parameters are returned for an OBS transfer task:
"obs_period":2,
"obs_prefix_name":"",
"obs_period_unit":"min",
"obs_transfer_path":"/0002/LogTanks/xxx/",
"obs_bucket_name":"0002",
"obs_encrypted_enable":false,
"obs_dir_pre_fix_name":"",
"obs_time_zone": "UTC+01:00",
"obs_time_zone_id": "Africa/Lagos",
//The following parameters are returned for a DIS transfer task:
"dis_id":"xxxxx",
"dis_name":"xxxxxx"
//The following parameters are returned for a DMS transfer task:
"kafka_id":"xxxxxx",
"kafka_topic":"xxxxx"
},
"log_transfer_mode":"cycle",
"log_transfer_status":"ENABLE",
"log_transfer_type":"OBS"
}
}
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{
"error_code" : "LTS.0207",
"error_msg" : "The log stream is associated by transfer"
}
Status code: 500
The server has received the request but encountered an internal error.
{
"error_code" : "LTS.0010",
"error_msg" : "The system encountered an internal error"
}
Status Codes¶
Status Code | Description |
---|---|
200 | The log transfer task is deleted. |
400 | Invalid request. Modify the request based on the description in error_msg before a retry. |
500 | The server has received the request but encountered an internal error. |
Error Codes¶
For details, see Error Codes.