托管 Prometheus
参数 | 类型 | 是否必选 | 示例值 | 描述 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Action | String | 是 | CreateRuleFile | 接口名称。当前 API 的名称为 CreateRuleFile。 |
Version | String | 是 | 2021-03-03 | 接口版本。当前 API 的版本为 2021-03-03。 |
WorkspaceId | String | 是 | e28ae750-bbb8-4ff4-abf4*** | 工作区 ID。 |
Name | String | 是 | test | 规则文件名称:
|
Description | String | 否 | 这是一段描述 | 规则文件描述信息,长度限制为 0~200 个字符。 说明 一个英文、一个中文、一个符号都定义为一个字符。 |
Content | String | 是 | {"groups": [{"name": "my_first_recording_rule", "rules": [{"expr": "up", "record": "up"}], "interval": "30s"}]} | 规则文件内容,YAML 格式,内容长度如下:
|
参数 | 类型 | 示例值 | 描述 |
参数 | 类型 | 示例值 | 描述 |
Id | String | e28ae750-bbb8-4ff4-abf4*** | RecordingRule 规则文件 ID。 |
HTTP 状态码 | 错误码 | 错误信息 | 说明 |
HTTP 状态码 | 错误码 | 错误信息 | 说明 |
400 | QuotaExceeded.RuleGroupCount | Rule Group count has exceeded the quota. | 创建 rulefile 个数达到上限。 |
400 | InvalidParameter.{{parameter}} | The specified parameter {{parameter}} is invalid. | 输入不合法,如工作区名称不合法等。 |
400 | MissingParameter.{{parameter}} | The required parameter {{parameter}} is missing. | 缺少必要的参数。 |
403 | ProductUnsubscribed | You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service | 当前账号未订阅 VMP 服务。 |
403 | OperationDenied.Create | Operation is denied because RuleFile cannot be created in Workspace`s current status. | 当前工作区状态下无法创建 rulefile。 |
404 | NotFound.Workspace | The specified Workspace {{id}} is not found. | 未找到相应 id 的工作区。 |
409 | Conflict.Name | The specified name conflicts with existing {{resource}}. | 指定的名称与已有资源重复。 |