After Simple Log Service is activated, you cannot deactivate it. If you no longer require Simple Log Service, you can delete all projects. You are not being billed for Simple Log Service immediately after the delete operation.
Overview
When you create a Logstore, two shards are automatically created. 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 no longer need a Logstore to store logs, we recommend that you delete the Logstore at the earliest opportunity to avoid additional fees. For more information, see Delete a Logstore.
You can delete logs only by changing the log retention period of a Logstore. When the retention period of a log ends, the log is automatically deleted. For more information, see How do I delete logs? If you want to reduce storage fees, you can specify a short log retention period. If you no longer require the existing logs, you can delete the related project or Logstore. For more information, see Delete projects or Logstores.
If you delete a project, you are still charged for data storage on the day that you delete the project but you are not charged from the following day. In this case, from the third day after you delete the project, you no longer receive a Simple Log Service bill.
Delete projects or 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.
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 Alibaba Cloud service logs.
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.
You can retain projects and delete Logstores. For more information, see Delete a Logstore.
You can delete entire projects. For more information, see Delete a project.
Log Audit Service logs
Logs are deleted when the retention period ends. If you no longer need to collect logs from cloud services but you want to temporarily retain the collected logs, you can disable the log collection feature. For more information, see Disable log collection.
You can clear and delete all Simple Log Service resources that are related to Log Audit Service. The resources include projects, Logstores, dashboards, and alerts. For more information, see Delete audit resources.
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 the 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
You can retain projects and delete Logstores. For more information, see Delete a Logstore.
You can delete entire projects. For more information, see Delete a project.
References
You can check the storage usage of a project or Logstore. For more information, 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 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.
You can call an API operation to delete a project or Logstore. For more information, see DeleteProject and DeleteLogStore.