You need to enable JavaScript to run this app.
导航

ListRuleFiles

最近更新时间2024.04.19 11:53:53

首次发布时间2023.06.30 15:23:33

获取 RecordingRule 规则文件列表。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com/?Action=ListRuleFiles&Version=2021-03-03

请求参数

参数名称类型是否必选示例值描述
ActionStringListRuleFiles公共参数,本接口值:ListRuleFiles。
VersionString2021-03-03公共参数,本接口值:2021-03-03。
PageNumberInteger1当前页数,最小值或默认值均为 1。

PageSize

Integer

10

单页数量:

  • 取值范围为 0~100。
  • 默认值为 10。
FilterObject RuleFileFilter-规则文件过滤条件。

RuleFileFilter

参数名称类型是否必选示例值描述
WorkspaceIdStringe28ae750-bbb8-4ff4-abf4-1e0e0f88808c按工作区 ID 过滤,精确查询。
IdsArray of String["1c3f6e48-b5e1-4832-8564-10eaac12a22c"]按规则文件 ID 过滤,精确查询。
NameStringtest按规则文件名称过滤,模糊搜索。

Status

Array of String

["Running"]

按规则文件状态过滤,精确查询。取值:

  • Creating:创建中
  • Running:运行中
  • Updating:更新中
  • OverdueShutted:欠费关停
  • Resuming:恢复中

请求示例

POST /?Action=ListRuleFiles&Version=2021-03-03
Content-Type:application/json
{
    "PageNumber": 1,
    "PageSize": 10,
    "Filter": {
        "WorkspaceId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",
        "Ids":  ["1c3f6e48-b5e1-4832-8564-10eaac12a22c"],
        "Name": "test",
        "Status": ["Running"]
    }
}

返回参数

参数名称类型示例值描述
TotalInteger100规则文件总数。
ItemsArray of RuleFile-规则文件列表。

RuleFile

参数名称类型示例值描述
IdString1c3f6e48-b5e1-4832-8564-10eaac12a22c规则文件 ID。
CreateTimeString2022-01-01T00:00:00Z规则文件创建时间,RFC3339 格式。
LastUpdateTimeString2022-01-01T00:00:00Z规则文件最近更新时间,RFC3339 格式。
NameStringtest规则文件名称。
DescriptionString这是一段描述规则文件描述信息。

Status

String

Running

规则文件状态:

  • Creating:创建中
  • Running:运行中
  • Updating:更新中
  • OverdueShutted:欠费关停
  • Resuming:恢复中
RuleCountInteger2规则文件中的规则数。

返回示例

HTTP/1.1 200 OK
Content-Type:application/json
{
    "ResponseMetadata": {
        "RequestId": "202211302208xxxx",
        "Action": "ListRuleFiles",
        "Version": "2021-03-03",
        "Service": "vmp",
        "Region": "cn-beijing"
    },
    "Result": {
        "Total": 100,
        "Items": [
            {
                "Id": " 1c3f6e48-b5e1-4832-8564-10eaac12a22c",
                "CreateTime": "2022-01-01T00:00:00Z",
                "LastUpdateTime": "2022-01-01T00:00:00Z",
                "Name": "test",
                "Description": "这是一段描述",
                "Status": "Running",
                "RuleCount": 2
            }
        ]
    }
}

错误码

本接口错误码如下表所示,公共错误码请参见 公共错误码

HTTP 状态码错误码错误信息描述
404NotFound.IdThe specified Workspace {{id}} is not found.未找到指定的工作区。