最近更新时间:2024.04.19 11:53:53
首次发布时间:2023.06.30 15:23:34
更新 RecordingRule 规则文件。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateRuleFile | 公共参数,本接口值:UpdateRuleFile。 |
Version | String | 是 | 2021-03-03 | 公共参数,本接口值:2021-03-03。 |
Id | String | 否 | 1c3f6e48-b5e1-4832-8564-10eaac12a22c | 规则文件 ID。 |
WorkspaceId | String | 否 | e28ae750-bbb8-4ff4-abf4-1e0e0f88808c | 工作区 ID,必须和 Name 同时配置。 |
Name | String | 否 | test | 规则文件名称,必须和 WorkspaceId 同时配置。 |
Description | String | 否 | 这是一段描述 | 规则文件描述信息。 |
Content | String | 否 |
| 规则文件内容。 |
说明
Id
和 WorkspaceId + Name
不能同时配置,但至少需要选择一种:
Id
直接指定需要更新的规则文件。WorkspaceId + Name
在工作区内,通过名称指定需要更新的规则文件。POST /?Action=UpdateRuleFile&Version=2021-03-03 Content-Type:application/json { "Id": "1c3f6e48-b5e1-4832-8564-10eaac12a22c", "Description": "这是一段描述", "Content": "xxxxxxxx" }
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | 1c3f6e48-b5e1-4832-8564-10eaac12a22c | 规则文件 ID。 |
HTTP/1.1 200 OK Content-Type:application/json { "ResponseMetadata": { "RequestId": "202211302208xxxx", "Action": "UpdateRuleFile", "Version": "2021-03-03", "Service": "vmp", "Region": "cn-beijing" }, "Result": { "Id": " 1c3f6e48-b5e1-4832-8564-10eaac12a22c" } }
本接口错误码如下表所示,公共错误码请参见 公共错误码。
HTTP 状态码 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | QuotaExceeded.RuleGroupCount | Rule Group count has exceeded the quota. | 创建 RuleFile 个数达到上限。产品限制说明,请参见 使用限制。 |
403 | OperationDenied.Update | Operation is denied because RuleFile cannot be updated in Workspace`s current status. | 当前工作区状态下无法更新规则文件。 |
404 | NotFound.Id | The specified RuleFile %s is not found./The specified Workspace {{id}} is not found. | 未找到指定规则文件/未找到指定的工作区。 |
404 | NotFound.Name | The specified RuleFile {{name}} is not found in Workspace {{workspaceID}}. | 在工作区内未找到制定的规则文件。 |