DescribeBudgetPolicies - 查询预算策略

更新时间:
复制 MD 格式

查询预算策略

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

polardb:DescribeBudgetPolicies

get

*全部资源

*

无 无

请求语法

POST  HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

BudgetPolicyId

string

否

预算策略 ID。

023aacc1effc4b56bb154bfbec6baxxx

PageSize

integer

否

每页记录数,取值范围如下:

  • 30

  • 50

  • 100

默认值为 30。

30

PageNumber

integer

否

页码。

1

GwClusterId

string

是

网关实例 ID。

pg-xxxxxxx

Status

string

否

策略状态,枚举值:

  • Enabled 开启

  • Disenabled 关闭

Enabled

BudgetDimensionType

string

否

策略类型,枚举值:

  • ConsumerGroup 用户组总预算

  • Consumer 用户总预算

ConsumerGroup

BudgetDimensionRefId

string

否

维度对象 ID(当 BudgetDimensionType 为 ConsumerGroup 或 Consumer 时必填)

cg-p3gk2oh55c**

RegionId

string

否

地域 ID。

cn-beijing

ScopeRefName

string

否

预算策略作用范围关联对象的名称。

test-group

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

Id of the request

24A1990B-4F6E-482B-B8CB-75C612******

TotalRecordCount

integer

总记录数。

2

PageRecordCount

integer

本页记录数。

1

PageNumber

integer

页码。

1

PageSize

integer

每页记录数,取值为 30、50 或 100。

默认值为 30。

30

Items

array<object>

预算策略列表

object

预算策略对象

BudgetPolicyId

string

预算策略 ID。

023aacc1effc4b56bb154bfbec6ba9**

GwClusterId

string

网关实例 ID。

pg-xxxxxxxx

Status

string

策略状态,枚举值:

  • Enabled 开启

  • Disenabled 关闭

Enabled

BudgetType

string

预算类型,枚举值:

  • GlobalTotal 全局总预算

  • ConsumerTotal 用户总预算

  • ConsumerGroupTotal 用户组总预算

GlobalTotal

BudgetDimensionType

string

策略类型,枚举值:

  • ConsumerGroup 用户组总预算

  • Consumer 用户总预算

ConsumerGroup

BudgetDimensionRefId

string

维度对象 ID(当 BudgetDimensionType 为 ConsumerGroup 或 Consumer 时必填)

cg-p3gk2oh55c**

ResetDayOfMonth

string

每月重置日(1-28)

2

BudgetPoints

string

预算点数

10000

AlertThresholdPct

string

告警阈值百分比(0-100)

80

UsedPoints

integer

已使用点数

10

GmtCreated

string

创建时间

2025-03-19T14:13:53+08:00

GmtModified

string

更新时间

2025-04-08T10:43:28+08:00

AlertTriggered

boolean

是否触发告警阈值

false

Exceeded

string

是否超出配额

false

示例

正常返回示例

JSON格式

{
  "RequestId": "24A1990B-4F6E-482B-B8CB-75C612******",
  "TotalRecordCount": 2,
  "PageRecordCount": 1,
  "PageNumber": 1,
  "PageSize": 30,
  "Items": [
    {
      "BudgetPolicyId": "023aacc1effc4b56bb154bfbec6ba9**",
      "GwClusterId": "pg-xxxxxxxx",
      "Status": "Enabled",
      "BudgetType": "GlobalTotal",
      "BudgetDimensionType": "ConsumerGroup ",
      "BudgetDimensionRefId": "cg-p3gk2oh55c**",
      "ResetDayOfMonth": "2",
      "BudgetPoints": "10000",
      "AlertThresholdPct": "80",
      "UsedPoints": 10,
      "GmtCreated": "2025-03-19T14:13:53+08:00",
      "GmtModified": "2025-04-08T10:43:28+08:00",
      "AlertTriggered": false,
      "Exceeded": "false"
    }
  ]
}

错误码

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

变更历史

更多信息,参考变更详情。