After Simple Log Service is activated, you cannot deactivate it. If you no longer require Simple Log Service, you can delete projects and Logstores. This topic describes how to delete projects and Logstores in Simple Log Service.
Background information
If a Logstore exists, you are charged for active shards regardless of whether the Logstore is used. For more information, see Why am I charged for active shards? If you delete a project, you are still charged for data storage on the day that you delete the project, but no charges are incurred from the following day. As a result, from the third day after you delete the project, you no longer receive a Simple Log Service bill.
If you no longer require the existing logs, see the Delete projects or Logstores section of this topic. If you require the existing logs but you want to reduce storage costs, see How do I delete a specific log from a Logstore? How do I reduce log storage costs? If you want to check the storage usage of a Logstore, see How do I view the storage usage and consumption records of Simple Log Service?
Delete projects and Logstores
After you delete projects or Logstores, all related logs and configurations are deleted and cannot be restored regardless of which deletion method is used. Proceed with caution to avoid data loss. If you cannot delete projects or Logstores by performing the following operations, call the DeleteProject or DeleteLogStore operation to delete the projects or Logstores.
Cloud service logs
When you enable the log analysis feature for Alibaba Cloud services, such as elastic computing, storage, security, and database services, projects and Logstores are automatically created in the Simple Log Service console. For more information, see Enable the log analysis feature. If you no longer require the logs of cloud services, you can perform the following operations:
Disable the log analysis feature in the consoles of the related cloud services.
Delete projects or Logstores in the Simple Log Service console.
If you want to retain projects and delete Logstores, see Delete a Logstore.
If you want to delete entire projects, see Delete a project.
Log Audit Service logs
For more information about Log Audit Service FAQ, see FAQ and troubleshooting.
If you no longer need to collect logs from cloud services but you want to temporarily retain the collected logs, see Disable log collection. Logs are deleted when the retention period ends.
If you want to clear and delete all Simple Log Service resources that are related to Log Audit Service, see Delete audit resources. The resources include projects, Logstores, dashboards, and alerts.
CloudLens service logs
Precautions
To use a CloudLens application, make sure that at least one project exists within your Alibaba Cloud account.
When you enable a CloudLens application, Simple Log Service automatically checks whether a project exists within your Alibaba Cloud account.
Check logic
The first time you enable a CloudLens application, Simple Log Service automatically checks whether a project exists within your Alibaba Cloud account. If no projects exist, Simple Log Service creates a project whose name is in the
aliyun-product-data-<Alibaba Cloud account ID>-cn-heyuan
format in the China (Heyuan) region.After you enable a CloudLens application, Simple Log Service automatically checks whether a project exists within your Alibaba Cloud account. If no projects exist, Simple Log Service does not create a project in the China (Heyuan) region. You can manually create a project. For more information about how to create a project, see Manage a project.
Delete a project
If you want to delete the project whose name is in the
aliyun-product-data-<Alibaba Cloud account ID>-cn-heyuan
format, open Cloud Shell and run the following command. Replace Alibaba Cloud account ID based on your business scenario.aliyunlog log delete_project --project_name=aliyun-product-data-<Alibaba Cloud account ID>-cn-heyuan --region-endpoint=cn-heyuan.log.aliyuncs.com
If you want to delete other projects and Logstores, follow the instructions provided in Manage a Logstore and Manage a project.
Other logs
If you want to retain projects and delete Logstores, see Delete a Logstore. If you want to delete entire projects, see Delete a project.
References
If a project cannot be deleted or Simple Log Service logs are lost, see What do I do if a project cannot be deleted?
To check the storage usage of a project or a Logstore, see How do I view the storage usage and consumption records of Simple Log Service?
New-version resource plans can be used to offset the fees of all billable items of Simple Log Service. A resource plan provides the same resource usage quota for each month within the validity period. If your resource usage exceeds the monthly quota of your resource plan, you are charged for the excess resource usage based on the pay-as-you-go billing method. For more information, see Overview of resource plans.