Create a compliance report template for the current UID.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ReportTemplateName |
string |
Yes |
Report template name |
test-report-name |
| ReportTemplateDescription |
string |
No |
Report template description |
test-report-description |
| ReportGranularity |
string |
No |
Report aggregation granularity. Supported for management accounts:
Member accounts only support GroupByAccount. Valid values:
|
GroupByAccount |
| ReportFileFormats |
string |
No |
Report format. Currently, only Excel is supported. |
excel |
| ReportLanguage |
string |
No |
Report language. Supports zh-CN and en-US. If empty, the default is en-US. |
zh-CN |
| SubscriptionFrequency |
string |
No |
Report subscription frequency. If this field is not empty, it is a Quartz-format Cron expression that triggers subscription notifications. Format: second minute hour day month week. The following are common Cron expression examples:
Where:
Note
The trigger time is UTC+8. Adjust the Cron expression settings based on your time zone. Note
We try to trigger notifications according to the Cron expression time, but there might be delays due to report generation status. A Cron expression limits the same template to trigger notifications at most once per day. Note 1 represents Sunday; 2 represents Monday; 3 represents Tuesday; 4 represents Wednesday; 5 represents Thursday; 6 represents Friday; 7 represents Saturday |
0 0 9 * * ? |
| ReportScope |
array<object> |
No |
An array of report scopes, used to select the range of rules included in the audit report. The logic between each ReportScope in the array is OR, which means additive logic. Note
For example, if the array size is 2, the first ReportScope specifies rule In cr-1, and the second ReportScope specifies rule In cr-2, then the rule scope defined by this report is cr-1 and cr-2. |
|
|
object |
No |
Report scope |
||
| Key |
string |
No |
The key for the report scope. Currently supports:
Valid values:
|
RuleId |
| Value |
string |
No |
The value for the report scope. Multiple items of the same type, such as multiple Rule IDs, can be separated by English commas (,). |
cr-1,cr-2 |
| MatchType |
string |
No |
Matching logic. Currently, only In is supported. |
In |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Return result |
||
| ReportTemplateId |
string |
Report template ID |
crt-xxx |
| RequestId |
string |
Request ID. |
A7A0FFF8-0B44-40C6-8BBF-3A185EFDFXXX |
Examples
Success response
JSON format
{
"ReportTemplateId": "crt-xxx",
"RequestId": "A7A0FFF8-0B44-40C6-8BBF-3A185EFDFXXX"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.