GetReportTemplate - 获取合规报告模版详情

更新时间:
复制为 MD 格式

获取合规报告模版详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

ReportTemplateId

string

报告模版 Id

crt-xxx

返回参数

名称

类型

描述

示例值

object

ReportTemplate

object

报告模版

ReportTemplateId

string

报告模版 Id

crt-xxx

ReportTemplateName

string

报告模版名称

test-name

SubscriptionFrequency

string

报告订阅频率。如果此字段非空,则为订阅通知触发的 Quartz 格式的 Cron 表达式。

格式为:秒 分 时 日 月 周。以下是常用的 Cron 表达式示例:

  • 每天 0 点执行:0 0 0 * * ?

  • 每周一 15 点 30 执行:0 30 15 ? * MON

  • 每月 1 号 2 点执行:0 0 2 1 * ?

其中:

  • "*"表示任意值

  • ? 用于日和周字段,表示不指定具体值

  • MON 表示星期一

说明

触发时间为 UTC+8,可自行根据时区转换 cron 表达式的设置。

说明

只能保证尽量按照 cron 表达式时间进行触发,可能由于报告生产状态有所延迟。cron 表达式会限制同一模版每天最多触发一次通知。

说明

除了用 MON 表示星期一以外,也可以用数字。不过需要注意,在 Quartz 框架中: 1 代表星期日(Sunday);2 代表星期一(Monday);3 代表星期二(Tuesday);4 代表星期三(Wednesday);5 代表星期四(Thursday);6 代表星期五(Friday);7 代表星期六(Saturday)

0 0 0 * * ?

ReportTemplateDescription

string

报告模版描述

test-description

ReportGranularity

string

报告聚合粒度

AllInOne

ReportFileFormats

string

报告格式

excel

ReportLanguage

string

报告语言。支持 zh-CN、en-US。空值默认 en-US。

en-US

ReportScope

array<object>

报告范围数组,用于选定审计报告中包含的规则范围。数组中每个 ReportScope 之间是或逻辑,也就是加法逻辑。

说明

如数组大小为 2,第一个 ReportScope 指定规则 In cr-1,第二个 ReportScope 指定规则 In cr-2,则此报告圈定的规则范围为 cr-1 和 cr-2。

object

报告范围

Key

string

报告范围的键,当前支持:

  • AggregatorId

  • CompliancePackId

  • RuleId

RuleId

Value

string

报告范围的值。多个同类项,如多个 规则 Id 支持用英文半角逗号(,)分隔。

cr-1,cr-2

MatchType

string

匹配逻辑,当前仅支持 In。

In

RequestId

string

请求 ID。

A7A0FFF8-0B44-40C6-8BBF-3A185EFDF3F7

示例

正常返回示例

JSON格式

{
  "ReportTemplate": {
    "ReportTemplateId": "crt-xxx",
    "ReportTemplateName": "test-name",
    "SubscriptionFrequency": "0 0 0 * * ?",
    "ReportTemplateDescription": "test-description",
    "ReportGranularity": "AllInOne",
    "ReportFileFormats": "excel",
    "ReportLanguage": "en-US",
    "ReportScope": [
      {
        "Key": "RuleId",
        "Value": "cr-1,cr-2",
        "MatchType": "In"
      }
    ]
  },
  "RequestId": "A7A0FFF8-0B44-40C6-8BBF-3A185EFDF3F7"
}

错误码

HTTP status code

错误码

错误信息

描述

400 ReportTemplateNotExist Report template does not exist or invalid. 报告模版不存在,请检查输入的ReportTemplateId
503 ServiceUnavailable The request has failed due to a temporary failure of the server. 服务不可用。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情