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.
Description
- 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:
|
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.
|
Examples
Sample requests
http(s)://sls.aliyuncs.com/?Action=InitProjectAlertResource
&ProjectName=test-project
&Region=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
<Message>Success</Message>
<RequestId>D39895CE-1769-5485-BEF6-6B5A9DDEE75D</RequestId>
<Code>200</Code>
<Success>true</Success>
JSON
format
null
Error codes
For a list of error codes, visit the API Error Center.