tencentcloud-sdk-python-tokenhub 3.1.115__tar.gz → 3.1.124__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/setup.py +1 -1
  3. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/v20260322/models.py +343 -65
  5. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/v20260322/tokenhub_client.py +11 -3
  6. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/v20260322/tokenhub_client_async.py +10 -2
  7. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud_sdk_python_tokenhub.egg-info/PKG-INFO +2 -2
  8. tencentcloud_sdk_python_tokenhub-3.1.124/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +1 -0
  9. tencentcloud_sdk_python_tokenhub-3.1.115/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +0 -1
  10. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/README.rst +0 -0
  11. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/setup.cfg +0 -0
  12. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/__init__.py +0 -0
  13. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/v20260322/__init__.py +0 -0
  14. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud/tokenhub/v20260322/errorcodes.py +0 -0
  15. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud_sdk_python_tokenhub.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud_sdk_python_tokenhub.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_tokenhub-3.1.115 → tencentcloud_sdk_python_tokenhub-3.1.124}/tencentcloud_sdk_python_tokenhub.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-tokenhub
3
- Version: 3.1.115
3
+ Version: 3.1.124
4
4
  Summary: Tencent Cloud Tokenhub SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.115
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.124
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
8
8
 
9
9
  setup(
10
10
  name='tencentcloud-sdk-python-tokenhub',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.115,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.124,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Tokenhub SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.115'
17
+ __version__ = '3.1.124'
@@ -57,6 +57,10 @@ class ApiKeyDetail(AbstractModel):
57
57
  :type IpWhitelist: list of str
58
58
  :param _Creator: 当Platform为maas时该字段为空
59
59
  :type Creator: str
60
+ :param _QuotaSet: Token 限额信息多维度列表。未配置限额时不返回该字段。
61
+ :type QuotaSet: list of QuotaInfo
62
+ :param _QuotaStatus: Token 限额状态。空字符串表示未配置任何限额包;active 表示已配置且当前可用;inactive 表示已配置但额度耗尽
63
+ :type QuotaStatus: str
60
64
  """
61
65
  self._ApiKeyId = None
62
66
  self._Name = None
@@ -74,6 +78,8 @@ class ApiKeyDetail(AbstractModel):
74
78
  self._BindingItems = None
75
79
  self._IpWhitelist = None
76
80
  self._Creator = None
81
+ self._QuotaSet = None
82
+ self._QuotaStatus = None
77
83
 
78
84
  @property
79
85
  def ApiKeyId(self):
@@ -251,6 +257,28 @@ class ApiKeyDetail(AbstractModel):
251
257
  def Creator(self, Creator):
252
258
  self._Creator = Creator
253
259
 
260
+ @property
261
+ def QuotaSet(self):
262
+ r"""Token 限额信息多维度列表。未配置限额时不返回该字段。
263
+ :rtype: list of QuotaInfo
264
+ """
265
+ return self._QuotaSet
266
+
267
+ @QuotaSet.setter
268
+ def QuotaSet(self, QuotaSet):
269
+ self._QuotaSet = QuotaSet
270
+
271
+ @property
272
+ def QuotaStatus(self):
273
+ r"""Token 限额状态。空字符串表示未配置任何限额包;active 表示已配置且当前可用;inactive 表示已配置但额度耗尽
274
+ :rtype: str
275
+ """
276
+ return self._QuotaStatus
277
+
278
+ @QuotaStatus.setter
279
+ def QuotaStatus(self, QuotaStatus):
280
+ self._QuotaStatus = QuotaStatus
281
+
254
282
 
255
283
  def _deserialize(self, params):
256
284
  self._ApiKeyId = params.get("ApiKeyId")
@@ -274,6 +302,13 @@ class ApiKeyDetail(AbstractModel):
274
302
  self._BindingItems.append(obj)
275
303
  self._IpWhitelist = params.get("IpWhitelist")
276
304
  self._Creator = params.get("Creator")
305
+ if params.get("QuotaSet") is not None:
306
+ self._QuotaSet = []
307
+ for item in params.get("QuotaSet"):
308
+ obj = QuotaInfo()
309
+ obj._deserialize(item)
310
+ self._QuotaSet.append(obj)
311
+ self._QuotaStatus = params.get("QuotaStatus")
277
312
  memeber_set = set(params.keys())
278
313
  for name, value in vars(self).items():
279
314
  property_name = name[1:]
@@ -1573,6 +1608,10 @@ class DescribeApiKeyResponse(AbstractModel):
1573
1608
  :type IpWhitelist: list of str
1574
1609
  :param _Creator: 当Platform为maas时该字段为空
1575
1610
  :type Creator: str
1611
+ :param _QuotaSet: Token 限额多维度信息。未配置限额时不返回该字段。
1612
+ :type QuotaSet: list of QuotaInfo
1613
+ :param _QuotaStatus: Token 限额状态。空字符串表示未配置任何限额包;active 表示已配置且当前可用;inactive 表示已配置但额度耗尽
1614
+ :type QuotaStatus: str
1576
1615
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1577
1616
  :type RequestId: str
1578
1617
  """
@@ -1592,6 +1631,8 @@ class DescribeApiKeyResponse(AbstractModel):
1592
1631
  self._BindingItems = None
1593
1632
  self._IpWhitelist = None
1594
1633
  self._Creator = None
1634
+ self._QuotaSet = None
1635
+ self._QuotaStatus = None
1595
1636
  self._RequestId = None
1596
1637
 
1597
1638
  @property
@@ -1770,6 +1811,28 @@ class DescribeApiKeyResponse(AbstractModel):
1770
1811
  def Creator(self, Creator):
1771
1812
  self._Creator = Creator
1772
1813
 
1814
+ @property
1815
+ def QuotaSet(self):
1816
+ r"""Token 限额多维度信息。未配置限额时不返回该字段。
1817
+ :rtype: list of QuotaInfo
1818
+ """
1819
+ return self._QuotaSet
1820
+
1821
+ @QuotaSet.setter
1822
+ def QuotaSet(self, QuotaSet):
1823
+ self._QuotaSet = QuotaSet
1824
+
1825
+ @property
1826
+ def QuotaStatus(self):
1827
+ r"""Token 限额状态。空字符串表示未配置任何限额包;active 表示已配置且当前可用;inactive 表示已配置但额度耗尽
1828
+ :rtype: str
1829
+ """
1830
+ return self._QuotaStatus
1831
+
1832
+ @QuotaStatus.setter
1833
+ def QuotaStatus(self, QuotaStatus):
1834
+ self._QuotaStatus = QuotaStatus
1835
+
1773
1836
  @property
1774
1837
  def RequestId(self):
1775
1838
  r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
@@ -1804,6 +1867,13 @@ class DescribeApiKeyResponse(AbstractModel):
1804
1867
  self._BindingItems.append(obj)
1805
1868
  self._IpWhitelist = params.get("IpWhitelist")
1806
1869
  self._Creator = params.get("Creator")
1870
+ if params.get("QuotaSet") is not None:
1871
+ self._QuotaSet = []
1872
+ for item in params.get("QuotaSet"):
1873
+ obj = QuotaInfo()
1874
+ obj._deserialize(item)
1875
+ self._QuotaSet.append(obj)
1876
+ self._QuotaStatus = params.get("QuotaStatus")
1807
1877
  self._RequestId = params.get("RequestId")
1808
1878
 
1809
1879
 
@@ -3263,25 +3333,21 @@ class DescribeUsageRankListRequest(AbstractModel):
3263
3333
 
3264
3334
  def __init__(self):
3265
3335
  r"""
3266
- :param _Dimension: 统计维度。取值:apikey(按 APIKey 统计)、endpoint(按接入点统计)、model(按模型统计)。
3336
+ :param _Dimension: <p>统计维度。取值:apikey(按 APIKey 统计)、endpoint(按接入点统计)、model(按模型统计)。</p>
3267
3337
  :type Dimension: str
3268
- :param _StartTime: 起始时间(闭区间),RFC3339 格式。
3338
+ :param _StartTime: <p>起始时间(闭区间),RFC3339 格式。</p>
3269
3339
  :type StartTime: str
3270
- :param _EndTime: 结束时间(开区间),RFC3339 格式。与 StartTime 的跨度最大 90 天。
3340
+ :param _EndTime: <p>结束时间(开区间),RFC3339 格式。与 StartTime 的跨度最大 90 天。</p>
3271
3341
  :type EndTime: str
3272
- :param _MetricType: 指标族切换字段。本期支持 tokens(累计 Token 用量,statistics=sum);传其他值将返回 InvalidParameter。空字符串或不传时默认 tokens。接口预留 MetricType 字段以支持后续指标族扩展。
3342
+ :param _MetricType: <p>指标族切换字段。</p><ul><li>tokens(默认):Token 消耗图(statistics=sum),支持 Dimension = apikey/endpoint/model</li><li>search【待上线】:联网搜索调用次数(statistics=sum),仅支持 Dimension = model</li><li>其他值返回 InvalidParameter。</li></ul><p>枚举值:</p><ul><li>tokens: tokens</li></ul>
3273
3343
  :type MetricType: str
3274
- :param _Target: 维度过滤值。空字符串表示查询全部对象,非空时仅查询指定单个对象(如指定 APIKey ID)。最大 256 字符。
3344
+ :param _Target: <p>维度过滤值。空字符串表示查询全部对象,非空时仅查询指定单个对象(如指定 APIKey ID)。最大 256 字符。</p>
3275
3345
  :type Target: str
3276
- :param _Period: 统计粒度(秒)。取值:60、300、3600、86400。必须不小于跨度对应下限:跨度 ≤ 1 天 → 60;1 ~ 5 天 → 300;5 ~ 10 天 → 3600;> 10 天 → 86400。仅 ShowAll=false 时使用。
3346
+ :param _Period: <p>统计粒度(秒)。取值:60、300、3600、86400。必须不小于跨度对应下限:跨度 ≤ 1 天 → 60;1 ~ 5 天 → 300;5 ~ 10 天 → 3600;&gt; 10 天 → 86400。仅 ShowAll=false 时使用。</p>
3277
3347
  :type Period: int
3278
- :param _Offset: 翻页起点,从 0 起,默认 0。ShowAll=true 时忽略。页大小固定为 10
3348
+ :param _Offset: <p>翻页起点,从 0 起,默认 0。ShowAll=true 时忽略。页大小固定为 10。</p>
3279
3349
  :type Offset: int
3280
- :param _ShowAll: 是否返回全量结果。
3281
- - false(默认):按 Offset 分页返回 TopList(每页 10 条),每个对象包含
3282
- Series 时序点用于绘制曲线。
3283
- - true:忽略 Offset,返回全量对象列表,不返回 Series(CSV 导出场景)。
3284
-
3350
+ :param _ShowAll: <p>是否返回全量结果。</p><ul><li>false(默认):按 Offset 分页返回 TopList(每页 10 条),每个对象包含<br>Series 时序点用于绘制曲线。</li><li>true:忽略 Offset,返回全量对象列表,不返回 Series(CSV 导出场景)。</li></ul>
3285
3351
  :type ShowAll: bool
3286
3352
  """
3287
3353
  self._Dimension = None
@@ -3295,7 +3361,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3295
3361
 
3296
3362
  @property
3297
3363
  def Dimension(self):
3298
- r"""统计维度。取值:apikey(按 APIKey 统计)、endpoint(按接入点统计)、model(按模型统计)。
3364
+ r"""<p>统计维度。取值:apikey(按 APIKey 统计)、endpoint(按接入点统计)、model(按模型统计)。</p>
3299
3365
  :rtype: str
3300
3366
  """
3301
3367
  return self._Dimension
@@ -3306,7 +3372,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3306
3372
 
3307
3373
  @property
3308
3374
  def StartTime(self):
3309
- r"""起始时间(闭区间),RFC3339 格式。
3375
+ r"""<p>起始时间(闭区间),RFC3339 格式。</p>
3310
3376
  :rtype: str
3311
3377
  """
3312
3378
  return self._StartTime
@@ -3317,7 +3383,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3317
3383
 
3318
3384
  @property
3319
3385
  def EndTime(self):
3320
- r"""结束时间(开区间),RFC3339 格式。与 StartTime 的跨度最大 90 天。
3386
+ r"""<p>结束时间(开区间),RFC3339 格式。与 StartTime 的跨度最大 90 天。</p>
3321
3387
  :rtype: str
3322
3388
  """
3323
3389
  return self._EndTime
@@ -3328,7 +3394,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3328
3394
 
3329
3395
  @property
3330
3396
  def MetricType(self):
3331
- r"""指标族切换字段。本期支持 tokens(累计 Token 用量,statistics=sum);传其他值将返回 InvalidParameter。空字符串或不传时默认 tokens。接口预留 MetricType 字段以支持后续指标族扩展。
3397
+ r"""<p>指标族切换字段。</p><ul><li>tokens(默认):Token 消耗图(statistics=sum),支持 Dimension = apikey/endpoint/model</li><li>search【待上线】:联网搜索调用次数(statistics=sum),仅支持 Dimension = model</li><li>其他值返回 InvalidParameter。</li></ul><p>枚举值:</p><ul><li>tokens: tokens</li></ul>
3332
3398
  :rtype: str
3333
3399
  """
3334
3400
  return self._MetricType
@@ -3339,7 +3405,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3339
3405
 
3340
3406
  @property
3341
3407
  def Target(self):
3342
- r"""维度过滤值。空字符串表示查询全部对象,非空时仅查询指定单个对象(如指定 APIKey ID)。最大 256 字符。
3408
+ r"""<p>维度过滤值。空字符串表示查询全部对象,非空时仅查询指定单个对象(如指定 APIKey ID)。最大 256 字符。</p>
3343
3409
  :rtype: str
3344
3410
  """
3345
3411
  return self._Target
@@ -3350,7 +3416,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3350
3416
 
3351
3417
  @property
3352
3418
  def Period(self):
3353
- r"""统计粒度(秒)。取值:60、300、3600、86400。必须不小于跨度对应下限:跨度 ≤ 1 天 → 60;1 ~ 5 天 → 300;5 ~ 10 天 → 3600;> 10 天 → 86400。仅 ShowAll=false 时使用。
3419
+ r"""<p>统计粒度(秒)。取值:60、300、3600、86400。必须不小于跨度对应下限:跨度 ≤ 1 天 → 60;1 ~ 5 天 → 300;5 ~ 10 天 → 3600;&gt; 10 天 → 86400。仅 ShowAll=false 时使用。</p>
3354
3420
  :rtype: int
3355
3421
  """
3356
3422
  return self._Period
@@ -3361,7 +3427,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3361
3427
 
3362
3428
  @property
3363
3429
  def Offset(self):
3364
- r"""翻页起点,从 0 起,默认 0。ShowAll=true 时忽略。页大小固定为 10
3430
+ r"""<p>翻页起点,从 0 起,默认 0。ShowAll=true 时忽略。页大小固定为 10。</p>
3365
3431
  :rtype: int
3366
3432
  """
3367
3433
  return self._Offset
@@ -3372,11 +3438,7 @@ class DescribeUsageRankListRequest(AbstractModel):
3372
3438
 
3373
3439
  @property
3374
3440
  def ShowAll(self):
3375
- r"""是否返回全量结果。
3376
- - false(默认):按 Offset 分页返回 TopList(每页 10 条),每个对象包含
3377
- Series 时序点用于绘制曲线。
3378
- - true:忽略 Offset,返回全量对象列表,不返回 Series(CSV 导出场景)。
3379
-
3441
+ r"""<p>是否返回全量结果。</p><ul><li>false(默认):按 Offset 分页返回 TopList(每页 10 条),每个对象包含<br>Series 时序点用于绘制曲线。</li><li>true:忽略 Offset,返回全量对象列表,不返回 Series(CSV 导出场景)。</li></ul>
3380
3442
  :rtype: bool
3381
3443
  """
3382
3444
  return self._ShowAll
@@ -3412,33 +3474,33 @@ class DescribeUsageRankListResponse(AbstractModel):
3412
3474
 
3413
3475
  def __init__(self):
3414
3476
  r"""
3415
- :param _Dimension: 回填请求的统计维度。
3477
+ :param _Dimension: <p>回填请求的统计维度。</p>
3416
3478
  :type Dimension: str
3417
- :param _MetricType: 回填请求的指标族(本期固定为 tokens)。前端按本字段切换图表渲染逻辑。
3479
+ :param _MetricType: <p>回填请求的指标族:tokens / search 。</p>
3418
3480
  :type MetricType: str
3419
- :param _MetricKeys: 本次响应中 Stats / Series / PageStats / TotalStats 实际包含的 metric key 列表,顺序固定为 [Total, Input, Output]。本期为 [TotalToken, InputTotalToken, OutputTotalToken]。前端可遍历此列表渲染图表,无需硬编码 key 名。
3481
+ :param _MetricKeys: <p>本次响应中 Stats / Series / PageStats / TotalStats 实际包含的 metric key 列表,按MetricType 区分:tokens=[Total,Input,Output,Cache]、search=[SearchRequestCount,SearchCount]</p>
3420
3482
  :type MetricKeys: list of str
3421
- :param _ViewName: 视图(数据来源)
3483
+ :param _ViewName: <p>视图(数据来源)</p>
3422
3484
  :type ViewName: str
3423
- :param _Period: 回填请求的统计粒度(秒)。ShowAll=true 时为 0
3485
+ :param _Period: <p>回填请求的统计粒度(秒)。ShowAll=true 时为 0。</p>
3424
3486
  :type Period: int
3425
- :param _StartTime: 回填请求的起始时间。
3487
+ :param _StartTime: <p>回填请求的起始时间。</p>
3426
3488
  :type StartTime: str
3427
- :param _EndTime: 回填请求的结束时间。
3489
+ :param _EndTime: <p>回填请求的结束时间。</p>
3428
3490
  :type EndTime: str
3429
- :param _Total: 全量对象数。
3491
+ :param _Total: <p>全量对象数。</p>
3430
3492
  :type Total: int
3431
- :param _Offset: 回填请求的翻页起点。ShowAll=true 时为 0
3493
+ :param _Offset: <p>回填请求的翻页起点。ShowAll=true 时为 0。</p>
3432
3494
  :type Offset: int
3433
- :param _Limit: 页大小,恒为 10。ShowAll=true 时为 Total
3495
+ :param _Limit: <p>页大小,恒为 10。ShowAll=true 时为 Total。</p>
3434
3496
  :type Limit: int
3435
- :param _Timestamps: Series 数组对应的时间戳序列(Unix 秒)。ShowAll=true 时为空数组。
3497
+ :param _Timestamps: <p>Series 数组对应的时间戳序列(Unix 秒)。ShowAll=true 时为空数组。</p>
3436
3498
  :type Timestamps: list of int
3437
- :param _TopList: 对象排行列表,按主指标(`MetricKeys[0]`,本期为 TotalToken)降序排序。ShowAll=false 时为当前页 10 个对象(含 Series);ShowAll=true 时为全量对象(不含 Series,用于 CSV 导出)。
3499
+ :param _TopList: <p>对象排行列表,按<code>MetricKeys[0]</code>降序排序。ShowAll=false 时为当前页 10 个对象(含 Series);ShowAll=true 时为全量对象(不含 Series,用于 CSV 导出)。</p>
3438
3500
  :type TopList: list of UsageRankItem
3439
- :param _PageStats: 分页统计结果
3501
+ :param _PageStats: <p>分页统计结果</p>
3440
3502
  :type PageStats: :class:`tencentcloud.tokenhub.v20260322.models.UsageStats`
3441
- :param _TotalStats: 总统计结果
3503
+ :param _TotalStats: <p>总统计结果</p>
3442
3504
  :type TotalStats: :class:`tencentcloud.tokenhub.v20260322.models.UsageStats`
3443
3505
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3444
3506
  :type RequestId: str
@@ -3461,7 +3523,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3461
3523
 
3462
3524
  @property
3463
3525
  def Dimension(self):
3464
- r"""回填请求的统计维度。
3526
+ r"""<p>回填请求的统计维度。</p>
3465
3527
  :rtype: str
3466
3528
  """
3467
3529
  return self._Dimension
@@ -3472,7 +3534,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3472
3534
 
3473
3535
  @property
3474
3536
  def MetricType(self):
3475
- r"""回填请求的指标族(本期固定为 tokens)。前端按本字段切换图表渲染逻辑。
3537
+ r"""<p>回填请求的指标族:tokens / search 。</p>
3476
3538
  :rtype: str
3477
3539
  """
3478
3540
  return self._MetricType
@@ -3483,7 +3545,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3483
3545
 
3484
3546
  @property
3485
3547
  def MetricKeys(self):
3486
- r"""本次响应中 Stats / Series / PageStats / TotalStats 实际包含的 metric key 列表,顺序固定为 [Total, Input, Output]。本期为 [TotalToken, InputTotalToken, OutputTotalToken]。前端可遍历此列表渲染图表,无需硬编码 key 名。
3548
+ r"""<p>本次响应中 Stats / Series / PageStats / TotalStats 实际包含的 metric key 列表,按MetricType 区分:tokens=[Total,Input,Output,Cache]、search=[SearchRequestCount,SearchCount]</p>
3487
3549
  :rtype: list of str
3488
3550
  """
3489
3551
  return self._MetricKeys
@@ -3494,7 +3556,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3494
3556
 
3495
3557
  @property
3496
3558
  def ViewName(self):
3497
- r"""视图(数据来源)
3559
+ r"""<p>视图(数据来源)</p>
3498
3560
  :rtype: str
3499
3561
  """
3500
3562
  return self._ViewName
@@ -3505,7 +3567,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3505
3567
 
3506
3568
  @property
3507
3569
  def Period(self):
3508
- r"""回填请求的统计粒度(秒)。ShowAll=true 时为 0
3570
+ r"""<p>回填请求的统计粒度(秒)。ShowAll=true 时为 0。</p>
3509
3571
  :rtype: int
3510
3572
  """
3511
3573
  return self._Period
@@ -3516,7 +3578,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3516
3578
 
3517
3579
  @property
3518
3580
  def StartTime(self):
3519
- r"""回填请求的起始时间。
3581
+ r"""<p>回填请求的起始时间。</p>
3520
3582
  :rtype: str
3521
3583
  """
3522
3584
  return self._StartTime
@@ -3527,7 +3589,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3527
3589
 
3528
3590
  @property
3529
3591
  def EndTime(self):
3530
- r"""回填请求的结束时间。
3592
+ r"""<p>回填请求的结束时间。</p>
3531
3593
  :rtype: str
3532
3594
  """
3533
3595
  return self._EndTime
@@ -3538,7 +3600,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3538
3600
 
3539
3601
  @property
3540
3602
  def Total(self):
3541
- r"""全量对象数。
3603
+ r"""<p>全量对象数。</p>
3542
3604
  :rtype: int
3543
3605
  """
3544
3606
  return self._Total
@@ -3549,7 +3611,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3549
3611
 
3550
3612
  @property
3551
3613
  def Offset(self):
3552
- r"""回填请求的翻页起点。ShowAll=true 时为 0
3614
+ r"""<p>回填请求的翻页起点。ShowAll=true 时为 0。</p>
3553
3615
  :rtype: int
3554
3616
  """
3555
3617
  return self._Offset
@@ -3560,7 +3622,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3560
3622
 
3561
3623
  @property
3562
3624
  def Limit(self):
3563
- r"""页大小,恒为 10。ShowAll=true 时为 Total
3625
+ r"""<p>页大小,恒为 10。ShowAll=true 时为 Total。</p>
3564
3626
  :rtype: int
3565
3627
  """
3566
3628
  return self._Limit
@@ -3571,7 +3633,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3571
3633
 
3572
3634
  @property
3573
3635
  def Timestamps(self):
3574
- r"""Series 数组对应的时间戳序列(Unix 秒)。ShowAll=true 时为空数组。
3636
+ r"""<p>Series 数组对应的时间戳序列(Unix 秒)。ShowAll=true 时为空数组。</p>
3575
3637
  :rtype: list of int
3576
3638
  """
3577
3639
  return self._Timestamps
@@ -3582,7 +3644,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3582
3644
 
3583
3645
  @property
3584
3646
  def TopList(self):
3585
- r"""对象排行列表,按主指标(`MetricKeys[0]`,本期为 TotalToken)降序排序。ShowAll=false 时为当前页 10 个对象(含 Series);ShowAll=true 时为全量对象(不含 Series,用于 CSV 导出)。
3647
+ r"""<p>对象排行列表,按<code>MetricKeys[0]</code>降序排序。ShowAll=false 时为当前页 10 个对象(含 Series);ShowAll=true 时为全量对象(不含 Series,用于 CSV 导出)。</p>
3586
3648
  :rtype: list of UsageRankItem
3587
3649
  """
3588
3650
  return self._TopList
@@ -3593,7 +3655,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3593
3655
 
3594
3656
  @property
3595
3657
  def PageStats(self):
3596
- r"""分页统计结果
3658
+ r"""<p>分页统计结果</p>
3597
3659
  :rtype: :class:`tencentcloud.tokenhub.v20260322.models.UsageStats`
3598
3660
  """
3599
3661
  return self._PageStats
@@ -3604,7 +3666,7 @@ class DescribeUsageRankListResponse(AbstractModel):
3604
3666
 
3605
3667
  @property
3606
3668
  def TotalStats(self):
3607
- r"""总统计结果
3669
+ r"""<p>总统计结果</p>
3608
3670
  :rtype: :class:`tencentcloud.tokenhub.v20260322.models.UsageStats`
3609
3671
  """
3610
3672
  return self._TotalStats
@@ -4335,6 +4397,132 @@ class ModifyTokenPlanApiKeySecretResponse(AbstractModel):
4335
4397
  self._RequestId = params.get("RequestId")
4336
4398
 
4337
4399
 
4400
+ class QuotaInfo(AbstractModel):
4401
+ r"""Token 限额信息
4402
+
4403
+ """
4404
+
4405
+ def __init__(self):
4406
+ r"""
4407
+ :param _PkgId: 限额包 ID。
4408
+ :type PkgId: str
4409
+ :param _Status: 限额包状态。取值:1(正常)、3(已耗尽)、4(已销毁)。
4410
+ :type Status: int
4411
+ :param _CycleUnit: 限额周期。取值:d(按日)、m(按月)、lifetime(总额度,不重置)。
4412
+ :type CycleUnit: str
4413
+ :param _CycleCredits: 维度当期限额总量(Token 数)。使用字符串避免大数精度丢失。
4414
+ :type CycleCredits: str
4415
+ :param _CycleUsed: 维度当期已使用量(Token 数)。使用字符串避免大数精度丢失。
4416
+ :type CycleUsed: str
4417
+ :param _StartTime: 限额生效起始时间。
4418
+ :type StartTime: str
4419
+ :param _ExpireTime: 限额过期时间。
4420
+ :type ExpireTime: str
4421
+ """
4422
+ self._PkgId = None
4423
+ self._Status = None
4424
+ self._CycleUnit = None
4425
+ self._CycleCredits = None
4426
+ self._CycleUsed = None
4427
+ self._StartTime = None
4428
+ self._ExpireTime = None
4429
+
4430
+ @property
4431
+ def PkgId(self):
4432
+ r"""限额包 ID。
4433
+ :rtype: str
4434
+ """
4435
+ return self._PkgId
4436
+
4437
+ @PkgId.setter
4438
+ def PkgId(self, PkgId):
4439
+ self._PkgId = PkgId
4440
+
4441
+ @property
4442
+ def Status(self):
4443
+ r"""限额包状态。取值:1(正常)、3(已耗尽)、4(已销毁)。
4444
+ :rtype: int
4445
+ """
4446
+ return self._Status
4447
+
4448
+ @Status.setter
4449
+ def Status(self, Status):
4450
+ self._Status = Status
4451
+
4452
+ @property
4453
+ def CycleUnit(self):
4454
+ r"""限额周期。取值:d(按日)、m(按月)、lifetime(总额度,不重置)。
4455
+ :rtype: str
4456
+ """
4457
+ return self._CycleUnit
4458
+
4459
+ @CycleUnit.setter
4460
+ def CycleUnit(self, CycleUnit):
4461
+ self._CycleUnit = CycleUnit
4462
+
4463
+ @property
4464
+ def CycleCredits(self):
4465
+ r"""维度当期限额总量(Token 数)。使用字符串避免大数精度丢失。
4466
+ :rtype: str
4467
+ """
4468
+ return self._CycleCredits
4469
+
4470
+ @CycleCredits.setter
4471
+ def CycleCredits(self, CycleCredits):
4472
+ self._CycleCredits = CycleCredits
4473
+
4474
+ @property
4475
+ def CycleUsed(self):
4476
+ r"""维度当期已使用量(Token 数)。使用字符串避免大数精度丢失。
4477
+ :rtype: str
4478
+ """
4479
+ return self._CycleUsed
4480
+
4481
+ @CycleUsed.setter
4482
+ def CycleUsed(self, CycleUsed):
4483
+ self._CycleUsed = CycleUsed
4484
+
4485
+ @property
4486
+ def StartTime(self):
4487
+ r"""限额生效起始时间。
4488
+ :rtype: str
4489
+ """
4490
+ return self._StartTime
4491
+
4492
+ @StartTime.setter
4493
+ def StartTime(self, StartTime):
4494
+ self._StartTime = StartTime
4495
+
4496
+ @property
4497
+ def ExpireTime(self):
4498
+ r"""限额过期时间。
4499
+ :rtype: str
4500
+ """
4501
+ return self._ExpireTime
4502
+
4503
+ @ExpireTime.setter
4504
+ def ExpireTime(self, ExpireTime):
4505
+ self._ExpireTime = ExpireTime
4506
+
4507
+
4508
+ def _deserialize(self, params):
4509
+ self._PkgId = params.get("PkgId")
4510
+ self._Status = params.get("Status")
4511
+ self._CycleUnit = params.get("CycleUnit")
4512
+ self._CycleCredits = params.get("CycleCredits")
4513
+ self._CycleUsed = params.get("CycleUsed")
4514
+ self._StartTime = params.get("StartTime")
4515
+ self._ExpireTime = params.get("ExpireTime")
4516
+ memeber_set = set(params.keys())
4517
+ for name, value in vars(self).items():
4518
+ property_name = name[1:]
4519
+ if property_name in memeber_set:
4520
+ memeber_set.remove(property_name)
4521
+ if len(memeber_set) > 0:
4522
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
4523
+
4524
+
4525
+
4338
4526
  class RenewTokenPlanTeamOrderRequest(AbstractModel):
4339
4527
  r"""RenewTokenPlanTeamOrder请求参数结构体
4340
4528
 
@@ -6290,20 +6478,29 @@ class UsageSeries(AbstractModel):
6290
6478
 
6291
6479
  def __init__(self):
6292
6480
  r"""
6293
- :param _TotalToken: 总 token 数用量时间周期内的 JSON 字符串形式,如 `"[12,null,15]"`。
6481
+ :param _TotalToken: <p>[tokens 族]总 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[12,null,15]&quot;</code>。</p>
6294
6482
  :type TotalToken: str
6295
- :param _InputTotalToken: 输入 token 数用量时间周期内的 JSON 字符串形式,如 `"[7,null,9]"`。
6483
+ :param _InputTotalToken: <p>[tokens 族]输入 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[7,null,9]&quot;</code>。</p>
6296
6484
  :type InputTotalToken: str
6297
- :param _OutputTotalToken: 输出 token 数用量时间周期内的 JSON 字符串形式,如 `"[5,null,6]"`。
6485
+ :param _OutputTotalToken: <p>[tokens 族]输出 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[5,null,6]&quot;</code>。</p>
6298
6486
  :type OutputTotalToken: str
6487
+ :param _CacheTotalToken: <p>[tokens 族]读缓存 token 数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6488
+ :type CacheTotalToken: str
6489
+ :param _SearchRequestCount: <p>[search 族] 搜索请求数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6490
+ :type SearchRequestCount: str
6491
+ :param _SearchCount: <p>[search 族] 搜索引擎调用次数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6492
+ :type SearchCount: str
6299
6493
  """
6300
6494
  self._TotalToken = None
6301
6495
  self._InputTotalToken = None
6302
6496
  self._OutputTotalToken = None
6497
+ self._CacheTotalToken = None
6498
+ self._SearchRequestCount = None
6499
+ self._SearchCount = None
6303
6500
 
6304
6501
  @property
6305
6502
  def TotalToken(self):
6306
- r"""总 token 数用量时间周期内的 JSON 字符串形式,如 `"[12,null,15]"`。
6503
+ r"""<p>[tokens 族]总 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[12,null,15]&quot;</code>。</p>
6307
6504
  :rtype: str
6308
6505
  """
6309
6506
  return self._TotalToken
@@ -6314,7 +6511,7 @@ class UsageSeries(AbstractModel):
6314
6511
 
6315
6512
  @property
6316
6513
  def InputTotalToken(self):
6317
- r"""输入 token 数用量时间周期内的 JSON 字符串形式,如 `"[7,null,9]"`。
6514
+ r"""<p>[tokens 族]输入 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[7,null,9]&quot;</code>。</p>
6318
6515
  :rtype: str
6319
6516
  """
6320
6517
  return self._InputTotalToken
@@ -6325,7 +6522,7 @@ class UsageSeries(AbstractModel):
6325
6522
 
6326
6523
  @property
6327
6524
  def OutputTotalToken(self):
6328
- r"""输出 token 数用量时间周期内的 JSON 字符串形式,如 `"[5,null,6]"`。
6525
+ r"""<p>[tokens 族]输出 token 数用量时间周期内的 JSON 字符串形式,如 <code>&quot;[5,null,6]&quot;</code>。</p>
6329
6526
  :rtype: str
6330
6527
  """
6331
6528
  return self._OutputTotalToken
@@ -6334,11 +6531,47 @@ class UsageSeries(AbstractModel):
6334
6531
  def OutputTotalToken(self, OutputTotalToken):
6335
6532
  self._OutputTotalToken = OutputTotalToken
6336
6533
 
6534
+ @property
6535
+ def CacheTotalToken(self):
6536
+ r"""<p>[tokens 族]读缓存 token 数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6537
+ :rtype: str
6538
+ """
6539
+ return self._CacheTotalToken
6540
+
6541
+ @CacheTotalToken.setter
6542
+ def CacheTotalToken(self, CacheTotalToken):
6543
+ self._CacheTotalToken = CacheTotalToken
6544
+
6545
+ @property
6546
+ def SearchRequestCount(self):
6547
+ r"""<p>[search 族] 搜索请求数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6548
+ :rtype: str
6549
+ """
6550
+ return self._SearchRequestCount
6551
+
6552
+ @SearchRequestCount.setter
6553
+ def SearchRequestCount(self, SearchRequestCount):
6554
+ self._SearchRequestCount = SearchRequestCount
6555
+
6556
+ @property
6557
+ def SearchCount(self):
6558
+ r"""<p>[search 族] 搜索引擎调用次数用量时间周期内的 JSON 字符串形式,如<code>&quot;[5,null,6]&quot;</code>。</p>
6559
+ :rtype: str
6560
+ """
6561
+ return self._SearchCount
6562
+
6563
+ @SearchCount.setter
6564
+ def SearchCount(self, SearchCount):
6565
+ self._SearchCount = SearchCount
6566
+
6337
6567
 
6338
6568
  def _deserialize(self, params):
6339
6569
  self._TotalToken = params.get("TotalToken")
6340
6570
  self._InputTotalToken = params.get("InputTotalToken")
6341
6571
  self._OutputTotalToken = params.get("OutputTotalToken")
6572
+ self._CacheTotalToken = params.get("CacheTotalToken")
6573
+ self._SearchRequestCount = params.get("SearchRequestCount")
6574
+ self._SearchCount = params.get("SearchCount")
6342
6575
  memeber_set = set(params.keys())
6343
6576
  for name, value in vars(self).items():
6344
6577
  property_name = name[1:]
@@ -6350,26 +6583,35 @@ class UsageSeries(AbstractModel):
6350
6583
 
6351
6584
 
6352
6585
  class UsageStats(AbstractModel):
6353
- r"""时间周期内的统计聚合值(按 metric key 索引)。本期返回 tokens 族(statistics=sum)的累计 Token 用量;具体包含哪些 key、顺序如何,参见响应顶层 `MetricKeys` 字段。接口预留 MetricType 字段以支持后续指标族扩展,本期仅支持 tokens。
6586
+ r"""时间周期内的统计聚合值(按 metric key 索引)。声明 tokens / search 两族字段都在本 schema 中,按 MetricKeys 实际返回取值,参见响应顶层 `MetricKeys` 字段。
6354
6587
 
6355
6588
  """
6356
6589
 
6357
6590
  def __init__(self):
6358
6591
  r"""
6359
- :param _TotalToken: 时间周期内的累计总 token 数。
6592
+ :param _TotalToken: <p>[tokens 族] 时间周期内的累计总 token 数。</p>
6360
6593
  :type TotalToken: int
6361
- :param _InputTotalToken: 时间周期内的累计输入 token 数。
6594
+ :param _InputTotalToken: <p>[tokens 族] 时间周期内的累计输入 token 数。</p>
6362
6595
  :type InputTotalToken: int
6363
- :param _OutputTotalToken: 时间周期内的累计输出 token 数。
6596
+ :param _OutputTotalToken: <p>[tokens 族] 时间周期内的累计输出 token 数。</p>
6364
6597
  :type OutputTotalToken: int
6598
+ :param _CacheTotalToken: <p>[tokens 族] 时间周期内的累计读缓存 token 数(命中缓存部分)</p>
6599
+ :type CacheTotalToken: int
6600
+ :param _SearchRequestCount: <p>[search 族] 整段累计联网搜索请求数</p>
6601
+ :type SearchRequestCount: int
6602
+ :param _SearchCount: <p>[search 族] 整段累计搜索引擎调用次数</p>
6603
+ :type SearchCount: int
6365
6604
  """
6366
6605
  self._TotalToken = None
6367
6606
  self._InputTotalToken = None
6368
6607
  self._OutputTotalToken = None
6608
+ self._CacheTotalToken = None
6609
+ self._SearchRequestCount = None
6610
+ self._SearchCount = None
6369
6611
 
6370
6612
  @property
6371
6613
  def TotalToken(self):
6372
- r"""时间周期内的累计总 token 数。
6614
+ r"""<p>[tokens 族] 时间周期内的累计总 token 数。</p>
6373
6615
  :rtype: int
6374
6616
  """
6375
6617
  return self._TotalToken
@@ -6380,7 +6622,7 @@ class UsageStats(AbstractModel):
6380
6622
 
6381
6623
  @property
6382
6624
  def InputTotalToken(self):
6383
- r"""时间周期内的累计输入 token 数。
6625
+ r"""<p>[tokens 族] 时间周期内的累计输入 token 数。</p>
6384
6626
  :rtype: int
6385
6627
  """
6386
6628
  return self._InputTotalToken
@@ -6391,7 +6633,7 @@ class UsageStats(AbstractModel):
6391
6633
 
6392
6634
  @property
6393
6635
  def OutputTotalToken(self):
6394
- r"""时间周期内的累计输出 token 数。
6636
+ r"""<p>[tokens 族] 时间周期内的累计输出 token 数。</p>
6395
6637
  :rtype: int
6396
6638
  """
6397
6639
  return self._OutputTotalToken
@@ -6400,11 +6642,47 @@ class UsageStats(AbstractModel):
6400
6642
  def OutputTotalToken(self, OutputTotalToken):
6401
6643
  self._OutputTotalToken = OutputTotalToken
6402
6644
 
6645
+ @property
6646
+ def CacheTotalToken(self):
6647
+ r"""<p>[tokens 族] 时间周期内的累计读缓存 token 数(命中缓存部分)</p>
6648
+ :rtype: int
6649
+ """
6650
+ return self._CacheTotalToken
6651
+
6652
+ @CacheTotalToken.setter
6653
+ def CacheTotalToken(self, CacheTotalToken):
6654
+ self._CacheTotalToken = CacheTotalToken
6655
+
6656
+ @property
6657
+ def SearchRequestCount(self):
6658
+ r"""<p>[search 族] 整段累计联网搜索请求数</p>
6659
+ :rtype: int
6660
+ """
6661
+ return self._SearchRequestCount
6662
+
6663
+ @SearchRequestCount.setter
6664
+ def SearchRequestCount(self, SearchRequestCount):
6665
+ self._SearchRequestCount = SearchRequestCount
6666
+
6667
+ @property
6668
+ def SearchCount(self):
6669
+ r"""<p>[search 族] 整段累计搜索引擎调用次数</p>
6670
+ :rtype: int
6671
+ """
6672
+ return self._SearchCount
6673
+
6674
+ @SearchCount.setter
6675
+ def SearchCount(self, SearchCount):
6676
+ self._SearchCount = SearchCount
6677
+
6403
6678
 
6404
6679
  def _deserialize(self, params):
6405
6680
  self._TotalToken = params.get("TotalToken")
6406
6681
  self._InputTotalToken = params.get("InputTotalToken")
6407
6682
  self._OutputTotalToken = params.get("OutputTotalToken")
6683
+ self._CacheTotalToken = params.get("CacheTotalToken")
6684
+ self._SearchRequestCount = params.get("SearchRequestCount")
6685
+ self._SearchCount = params.get("SearchCount")
6408
6686
  memeber_set = set(params.keys())
6409
6687
  for name, value in vars(self).items():
6410
6688
  property_name = name[1:]
@@ -477,9 +477,17 @@ class TokenhubClient(AbstractClient):
477
477
  def DescribeUsageRankList(self, request):
478
478
  r"""查询用量排行列表。
479
479
 
480
- 按 apikey、endpoint、model 三个维度统计指定时间窗内的用量排行,返回顶部数据卡所需的 PageStats/TotalStats、左侧 Top 列表(含每对象整段累计值)、右侧色块趋势图所需的逐点曲线。前端通过 Offset 翻页、ShowAll 切换 CSV 全量导出模式。
481
-
482
- MetricType 字段用于切换指标族,本期支持 tokens;接口预留以支持后续指标族扩展。响应回显 MetricType 与 MetricKeys(实际参与渲染的 metric key 列表,顺序固定 [Total, Input, Output]),前端按此渲染顶部数据卡与趋势图,无需硬编码 key 名。
480
+ 指标族(MetricType)
481
+ - `tokens`(默认):Token 用量统计。支持 Dimension = apikey / endpoint / model。
482
+ 返回指标:TotalToken(总)/ InputTotalToken(输入)/ OutputTotalToken(输出)/ CacheTotalToken(读缓存)。
483
+ - `search`:【待上线】联网搜索用量统计。支持 Dimension = apikey / endpoint / model。
484
+ 返回指标:SearchRequestCount(搜索请求数)/ SearchCount(搜索引擎调用次数)。
485
+
486
+ 响应内容
487
+ - MetricType 字段用于切换指标族,响应回显 MetricType 与 MetricKeys。
488
+ - TotalStats:时间窗内全部对象的整段聚合值。
489
+ - PageStats:当前翻页内对象的整段聚合值。
490
+ - TopList:按MetricKeys[0]降序的对象列表,含整段聚合值与逐时间点曲线。
483
491
 
484
492
  :param request: Request instance for DescribeUsageRankList.
485
493
  :type request: :class:`tencentcloud.tokenhub.v20260322.models.DescribeUsageRankListRequest`
@@ -391,9 +391,17 @@ class TokenhubClient(AbstractClient):
391
391
  """
392
392
  查询用量排行列表。
393
393
 
394
- 按 apikey、endpoint、model 三个维度统计指定时间窗内的用量排行,返回顶部数据卡所需的 PageStats/TotalStats、左侧 Top 列表(含每对象整段累计值)、右侧色块趋势图所需的逐点曲线。前端通过 Offset 翻页、ShowAll 切换 CSV 全量导出模式。
394
+ 指标族(MetricType)
395
+ - `tokens`(默认):Token 用量统计。支持 Dimension = apikey / endpoint / model。
396
+ 返回指标:TotalToken(总)/ InputTotalToken(输入)/ OutputTotalToken(输出)/ CacheTotalToken(读缓存)。
397
+ - `search`:【待上线】联网搜索用量统计。支持 Dimension = apikey / endpoint / model。
398
+ 返回指标:SearchRequestCount(搜索请求数)/ SearchCount(搜索引擎调用次数)。
395
399
 
396
- MetricType 字段用于切换指标族,本期支持 tokens;接口预留以支持后续指标族扩展。响应回显 MetricType 与 MetricKeys(实际参与渲染的 metric key 列表,顺序固定 [Total, Input, Output]),前端按此渲染顶部数据卡与趋势图,无需硬编码 key 名。
400
+ 响应内容
401
+ - MetricType 字段用于切换指标族,响应回显 MetricType 与 MetricKeys。
402
+ - TotalStats:时间窗内全部对象的整段聚合值。
403
+ - PageStats:当前翻页内对象的整段聚合值。
404
+ - TopList:按MetricKeys[0]降序的对象列表,含整段聚合值与逐时间点曲线。
397
405
  """
398
406
 
399
407
  kwargs = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-tokenhub
3
- Version: 3.1.115
3
+ Version: 3.1.124
4
4
  Summary: Tencent Cloud Tokenhub SDK for Python
5
5
  Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
6
6
  Author: Tencent Cloud
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.6
17
17
  Classifier: Programming Language :: Python :: 3.7
18
- Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.115
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.124
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.124
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.115