A project is a resource management unit in Simple Log Service. It is the primary boundary for resource isolation and access control. It is also the entry point for accessing Simple Log Service resources.
Terms
A project is a resource management unit in Simple Log Service that is used for resource isolation and control.
A project can contain resources such as Logstores, Metricstores, and machine groups. It is also the entry point for accessing Simple Log Service resources. We recommend that you use different projects to manage the data in different applications, services, or projects. The following table describes the details.
Organize and manage different Logstores or Metricstores: In practice, you may need to use Simple Log Service to collect and store logs from different projects, services, or environments. You can specify different projects to manage the log data. This facilitates the consumption, export, and analysis of the log data.
Isolate access control: You can grant Resource Access Management (RAM) users the permissions to perform operations on specific projects.
Provide an access entry point for Simple Log Service resources: Simple Log Service configures an independent access entry point for each project. You can use the endpoint of a project to read, write, and manage log data. For more information about endpoints, see Endpoints.
Create a project
You can create a project to manage all logs and related log sources of an application.
Console
Log on to the Simple Log Service console. In the Projects section, click Create Project.
Configure the project:
Region: Select an appropriate Alibaba Cloud region based on your log sources. After you create a project, you cannot change the region where the project resides or migrate the project to another region. If you want to collect logs from an Elastic Compute Service (ECS) instance, we recommend that you select the region where the instance resides. This way, Simple Log Service can use the internal network of Alibaba Cloud to accelerate log collection.
Project Name: The name must be globally unique within Alibaba Cloud and cannot be changed after the project is created.
You can keep the default values for other configurations.
API
Enable project deletion protection
We recommend that you enable the recycle bin feature for projects that contain important data to prevent accidental deletion. After this feature is enabled, deleted projects are moved to the recycle bin and enter a silent state where read and write operations are not supported. If you find that a project in the recycle bin is still associated with business operations, you can quickly restore it. Only data storage fees are charged for projects in the recycle bin.
Projects in the recycle bin are retained for 7 days by default and are automatically deleted after the retention period expires.
Console
Enable the recycle bin feature
Log on to the Simple Log Service console. In the Projects section, click the target project.
On the Project page, check the status in Project Overview - Basic Information - Project Recycle Bin. If the feature is not enabled, click Enable.
API
Modify the recycleBinEnabled parameter in the UpdateProject - Update a project API operation.
Delete and restore project resources
If you delete a project, the data of the project may be lost. To prevent data loss, make sure that you no longer use the data of the project, such as Logstores, Metricstores, and Eventstores or the data is backed up.
After deleting a project, storage fees apply on that day, but billing stops the next day. From the third day onward, you won't receive a Simple Log Service bill.
Console
Pre-deletion cleanup
No linked instances:
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. If you no longer need the logs from these cloud services, disable the log analysis feature in the respective product consoles. Make sure that the project is not associated with other Alibaba Cloud services.
Billing dependencies: If the project is under a paid plan (such as storage plan or provisioned instance), unsubscribe or release associated resources before deletion.
Deletion process
Back up important data (optional)
Logstore data backup: If the project contains log data that needs to be retained, export it in advance using the download logs feature of Simple Log Service.
Configuration backup: Record key configurations such as project name, storage capacity, and access control to prevent information loss after deletion.
Execute project deletion
In the Projects list, click Delete for the target project.
In the Delete Project panel, enter the project name, select a reason for deletion, and then click OK.
WarningAfter you delete a project, all logs stored in the project and the configurations of the project are deleted and cannot be restored. Proceed with caution.
Confirm the operation: Read the prompt and enter the project name again to confirm.
If the target project has the recycle bin feature enabled, you can view it in the Recycle Bin Projects section of the Projects list. Projects in the recycle bin are retained for 7 days by default, during which time you can choose to restore or permanently delete them.
API
Manage resource quotas
When your resource quotas are insufficient, you can adjust multiple metrics for your project based on actual needs, including maximum Logstores, maximum shards, maximum Logtail configurations, maximum machine groups, and more.
Console
Log on to the Simple Log Service console. In the Projects section, click the target project.
On the Project page, in Project Overview - Basic Information - Resource Quotas, click Manage. In the Resource Quotas panel, adjust the quota for the target resource, and then click Save to submit the request. The modification request takes about 1 hour to complete.
Cross-region log transfer acceleration
If you want to transfer logs over long distances, you can enable the transfer acceleration feature. For example, you can use the transfer acceleration feature to write logs from regions outside the Chinese mainland to regions in the Chinese mainland. Transfer acceleration uses globally distributed cloud data centers and intelligent routing to direct user access to the nearest entry point, greatly improving access speed through optimized networks and protocols. Transfer acceleration is billed based on the actual amount of data transferred.
Console
Enable transfer acceleration
Log on to the Simple Log Service console. In the Projects section, click the target project.
On the Project page, in Project Overview - Endpoint - Acceleration Endpoint, click Enable. Read the prompt in the dialog box, and then click Modify.
After enabling transfer acceleration, you can improve transfer speed when using Logtail for log collection and when executing data transformation tasks.
API
First, use PutProjectTransferAcceleration.
To benefit from acceleration, you must configure the
endpoint
as the acceleration endpoint in subsequent operations. API access to acceleration endpoints is supported only over HTTP or HTTPS. Other protocols such as Kafka and gRPC are not supported. In scenarios where transfer acceleration is not needed, we recommend using regular endpoints to reduce transfer costs./** * In this example, the AccessKey ID and AccessKey secret are obtained from environment variables. */String accessId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"); String accessKey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"); /** * The Simple Log Service endpoint. Specify an acceleration endpoint. */String endpoint = "log-global.aliyuncs.com"; /** * Create a Simple Log Service client. */static Client client = new Client(host, accessId, accessKey);
Resource group management
When you need to manage projects in groups, you can use tags or resource groups to categorize projects. The difference between tags and resource groups is the grouping level. Tags are used for grouping at the project level, while resource groups are a mechanism for grouping resources under an Alibaba Cloud account.
Configure a resource group
A project can belong to only one resource group.
Console
Log on to the Simple Log Service console. In the Projects section, click the target project.
Hover over Resource Group ID in Project Overview - Resource Group Information on the Project page, click Modify, and select a resource group.
API
Manage tag
Console
Log on to the Simple Log Service console. In the Projects section, click the target project.
On the Project page, click Edit in Project Overview - Tags, and configure tags in the Edit Tags panel.
API
Configure a custom domain name
When you need to replace the public endpoint with a custom domain name, you can configure a custom domain name using the following steps. After completion, you can use the custom domain name as the endpoint in API calls.
Console
Log on to the Simple Log Service console. In the Projects section, click the target project.
Hover over Custom Domain Name in Project Overview - Basic Information on the Project page, click Configure. In the Configure Custom Domain Name panel, configure the domain name and then click Bind.
In the Cloud DNS console, create a CNAME record for the domain binding to take effect. For Record Value, enter the Public Endpoint from Project Overview - Basic Information - Endpoints on the Project page. For detailed operations, see CNAME record.
API
Project resource monitoring and operations
If you need to obtain resource operation logs (create, modify, update, delete) and task execution logs (Scheduled SQL, data import, data shipping) for a project, consumer group consumption delay logs for a Logstore, and Logtail error, heartbeat, and statistics logs, you can use the service logs feature.
Console
Log on to the Simple Log Service console. In the Projects section, click the target project.
On the Service Logs page of the Project page, click Enable Detailed Logs. In the Modify Service Log Configuration panel, select the service logs you want to enable and the project where the service logs will be stored.
Detailed Logs: Complete operation logs, billed based on usage.
Important Logs: Metering, consumer group delay, and Logtail heartbeat logs, free of charge.
Job Operational Logs: Running logs of data import, Scheduled SQL, and shipping tasks, free of charge.
Log Storage Location: Select an existing project or automatically create a project for storage.
More information
To store different types of data in a project, you need to create different types of stores. For more information, see Manage stores.