A project is a resource management unit in Simple Log Service. It is the basic unit for resource isolation and access control, and serves as the entry point for accessing Simple Log Service resources.
What is a project
A project is a resource management unit in Simple Log Service that is used for resource isolation and access control.
A project can contain resources such as Logstores, MetricStores, and machine groups, and serves as the entry point for accessing Simple Log Service resources. We recommend that you use different projects to manage data from different applications, products, or environments for the following reasons:
Organize and manage different Logstores or MetricStores: You can use projects to classify and manage logs from different applications, products, or environments. This helps with subsequent consumption, export, or analysis.
Isolate access control: You can grant Resource Access Management (RAM) users permissions to perform operations on specific projects.
Provide endpoints for Simple Log Service resources: Simple Log Service provides an independent endpoint for each project. This endpoint lets you write, read, and manage logs over the network. For more information about endpoints, see Service endpoints.
Create a project
You can create a project to manage all logs and related log sources for an application.
Console
Log on to the Simple Log Service console, navigate to the Projects section, and click Create Project.
Configure the project.
Region: Select an Alibaba Cloud region based on the location of your log sources and other factors. After a project is created, its region cannot be changed. Simple Log Service does not support cross-region project migration. If you want to collect logs from ECS instances, select the same region as the ECS instances. This lets you collect logs over the Alibaba Cloud internal network and accelerates log collection.
Project Name: The name of the project. The name must be globally unique within Alibaba Cloud. After a project is created, its name cannot be changed.
Leave the other parameters at their default values.
API
Enable project deletion protection
Enable the recycle bin feature for projects that contain important data to prevent accidental deletion. When this feature is enabled, deleted projects are moved to the recycle bin. Projects in the recycle bin are in a silent state and do not support read or write operations. If you find that a project is still needed after it has been moved to the recycle bin, you can quickly restore it. You are charged only for the data storage of projects in the recycle bin.
A project is retained in the recycle bin for 7 days by default and is automatically deleted after the retention period ends.
Console
Enable the recycle bin feature
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the project details page, go to the Basic Information tab in the Project Overview section. In the Project Recycle Bin section, check the status. If the recycle bin feature is not enabled, click Enable.
API
Modify the recycleBinEnabled parameter in the UpdateProject operation.
Delete and restore project resources
When you delete a project, the data in its Logstores is permanently deleted. Before you delete a project, make sure that the data in resources such as Logstores, MetricStores, and EventStores is no longer needed or has been backed up.
You are charged for storage and other resources on the day that you delete a project. For more information about how to stop billing, see How do I disable Simple Log Service and stop billing?. Billing for Simple Log Service stops on the third day after you delete the project.
Console
Clear resources before deletion
No linked instances:
When you enable the log analysis feature for Alibaba Cloud services such as elastic computing, storage, security, and databases, a corresponding project and Logstore are automatically created in the Simple Log Service console. If you no longer need the logs from an Alibaba Cloud service, you must disable the log analysis feature for that service in the console of that service. Ensure that the project is not associated with other Alibaba Cloud services.
No billing dependencies: If the project is associated with paid resources, such as storage plans or provisioned instances, you must first release these resources or unsubscribe from the plans.
Steps to delete a project
Back up important data (Optional)
Back up Logstore data: If the project contains log data that you need to retain, you must first export the data using the Download logs feature.
Back up configuration information: Record key configurations, such as the project name, storage capacity, and access control settings, to prevent information loss after deletion.
Delete the project
In the project list, find the project you want to delete and click Delete in the Actions column.
In the Delete Project dialog box, you can enter the project name, select a reason for deletion, and click OK.
WarningAfter a project is deleted, all log data and configuration information in the project are deleted and cannot be restored. Proceed with caution to prevent data loss.
Confirm the operation: Read the prompt and enter the project name to confirm the deletion.
If the recycle bin feature is enabled for a project, you can find the deleted project on the Recycle Bin tab in the project list. By default, a project is retained in the recycle bin for 7 days, during which you can restore or permanently delete it.
API
Manage resource quotas
If your resource quotas are insufficient, you can request an increase in the quotas for various project metrics, such as the maximum number of Logstores, shards, Logtail configurations, and machine groups.
You can create a maximum of 150 projects under an Alibaba Cloud account. If you require a higher quota, you can submit a ticket to request an increase.
Console
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the project details page, go to the Basic Information tab in the Project Overview section. In the Resource Quota section, click Manage. In the Resource Quota panel, adjust the quota for the desired resource and click Save to submit the application. The modification will take effect in about one hour.
Accelerate cross-region log transfer
To transfer logs over a long distance, such as from a region outside the Chinese mainland to a region in the Chinese mainland, you can enable the transfer acceleration feature. This feature uses globally distributed data centers and smart routing to direct user requests to the nearest Simple Log Service access point. This architecture greatly improves access speed using optimized networks and protocols. You are charged for transfer acceleration based on the amount of data transferred.
Console
Enable transfer acceleration
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the Project Details page, go to the Project Overview section and click the Access Domain Names tab. In the Acceleration Endpoint section, click Enable. Read the message in the dialog box and click Confirm.
After you enable transfer acceleration, the transmission speed is improved when you use Logtail to collect logs or execute data transformation jobs.
API
First, call the PutProjectTransferAcceleration operation.
To use this feature, you must set the
endpoint
parameter to an acceleration endpoint. Acceleration endpoints support API access only over HTTP and HTTPS. They do not support other protocols, such as Kafka or gRPC. In scenarios where transfer acceleration is not required, we recommend that you use service endpoints to reduce transmission costs./** * This example obtains the AccessKey ID and AccessKey secret from environment variables. */String accessId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"); String accessKey = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"); /** * The service endpoint of Simple Log Service. Use an acceleration endpoint. */String endpoint = "log-global.aliyuncs.com"; /** * Create a Simple Log Service client. */static Client client = new Client(host, accessId, accessKey);
Manage resource groups
To group projects, you can use tags or resource groups. The main difference is the scope of grouping. Tags are used for grouping and management at the project level. Resource groups are a mechanism for grouping and managing resources across an entire Alibaba Cloud account.
Set resource groups
A project can belong to only one resource group.
Console
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the project details page, go to the Project Overview page. In the Resource Group Information section, move the pointer over the resource group ID, click Modify, and then select a new resource group.
API
Set tags
Console
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the project details page, on the Project Overview page, click Edit in the Tags section. In the Edit Tag panel, configure the tags.
API
View domain names and configure a custom domain name
You can view domain name information or replace a public domain name with a custom domain name. After you configure a custom domain name, you can use it as the endpoint in API calls.
Console
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the project details page, go to the Project Overview page. You can view the domain name information for the current project in the Access Domain Names section.
In the Basic Information section on the Project Overview page, hover over the custom domain name and click Set. In the Set Custom Domain Name panel, configure a domain name and click Bind. For more information, see Register a domain name.
In the Alibaba Cloud DNS console, add a CNAME record to bind the domain name. Set Record Value to the Public Domain Name from the Access Domain Names section on the project details page. For more information, see CNAME record.
API
Monitor and maintain project resources
You can use the service log feature to obtain operation logs for actions such as create, modify, update, and delete, task execution logs for jobs such as scheduled SQL, data import, and data shipping for resources in a project, consumption latency logs for consumer groups in a Logstore, and the error, heartbeat, and statistics logs for Logtail.
Console
Log on to the Simple Log Service console. In the Projects section, click the name of the destination project.
On the Service Log page of the project, click Enable Detailed Logs. In the Modify Service Log Configuration panel, select the service logs to enable and the destination project.
Detailed logs: Provides complete operation logs. This is a pay-as-you-go feature.
Important logs: Provides metering logs, consumer group latency logs, and Logtail heartbeat logs. This feature is free of charge.
Task execution logs: Provides the execution logs of data import, scheduled SQL, and data shipping jobs. This feature is free of charge.
Log storage location: Select an existing project or automatically create a new project to store the logs.
More information
To store different types of data in a project, you must create different types of stores. For more information, see Manage Stores.