You need to enable JavaScript to run this app.
文档中心
配置审计

配置审计

复制全文
下载 pdf
合规包模版
CreateConformancePackTemplate - 创建合规包模板
复制全文
下载 pdf
CreateConformancePackTemplate - 创建合规包模板

创建当前账号的合规包模板,用于沉淀一组规则模板、风险等级和标签,后续可基于该模板创建合规包。

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。

参数
类型
是否必填
示例值
描述
Action
String
是

CreateConformancePackTemplate

要执行的操作,取值:CreateConformancePackTemplate。

Version
String
是

2025-01-01

API的版本,取值:2025-01-01。

Name
String
是

example-name

合规包或模板名称

Description
String
否

example description

描述

RiskLevel
String
否

Low

风险等级,可选值:Low,Medium,High

Labels
Array of String
否

["Law"]

合规包模板标签;当前仅支持单个标签,可选值:Law,BestPractice

RuleTemplates
Array of String
否

["rt-123456"]

合规包模板包含的规则模板 ID 列表

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构。

参数
类型
示例值
描述
ConformancePackTemplateId
String

cpt-123456

合规包模板 ID

请求示例

POST /?Action=CreateConformancePackTemplate&Version=2025-01-01 HTTP/1.1
Host: config.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20260518T164649Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260518/cn-beijing/config/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "Name": "example-name",
  "RiskLevel": "Low"
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202605181646490000000000000000",
        "Action": "CreateConformancePackTemplate",
        "Version": "2025-01-01",
        "Service": "config",
        "Region": "cn-beijing"
    },
    "Result": {
        "ConformancePackTemplateId": "cpt-123456"
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
ConcurrentException

The operations frequency exceeds limit, please retry later.

400
Conflict

The request conflict with current state.

400
InvalidParameter

The specified parameter %s is invalid.

400
MissingParameter

The required parameter is missing.

400
QuotaExceeded.ConformancePackTemplate

You've reached the limit on the number of conformance pack templates, please submit ticket to request an increase in quota.

403
AccessDenied

You are not authorized to do this action.

429
TooFrequent

Too many requests, please retry later.

500
InternalError

The request has failed due to an unknown error.

最近更新时间:2026.07.10 14:52:19
这个页面对您有帮助吗?
有用
有用
无用
无用