Creates a compliance report template for the current UID.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:CreateReportTemplate |
create |
*ReportTemplate
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ReportTemplateName |
string |
Yes |
The name of the report template. |
test-report-name |
| ReportTemplateDescription |
string |
No |
The description of the report template. |
test-report-description |
| ReportGranularity |
string |
No |
The aggregation granularity of the report. From the management account perspective, the following values are supported: AllInOne (aggregates all accounts into a single report), GroupByAggregator (aggregates by account group and generates a compressed file), and GroupByAccount (generates a separate report for each account and generates a compressed file). From the member accounts perspective, only GroupByAccount is supported. This parameter is effectively required. If omitted, the server returns Invalid.ReportGranularity.Value (400) and does not use a default value. Valid values:
|
GroupByAccount |
| ReportFileFormats |
string |
No |
The format of the report. Currently, only excel is supported. |
excel |
| ReportLanguage |
string |
No |
The language of the report. Valid values: zh-CN and en-US. Default value: en-US. |
zh-CN |
| SubscriptionFrequency |
string |
No |
The subscription frequency of the report. If this field is not empty, it specifies a Quartz-format cron expression that triggers subscription notifications. The format is: second minute hour day month week. The following are common cron expression examples:
Where:
Note
The trigger time is in UTC+8. Convert the cron expression settings based on your time zone. Note
The system attempts to trigger notifications based on the cron expression time, but delays may occur due to report generation status. The cron expression limits notifications to at most once per day for the same template. Note
In addition to using MON to represent Monday, you can also use numbers. Note that in the Quartz framework: 1 represents Sunday, 2 represents Monday, 3 represents Tuesday, 4 represents Wednesday, 5 represents Thursday, 6 represents Friday, and 7 represents Saturday. |
0 0 9 * * ? |
| ReportScope |
array<object> |
No |
The report scope array that specifies the rule scope included in the audit report. The ReportScope items in the array follow OR logic, which means they are additive. 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, the rule scope of this report includes both cr-1 and cr-2. |
|
|
object |
No |
The report scope. |
||
| Key |
string |
No |
The key of the report scope. Valid values:
Valid values:
|
RuleId |
| Value |
string |
No |
The value of the report scope. Multiple items of the same type, such as multiple rule IDs, can be separated by commas (,). |
cr-1,cr-2 |
| MatchType |
string |
No |
The matching logic. Currently, only In is supported. |
In |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| ReportTemplateId |
string |
The ID of the report template. |
crt-xxx |
| RequestId |
string |
The 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.