Deleting a Log Transfer Task
Function
This API is used to delete a log transfer task, such as an OBS, DIS, or DMS transfer task.
Calling Method
For details, see Calling APIs.
URI
DELETE /v2/{project_id}/transfers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. It can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
log_transfer_id |
Yes |
String |
Definition Log transfer task ID. You can obtain it by calling either of the following APIs:
Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Content-Type |
Yes |
String |
Definition Message body format. Set this parameter to application/json;charset=utf8. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
log_group_id |
String |
Definition ID of the created log group. Range N/A |
log_group_name |
String |
Definition Name of the created log group. Range N/A |
log_streams |
Array of log_streams objects |
Definition Details about log streams in the log group. |
log_transfer_id |
String |
Definition ID of the created log transfer task. Range N/A |
log_transfer_info |
log_transfer_info_RespBody object |
Definition Log transfer information. |
Parameter |
Type |
Description |
---|---|---|
log_stream_id |
String |
Definition Log stream ID. Range N/A |
log_stream_name |
String |
Definition Log stream name. Range N/A |
Parameter |
Type |
Description |
---|---|---|
log_agency_transfer |
log_agency_transfer object |
Definition Information about the transfer agency. If the log source of transfer is another account, logs generated by the delegator account is transferred. Ensure that the delegator has created an agency for log transfer delegation in IAM. |
log_create_time |
Integer |
Definition Time when the log transfer task was created. Range 0 to 2147483647 |
log_storage_format |
String |
Definition Log transfer format. The value can be RAW (raw logs) or JSON. The available format options depend on the selected transfer destination. When the transfer destination is OBS or DIS, JSON and RAM are supported. When the transfer destination is DMS, only RAW is supported. Range
|
log_transfer_detail |
TransferDetail object |
Definition Log transfer information. |
log_transfer_mode |
String |
Definition Log transfer mode. The value can be cycle (periodical transfer) and realTime (real-time transfer). The available mode options depend on the selected transfer destination. If the transfer destination is OBS, the transfer mode can be cycle. If the transfer destination is DIS or DMS, the transfer mode can be realTime. Range
|
log_transfer_status |
String |
Definition Log transfer status. Range
|
log_transfer_type |
String |
Definition Log transfer type. Range
|
Parameter |
Type |
Description |
---|---|---|
agency_domain_id |
String |
Definition Account ID of the delegator. Range N/A |
agency_domain_name |
String |
Definition Account name of the delegator. Range N/A |
agency_name |
String |
Definition Name of the agency created by the delegator. Range N/A |
agency_project_id |
String |
Definition Project ID of the delegator. Range N/A |
be_agency_domain_id |
String |
Definition Account ID of the delegated party (ID of the account that created the log transfer task). Range N/A |
be_agency_project_id |
String |
Definition Project ID of the delegated party (ID of the project for which the transfer task is created). Range N/A |
Parameter |
Type |
Description |
---|---|---|
obs_period |
Integer |
Definition Time for transferring logs to OBS. This parameter is returned when the transfer destination is OBS. Range 1, 2, 3, 5, 6, 2, 30 |
obs_period_unit |
String |
Definition Time unit for transferring data to OBS. This parameter is returned when the transfer destination is OBS. Range
|
obs_bucket_name |
String |
Definition Name of the OBS bucket to which logs are transferred. This parameter is returned when the transfer destination is OBS. Range N/A |
obs_encrypted_id |
String |
Definition KMS key ID of the OBS bucket to which logs are transferred. This parameter is returned when logs are transferred to an encrypted OBS bucket. Range N/A |
obs_dir_pre_fix_name |
String |
Definition Custom transfer path to which logs are transferred to OBS. This parameter is returned when the transfer destination is OBS. Logs will be transferred to this custom path to separate log files from different log streams. Range N/A |
obs_prefix_name |
String |
Definition File name prefix of the log files transferred to an OBS bucket. This parameter is returned when the transfer destination is OBS. Range N/A |
obs_time_zone |
String |
Definition Time zone for an OBS transfer task. For details, see Time Zone List for OBS Transfer. Range N/A |
obs_time_zone_id |
String |
Definition Time zone ID for an OBS transfer task. For details, see Time Zone List for OBS Transfer. Range N/A |
dis_id |
String |
Definition ID of the DIS transfer channel to which logs are transferred. This parameter is returned when logs are transferred to DIS. Range N/A |
dis_name |
String |
Definition Name of the DIS transfer channel to which logs are transferred. This parameter is returned when logs are transferred to DIS. Range N/A |
kafka_id |
String |
Definition Kafka ID for transferring logs to DMS. This parameter is returned when logs are transferred to DMS. Before creating a DMS transfer task, register your Kafka instance with Kafka ID and Kafka topic first. For details, see Registering a DMS Kafka Instance. Range N/A |
kafka_topic |
String |
Definition Kafka topic for transferring logs to DMS. This parameter is returned when logs are transferred to DMS. Before creating a DMS transfer task, register your Kafka instance with Kafka ID and Kafka topic first. For details, see Registering a DMS Kafka Instance. Range N/A |
obs_transfer_path |
String |
Definition OBS bucket path, which is the log transfer destination. Range N/A |
obs_encrypted_enable |
Boolean |
Definition Whether OBS bucket encryption is enabled. Range
|
tags |
Array of strings |
Definition Whether filtering by tag fields is enabled. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition Error code. For details, see Error Codes. Range N/A |
error_msg |
String |
Definition Error message. Range N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Definition Error code. For details, see Error Codes. Range N/A |
error_msg |
String |
Definition Error message. Range N/A |
Example Requests
Delete a log transfer task based on its ID.
DELETE https://{endpoint}/v2/{project_id}/transfers /v2/{project_id}/transfers?log_transfer_id=cfc43c45-9edc-4a03-8578-0eb00cxxxxxx
Example Responses
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" : { "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", "dis_id" : "xxxxx", "dis_name" : "xxxxxx", "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.0405", "error_msg" : "The log transfer does not existed" }
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
See Error 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