Performs initialization to create project-related alert resources, including the internal-alert-history Logstore and the Alert History Statistics dashboard. All alert rules that are created for the same project are stored in the same internal-alert-history Logstore.


  • You need to call the InitProjectAlertResource operation only once for a project.
  • The project to which current alert rules belong is used.
  • The internal-alert-history Logstore is created. The Logstore is free of charge.
  • The Alert History Statistics dashboard is created.

Request parameters

Parameter Type Required Example Description
Action String Yes InitProjectAlertResource

The operation that you want to perform. Set the value to InitProjectAlertResource.

ProjectName String Yes test-project

The name of the project. The name must meet the following requirements:

  • The name must be globally unique.
  • The name can contain only lowercase letters, digits, and hyphens (-).
  • The name must start and end with a lowercase letter or a digit.
  • The name must be 3 to 63 characters in length.
Region String Yes cn-hangzhou

The region of the Log Service endpoint. Examples: cn-hangzhou and cn-shanghai.

Response parameters

Parameter Type Example Description
Code String 200

The HTTP status code. The HTTP status code 200 indicates that the request is successful.

Message String Success

The message that is returned. If the request is successful, a value of successful is returned. If the request fails, an error message is returned.

RequestId String D39895CE-1769-5485-BEF6-6B5A9DDEE75D

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

  • true: indicates that the request is successful.
  • false: indicates that the request failed.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.