Deleting a Log Stream
Function
This API is used to delete a specified log stream from a specified log group. If a log transfer task has been associated with the log stream, delete the task first.
URI
DELETE /v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
[Project ]ID. For details about how to obtain a project ID, see Obtaining the Account Tenant ID, Log Group ID, and Log Stream ID. Default: None Minimum: 32 Maximum: 32 |
log_group_id |
Yes |
String |
ID of the log group whose log streams will be deleted. Default: None Minimum: 36 Maximum: 36 |
log_stream_id |
Yes |
String |
ID of the log stream to be deleted. For details about how to obtain the log stream ID, see Obtaining the Account ID, Project ID, Log Group ID, and Log Stream ID. Default: None Minimum: 36 Maximum: 36 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. Default: None Minimum: 1000 Maximum: 2000 |
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=UTF-8. Default: None Minimum: 30 Maximum: 30 |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
DELETE https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id} /v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}
Example Responses
Status code: 400
BadRequest. Invalid request. Modify the request based on the description in error_msg before a retry.
{ "error_code" : "LTS.0208", "error_msg" : "The log stream does not existed" }
Status code: 401
AuthFailed. Authentication failed. Check the token and try again.
{ "error_code" : "LTS.0003", "error_msg" : "Invalid token" }
Status code: 403
Forbidden.The request is rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.
{ "error_code" : "LTS.0001", "error_msg" : "Invalid projectId" }
Status code: 500
InternalServerError. The server has received the request but encountered an internal error.
{ "error_code" : "LTS.0203", "error_msg" : "Failed to delete Log stream" }
Status code: 503
ServiceUnavailable. The requested service is unavailable.
{ "error_code" : "LTS.0403", "error_msg" : "ServiceUnavailable" }
Status Codes
Status Code |
Description |
---|---|
204 |
The request is successful and the log stream has been deleted. |
400 |
BadRequest. Invalid request. Modify the request based on the description in error_msg before a retry. |
401 |
AuthFailed. Authentication failed. Check the token and try again. |
403 |
Forbidden.The request is rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications. |
500 |
InternalServerError. The server has received the request but encountered an internal error. |
503 |
ServiceUnavailable. The requested service is unavailable. |
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