tencentcloud-sdk-python-cngw 3.1.195__tar.gz → 3.1.200__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.
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/setup.py +1 -1
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/v20230418/cngw_client.py +311 -13
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/v20230418/cngw_client_async.py +251 -13
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/v20230418/errorcodes.py +6 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/v20230418/models.py +6762 -500
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud_sdk_python_cngw.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_cngw-3.1.200/tencentcloud_sdk_python_cngw.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_cngw-3.1.195/tencentcloud_sdk_python_cngw.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/README.rst +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/setup.cfg +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/__init__.py +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud/cngw/v20230418/__init__.py +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud_sdk_python_cngw.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud_sdk_python_cngw.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_cngw-3.1.195 → tencentcloud_sdk_python_cngw-3.1.200}/tencentcloud_sdk_python_cngw.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-cngw
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.200
|
|
4
4
|
Summary: Tencent Cloud Cngw 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.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.200
|
|
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-cngw',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.1.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.200,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Cngw SDK for Python',
|
|
@@ -74,7 +74,7 @@ class CngwClient(AbstractClient):
|
|
|
74
74
|
|
|
75
75
|
def BindCloudNativeAPIGatewaySecretKey(self, request):
|
|
76
76
|
r"""添加密钥与资源的引用关系接口
|
|
77
|
-
【消费者批量自动分配 API Key|修改:内部并发/配额逻辑,字段不变】ResourceType=Consumer 时与批量预留共用实例写锁,单消费者绑定配额使用当前锁定读。仍按原 SecretKeyId、ResourceIds 绑定;消费者目标最多一个,单密钥不能同时绑定多个消费者,成功仍返回 Result=true。此入口不新增 OperationDenied.BatchKeyPending;该错误属于下述四个变更入口的保护逻辑。
|
|
77
|
+
【消费者批量自动分配 API Key|修改:内部并发/配额逻辑,字段不变】ResourceType=Consumer 时与批量预留共用实例写锁,单消费者绑定配额使用当前锁定读。仍按原 SecretKeyId、ResourceIds 绑定;消费者目标最多一个,单密钥不能同时绑定多个消费者,成功仍返回 Result=true。此入口不新增 OperationDenied.BatchKeyPending;该错误属于下述四个变更入口的保护逻辑。
|
|
78
78
|
|
|
79
79
|
:param request: Request instance for BindCloudNativeAPIGatewaySecretKey.
|
|
80
80
|
:type request: :class:`tencentcloud.cngw.v20230418.models.BindCloudNativeAPIGatewaySecretKeyRequest`
|
|
@@ -165,6 +165,33 @@ class CngwClient(AbstractClient):
|
|
|
165
165
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
166
166
|
|
|
167
167
|
|
|
168
|
+
def CreateAIGWCustomGuardrailPolicy(self, request):
|
|
169
|
+
r"""创建自定义外部审核策略,并把资源绑定配置同步到 Kong Route。建议先调用 DescribeAIGWCustomGuardrailCapabilities、DescribeAIGWCustomGuardrailBindableResources 和 TestAIGWCustomGuardrailPolicy。支持模型 API、MCP Streamable HTTP、A2A Agent API;当前不开放 Dify、Custom Agent、Legacy SSE MCP。请检查 Result.Success、SyncStatus、FailedResources;部分同步失败不等于策略未创建,应按返回 PolicyId 查询并处理,避免重复创建。网关需满足最低版本 3.9.6,且已安装、启用并加载 cngw-ai-custom-guardrail。创建、修改、删除要求网关处于稳定 Running 状态,升级/回滚/撤销升级期间不能修改策略。
|
|
170
|
+
|
|
171
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
172
|
+
|
|
173
|
+
输入约束:新配置只接受 field_mapping,不再默认为 standard_v2。创建时鉴权和检测行为必须完整填写;修改为 PATCH,省略保留,显式空值不补默认值。存量 standard_v2 策略仍可查询、删除或直接停用;修改其判定配置或重新启用前需迁移到 field_mapping。条件必填由后端按完整配置校验,非法配置不写库、不下发。
|
|
174
|
+
|
|
175
|
+
:param request: Request instance for CreateAIGWCustomGuardrailPolicy.
|
|
176
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.CreateAIGWCustomGuardrailPolicyRequest`
|
|
177
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.CreateAIGWCustomGuardrailPolicyResponse`
|
|
178
|
+
|
|
179
|
+
"""
|
|
180
|
+
try:
|
|
181
|
+
params = request._serialize()
|
|
182
|
+
headers = request.headers
|
|
183
|
+
body = self.call("CreateAIGWCustomGuardrailPolicy", params, headers=headers)
|
|
184
|
+
response = json.loads(body)
|
|
185
|
+
model = models.CreateAIGWCustomGuardrailPolicyResponse()
|
|
186
|
+
model._deserialize(response["Response"])
|
|
187
|
+
return model
|
|
188
|
+
except Exception as e:
|
|
189
|
+
if isinstance(e, TencentCloudSDKException):
|
|
190
|
+
raise
|
|
191
|
+
else:
|
|
192
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
193
|
+
|
|
194
|
+
|
|
168
195
|
def CreateCloudNativeAPIGatewayAIServiceSource(self, request):
|
|
169
196
|
r"""创建云原生网关AI服务来源
|
|
170
197
|
|
|
@@ -258,7 +285,7 @@ class CngwClient(AbstractClient):
|
|
|
258
285
|
|
|
259
286
|
|
|
260
287
|
def CreateCloudNativeAPIGatewayLLMModelService(self, request):
|
|
261
|
-
r"""
|
|
288
|
+
r"""创建指定网关实例内的 LLM 模型服务。同一网关下 Name 唯一。可为明确请求 gzip 的供应商选择是否关闭上游压缩协商。
|
|
262
289
|
|
|
263
290
|
:param request: Request instance for CreateCloudNativeAPIGatewayLLMModelService.
|
|
264
291
|
:type request: :class:`tencentcloud.cngw.v20230418.models.CreateCloudNativeAPIGatewayLLMModelServiceRequest`
|
|
@@ -351,7 +378,7 @@ class CngwClient(AbstractClient):
|
|
|
351
378
|
|
|
352
379
|
def CreateCloudNativeAPIGatewaySecretKey(self, request):
|
|
353
380
|
r"""创建消费者密钥。
|
|
354
|
-
【消费者批量自动分配 API Key|修改:内部并发/配额逻辑,字段不变】消费者密钥单条创建在事务中使用与批量预留相同的实例写锁,配额检查使用当前锁定读,避免单条与批量并发绕过配额。仍是单条创建;原 GenerateType、请求字段、既有配额错误语义及 Result.Success/ID 不变,不增加 ConsumerIds/ClientToken。
|
|
381
|
+
【消费者批量自动分配 API Key|修改:内部并发/配额逻辑,字段不变】消费者密钥单条创建在事务中使用与批量预留相同的实例写锁,配额检查使用当前锁定读,避免单条与批量并发绕过配额。仍是单条创建;原 GenerateType、请求字段、既有配额错误语义及 Result.Success/ID 不变,不增加 ConsumerIds/ClientToken。
|
|
355
382
|
|
|
356
383
|
:param request: Request instance for CreateCloudNativeAPIGatewaySecretKey.
|
|
357
384
|
:type request: :class:`tencentcloud.cngw.v20230418.models.CreateCloudNativeAPIGatewaySecretKeyRequest`
|
|
@@ -373,6 +400,54 @@ class CngwClient(AbstractClient):
|
|
|
373
400
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
374
401
|
|
|
375
402
|
|
|
403
|
+
def CreateOrModifyCloudNativeAPIGatewayIPRestriction(self, request):
|
|
404
|
+
r"""创建或编辑云原生网关访问控制
|
|
405
|
+
|
|
406
|
+
:param request: Request instance for CreateOrModifyCloudNativeAPIGatewayIPRestriction.
|
|
407
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.CreateOrModifyCloudNativeAPIGatewayIPRestrictionRequest`
|
|
408
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.CreateOrModifyCloudNativeAPIGatewayIPRestrictionResponse`
|
|
409
|
+
|
|
410
|
+
"""
|
|
411
|
+
try:
|
|
412
|
+
params = request._serialize()
|
|
413
|
+
headers = request.headers
|
|
414
|
+
body = self.call("CreateOrModifyCloudNativeAPIGatewayIPRestriction", params, headers=headers)
|
|
415
|
+
response = json.loads(body)
|
|
416
|
+
model = models.CreateOrModifyCloudNativeAPIGatewayIPRestrictionResponse()
|
|
417
|
+
model._deserialize(response["Response"])
|
|
418
|
+
return model
|
|
419
|
+
except Exception as e:
|
|
420
|
+
if isinstance(e, TencentCloudSDKException):
|
|
421
|
+
raise
|
|
422
|
+
else:
|
|
423
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def DeleteAIGWCustomGuardrailPolicy(self, request):
|
|
427
|
+
r"""先清理该策略的 Route 插件投影,再删除策略和绑定。清理失败返回 Result.Success=false,保留策略供排障后重试;不删除绑定的模型、MCP、Agent 或审核引擎服务。网关需满足最低版本 3.9.6,且已安装、启用并加载 cngw-ai-custom-guardrail。创建、修改、删除要求网关处于稳定 Running 状态,升级/回滚/撤销升级期间不能修改策略。
|
|
428
|
+
|
|
429
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
430
|
+
|
|
431
|
+
:param request: Request instance for DeleteAIGWCustomGuardrailPolicy.
|
|
432
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DeleteAIGWCustomGuardrailPolicyRequest`
|
|
433
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DeleteAIGWCustomGuardrailPolicyResponse`
|
|
434
|
+
|
|
435
|
+
"""
|
|
436
|
+
try:
|
|
437
|
+
params = request._serialize()
|
|
438
|
+
headers = request.headers
|
|
439
|
+
body = self.call("DeleteAIGWCustomGuardrailPolicy", params, headers=headers)
|
|
440
|
+
response = json.loads(body)
|
|
441
|
+
model = models.DeleteAIGWCustomGuardrailPolicyResponse()
|
|
442
|
+
model._deserialize(response["Response"])
|
|
443
|
+
return model
|
|
444
|
+
except Exception as e:
|
|
445
|
+
if isinstance(e, TencentCloudSDKException):
|
|
446
|
+
raise
|
|
447
|
+
else:
|
|
448
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
449
|
+
|
|
450
|
+
|
|
376
451
|
def DeleteCloudNativeAPIGatewayAIServiceSource(self, request):
|
|
377
452
|
r"""删除云原生网关AI服务来源
|
|
378
453
|
|
|
@@ -444,6 +519,29 @@ class CngwClient(AbstractClient):
|
|
|
444
519
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
445
520
|
|
|
446
521
|
|
|
522
|
+
def DeleteCloudNativeAPIGatewayIPRestriction(self, request):
|
|
523
|
+
r"""删除云原生网关访问控制
|
|
524
|
+
|
|
525
|
+
:param request: Request instance for DeleteCloudNativeAPIGatewayIPRestriction.
|
|
526
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DeleteCloudNativeAPIGatewayIPRestrictionRequest`
|
|
527
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DeleteCloudNativeAPIGatewayIPRestrictionResponse`
|
|
528
|
+
|
|
529
|
+
"""
|
|
530
|
+
try:
|
|
531
|
+
params = request._serialize()
|
|
532
|
+
headers = request.headers
|
|
533
|
+
body = self.call("DeleteCloudNativeAPIGatewayIPRestriction", params, headers=headers)
|
|
534
|
+
response = json.loads(body)
|
|
535
|
+
model = models.DeleteCloudNativeAPIGatewayIPRestrictionResponse()
|
|
536
|
+
model._deserialize(response["Response"])
|
|
537
|
+
return model
|
|
538
|
+
except Exception as e:
|
|
539
|
+
if isinstance(e, TencentCloudSDKException):
|
|
540
|
+
raise
|
|
541
|
+
else:
|
|
542
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
543
|
+
|
|
544
|
+
|
|
447
545
|
def DeleteCloudNativeAPIGatewayLLMModelAPI(self, request):
|
|
448
546
|
r"""删除 LLM 模型 API。
|
|
449
547
|
|
|
@@ -584,7 +682,7 @@ class CngwClient(AbstractClient):
|
|
|
584
682
|
|
|
585
683
|
def DeleteCloudNativeAPIGatewaySecretKey(self, request):
|
|
586
684
|
r"""删除消费者密钥(被绑定时需先解绑)。
|
|
587
|
-
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,删除返回 OperationDenied.BatchKeyPending。完成后仍执行原绑定/依赖删除检查;原 GatewayId/SecretKeyId 不变,成功不新增业务 Result。删除已生成密钥不改写批次历史成功,后续批次明文读取返回逐项 ResourceNotFound.SecretKey。
|
|
685
|
+
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,删除返回 OperationDenied.BatchKeyPending。完成后仍执行原绑定/依赖删除检查;原 GatewayId/SecretKeyId 不变,成功不新增业务 Result。删除已生成密钥不改写批次历史成功,后续批次明文读取返回逐项 ResourceNotFound.SecretKey。
|
|
588
686
|
|
|
589
687
|
:param request: Request instance for DeleteCloudNativeAPIGatewaySecretKey.
|
|
590
688
|
:type request: :class:`tencentcloud.cngw.v20230418.models.DeleteCloudNativeAPIGatewaySecretKeyRequest`
|
|
@@ -606,6 +704,131 @@ class CngwClient(AbstractClient):
|
|
|
606
704
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
607
705
|
|
|
608
706
|
|
|
707
|
+
def DescribeAIGWCustomGuardrailBindableResources(self, request):
|
|
708
|
+
r"""按一种业务资源类型分页查询绑定候选及 Route 占用情况。编辑策略时传 PolicyId 排除自身占用,选择时同时检查 Supported 和 Occupied。当前屏蔽的 Dify/Custom Agent、Legacy SSE MCP 不进入可绑定列表。创建策略时使用 ResourceId,不使用 RouteIds。
|
|
709
|
+
|
|
710
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
711
|
+
|
|
712
|
+
:param request: Request instance for DescribeAIGWCustomGuardrailBindableResources.
|
|
713
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailBindableResourcesRequest`
|
|
714
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailBindableResourcesResponse`
|
|
715
|
+
|
|
716
|
+
"""
|
|
717
|
+
try:
|
|
718
|
+
params = request._serialize()
|
|
719
|
+
headers = request.headers
|
|
720
|
+
body = self.call("DescribeAIGWCustomGuardrailBindableResources", params, headers=headers)
|
|
721
|
+
response = json.loads(body)
|
|
722
|
+
model = models.DescribeAIGWCustomGuardrailBindableResourcesResponse()
|
|
723
|
+
model._deserialize(response["Response"])
|
|
724
|
+
return model
|
|
725
|
+
except Exception as e:
|
|
726
|
+
if isinstance(e, TencentCloudSDKException):
|
|
727
|
+
raise
|
|
728
|
+
else:
|
|
729
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
def DescribeAIGWCustomGuardrailCapabilities(self, request):
|
|
733
|
+
r"""查询当前控制面支持的协议分类、业务资源类型、审核方向及限制。会校验网关版本和插件可用性。Limits 是能力说明,不等于创建/修改策略可配置的字段,也不是逐个数据面实例的实时状态。
|
|
734
|
+
|
|
735
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
736
|
+
|
|
737
|
+
:param request: Request instance for DescribeAIGWCustomGuardrailCapabilities.
|
|
738
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailCapabilitiesRequest`
|
|
739
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailCapabilitiesResponse`
|
|
740
|
+
|
|
741
|
+
"""
|
|
742
|
+
try:
|
|
743
|
+
params = request._serialize()
|
|
744
|
+
headers = request.headers
|
|
745
|
+
body = self.call("DescribeAIGWCustomGuardrailCapabilities", params, headers=headers)
|
|
746
|
+
response = json.loads(body)
|
|
747
|
+
model = models.DescribeAIGWCustomGuardrailCapabilitiesResponse()
|
|
748
|
+
model._deserialize(response["Response"])
|
|
749
|
+
return model
|
|
750
|
+
except Exception as e:
|
|
751
|
+
if isinstance(e, TencentCloudSDKException):
|
|
752
|
+
raise
|
|
753
|
+
else:
|
|
754
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
def DescribeAIGWCustomGuardrailHits(self, request):
|
|
758
|
+
r"""从网关 RuntimeEventLog 对应 CLS 主题分页查询审核记录,调用前需开启日志投递。按时间倒序返回,查询时间入参为 Unix 秒,记录 Timestamp 为 Unix 毫秒;同一流式业务请求可有多次审核记录。当前查询无导出接口的 1000 条截断限制,使用 Offset/Limit 翻页。
|
|
759
|
+
|
|
760
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
761
|
+
|
|
762
|
+
:param request: Request instance for DescribeAIGWCustomGuardrailHits.
|
|
763
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailHitsRequest`
|
|
764
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailHitsResponse`
|
|
765
|
+
|
|
766
|
+
"""
|
|
767
|
+
try:
|
|
768
|
+
params = request._serialize()
|
|
769
|
+
headers = request.headers
|
|
770
|
+
body = self.call("DescribeAIGWCustomGuardrailHits", params, headers=headers)
|
|
771
|
+
response = json.loads(body)
|
|
772
|
+
model = models.DescribeAIGWCustomGuardrailHitsResponse()
|
|
773
|
+
model._deserialize(response["Response"])
|
|
774
|
+
return model
|
|
775
|
+
except Exception as e:
|
|
776
|
+
if isinstance(e, TencentCloudSDKException):
|
|
777
|
+
raise
|
|
778
|
+
else:
|
|
779
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
def DescribeAIGWCustomGuardrailPolicy(self, request):
|
|
783
|
+
r"""查询已有策略、脱敏鉴权配置、资源绑定与配置同步状态。Result 本身就是策略对象,不是 Result.Policy。密钥不返回明文,编辑时省略 ApiKey 即可保留。
|
|
784
|
+
|
|
785
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
786
|
+
|
|
787
|
+
:param request: Request instance for DescribeAIGWCustomGuardrailPolicy.
|
|
788
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailPolicyRequest`
|
|
789
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailPolicyResponse`
|
|
790
|
+
|
|
791
|
+
"""
|
|
792
|
+
try:
|
|
793
|
+
params = request._serialize()
|
|
794
|
+
headers = request.headers
|
|
795
|
+
body = self.call("DescribeAIGWCustomGuardrailPolicy", params, headers=headers)
|
|
796
|
+
response = json.loads(body)
|
|
797
|
+
model = models.DescribeAIGWCustomGuardrailPolicyResponse()
|
|
798
|
+
model._deserialize(response["Response"])
|
|
799
|
+
return model
|
|
800
|
+
except Exception as e:
|
|
801
|
+
if isinstance(e, TencentCloudSDKException):
|
|
802
|
+
raise
|
|
803
|
+
else:
|
|
804
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
def DescribeAIGWCustomGuardrailPolicyList(self, request):
|
|
808
|
+
r"""按网关分页查询策略;Limit 必填,范围 1~100,Offset 默认 0。支持名称/描述搜索及配置过滤;同项多值 OR,不同过滤项 AND。Result.DataList 为策略数组。
|
|
809
|
+
|
|
810
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
811
|
+
|
|
812
|
+
:param request: Request instance for DescribeAIGWCustomGuardrailPolicyList.
|
|
813
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailPolicyListRequest`
|
|
814
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeAIGWCustomGuardrailPolicyListResponse`
|
|
815
|
+
|
|
816
|
+
"""
|
|
817
|
+
try:
|
|
818
|
+
params = request._serialize()
|
|
819
|
+
headers = request.headers
|
|
820
|
+
body = self.call("DescribeAIGWCustomGuardrailPolicyList", params, headers=headers)
|
|
821
|
+
response = json.loads(body)
|
|
822
|
+
model = models.DescribeAIGWCustomGuardrailPolicyListResponse()
|
|
823
|
+
model._deserialize(response["Response"])
|
|
824
|
+
return model
|
|
825
|
+
except Exception as e:
|
|
826
|
+
if isinstance(e, TencentCloudSDKException):
|
|
827
|
+
raise
|
|
828
|
+
else:
|
|
829
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
830
|
+
|
|
831
|
+
|
|
609
832
|
def DescribeCNGWServicesWithRoutes(self, request):
|
|
610
833
|
r"""查询云原生网关服务和路由列表
|
|
611
834
|
|
|
@@ -752,6 +975,29 @@ class CngwClient(AbstractClient):
|
|
|
752
975
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
753
976
|
|
|
754
977
|
|
|
978
|
+
def DescribeCloudNativeAPIGatewayIPRestriction(self, request):
|
|
979
|
+
r"""查询云原生网关访问控制
|
|
980
|
+
|
|
981
|
+
:param request: Request instance for DescribeCloudNativeAPIGatewayIPRestriction.
|
|
982
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewayIPRestrictionRequest`
|
|
983
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewayIPRestrictionResponse`
|
|
984
|
+
|
|
985
|
+
"""
|
|
986
|
+
try:
|
|
987
|
+
params = request._serialize()
|
|
988
|
+
headers = request.headers
|
|
989
|
+
body = self.call("DescribeCloudNativeAPIGatewayIPRestriction", params, headers=headers)
|
|
990
|
+
response = json.loads(body)
|
|
991
|
+
model = models.DescribeCloudNativeAPIGatewayIPRestrictionResponse()
|
|
992
|
+
model._deserialize(response["Response"])
|
|
993
|
+
return model
|
|
994
|
+
except Exception as e:
|
|
995
|
+
if isinstance(e, TencentCloudSDKException):
|
|
996
|
+
raise
|
|
997
|
+
else:
|
|
998
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
999
|
+
|
|
1000
|
+
|
|
755
1001
|
def DescribeCloudNativeAPIGatewayLLMModelAPI(self, request):
|
|
756
1002
|
r"""查询单个 LLM 模型 API 详情。
|
|
757
1003
|
|
|
@@ -845,7 +1091,7 @@ class CngwClient(AbstractClient):
|
|
|
845
1091
|
|
|
846
1092
|
|
|
847
1093
|
def DescribeCloudNativeAPIGatewayLLMTokenUsageList(self, request):
|
|
848
|
-
r"""查询 AI 网关Token
|
|
1094
|
+
r"""查询 AI 网关 Token 用量列表。网关版本不低于 3.9.8 且 Dimension=ConsumerGroup 时,未指定节点筛选则列出 Kong CP 当前目录的全部真实节点,包含同步、自定义、禁用及保留中的软删节点,排除合成展示节点。按当前名称、节点 UUID 升序,先分页节点再查询历史指标;无调用节点仍返回,Token 与请求数补零。节点指标包含历史下属,同一请求可计入多个组行,不能逐行相加作为网关总量。 网关版本不低于 3.9.8 时,所有支持维度的消费者组筛选统一为 ConsumerGroupId / ConsumerGroupName,均按历史归属查询;旧 OrganizationNodeId / OrganizationNodeName 筛选不再接受。
|
|
849
1095
|
|
|
850
1096
|
:param request: Request instance for DescribeCloudNativeAPIGatewayLLMTokenUsageList.
|
|
851
1097
|
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewayLLMTokenUsageListRequest`
|
|
@@ -868,7 +1114,7 @@ class CngwClient(AbstractClient):
|
|
|
868
1114
|
|
|
869
1115
|
|
|
870
1116
|
def DescribeCloudNativeAPIGatewayLLMTokenUsageStatistics(self, request):
|
|
871
|
-
r"""查询 AI 网关Token
|
|
1117
|
+
r"""查询 AI 网关 Token 用量汇总。网关版本不低于 3.9.8 且 Dimension=ConsumerGroup 时,按历史归属对日志并集去重统计;无节点筛选则查询全部成功归属且祖先集合非空的日志,不依赖当前组织目录候选。返回一份汇总,TopConsumers 为空数组。 网关版本不低于 3.9.8 时,所有支持维度的消费者组筛选统一为 ConsumerGroupId / ConsumerGroupName,均按历史归属查询;旧 OrganizationNodeId / OrganizationNodeName 筛选不再接受。
|
|
872
1118
|
|
|
873
1119
|
:param request: Request instance for DescribeCloudNativeAPIGatewayLLMTokenUsageStatistics.
|
|
874
1120
|
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewayLLMTokenUsageStatisticsRequest`
|
|
@@ -1168,8 +1414,8 @@ class CngwClient(AbstractClient):
|
|
|
1168
1414
|
|
|
1169
1415
|
def DescribeCloudNativeAPIGatewaySecretKey(self, request):
|
|
1170
1416
|
r"""查询密钥详情(SecretValue 字段会被掩码)。
|
|
1171
|
-
普通版批量新建密钥的生成来源扩展:新页面按需 IncludeCreationInfo=true,省略/false 保持原响应字段。原 GenerateType 不新增 Batch;批量记录仍为 System
|
|
1172
|
-
【消费者批量自动分配 API Key|修改:可选参数及可选出参】增加可选 IncludeCreationInfo(默认 false)。仅 true 且 ResourceType=Consumer 时在原 Result 增加 CredentialGenerateType、CreationSource、BatchId 三个非必返字段;省略/false 保持旧响应。原字段、SecretValue 脱敏和单条详情结构不变。
|
|
1417
|
+
普通版批量新建密钥的生成来源扩展:新页面按需 IncludeCreationInfo=true,省略/false 保持原响应字段。原 GenerateType 不新增 Batch;批量记录仍为 System。
|
|
1418
|
+
【消费者批量自动分配 API Key|修改:可选参数及可选出参】增加可选 IncludeCreationInfo(默认 false)。仅 true 且 ResourceType=Consumer 时在原 Result 增加 CredentialGenerateType、CreationSource、BatchId 三个非必返字段;省略/false 保持旧响应。原字段、SecretValue 脱敏和单条详情结构不变。
|
|
1173
1419
|
|
|
1174
1420
|
:param request: Request instance for DescribeCloudNativeAPIGatewaySecretKey.
|
|
1175
1421
|
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewaySecretKeyRequest`
|
|
@@ -1193,8 +1439,8 @@ class CngwClient(AbstractClient):
|
|
|
1193
1439
|
|
|
1194
1440
|
def DescribeCloudNativeAPIGatewaySecretKeyList(self, request):
|
|
1195
1441
|
r"""查询密钥列表。
|
|
1196
|
-
普通版批量新建密钥的生成来源扩展:新页面按需 IncludeCreationInfo=true,省略/false 保持原响应字段。原 GenerateType 不新增 Batch;批量记录仍为 System
|
|
1197
|
-
【消费者批量自动分配 API Key|修改:可选参数、可选出参及筛选】增加可选 IncludeCreationInfo(默认 false)。仅 true 且 ResourceType=Consumer 时在原 Result.SecretKeys[] 增加 CredentialGenerateType、CreationSource、BatchId 三个非必返字段;Result.TotalCount/SecretKeys 结构不变。Filters 新增 CredentialGenerateType、CreationSource,先过滤后计数分页,与是否返回来源字段独立;保留原 GenerateType 枚举和原分页上限。
|
|
1442
|
+
普通版批量新建密钥的生成来源扩展:新页面按需 IncludeCreationInfo=true,省略/false 保持原响应字段。原 GenerateType 不新增 Batch;批量记录仍为 System。
|
|
1443
|
+
【消费者批量自动分配 API Key|修改:可选参数、可选出参及筛选】增加可选 IncludeCreationInfo(默认 false)。仅 true 且 ResourceType=Consumer 时在原 Result.SecretKeys[] 增加 CredentialGenerateType、CreationSource、BatchId 三个非必返字段;Result.TotalCount/SecretKeys 结构不变。Filters 新增 CredentialGenerateType、CreationSource,先过滤后计数分页,与是否返回来源字段独立;保留原 GenerateType 枚举和原分页上限。
|
|
1198
1444
|
|
|
1199
1445
|
:param request: Request instance for DescribeCloudNativeAPIGatewaySecretKeyList.
|
|
1200
1446
|
:type request: :class:`tencentcloud.cngw.v20230418.models.DescribeCloudNativeAPIGatewaySecretKeyListRequest`
|
|
@@ -1239,6 +1485,58 @@ class CngwClient(AbstractClient):
|
|
|
1239
1485
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1240
1486
|
|
|
1241
1487
|
|
|
1488
|
+
def ExportAIGWCustomGuardrailHits(self, request):
|
|
1489
|
+
r"""从 RuntimeEventLog 对应 CLS 主题同步导出审核记录,需先开启投递。单次最多 1000 条,可选择 csv(默认)或 json;Result.Content 是 Base64 编码文件内容,不是下载链接。Truncated=true 时可能还有更多记录,请缩小时间范围分别导出。
|
|
1490
|
+
|
|
1491
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
1492
|
+
|
|
1493
|
+
:param request: Request instance for ExportAIGWCustomGuardrailHits.
|
|
1494
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.ExportAIGWCustomGuardrailHitsRequest`
|
|
1495
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.ExportAIGWCustomGuardrailHitsResponse`
|
|
1496
|
+
|
|
1497
|
+
"""
|
|
1498
|
+
try:
|
|
1499
|
+
params = request._serialize()
|
|
1500
|
+
headers = request.headers
|
|
1501
|
+
body = self.call("ExportAIGWCustomGuardrailHits", params, headers=headers)
|
|
1502
|
+
response = json.loads(body)
|
|
1503
|
+
model = models.ExportAIGWCustomGuardrailHitsResponse()
|
|
1504
|
+
model._deserialize(response["Response"])
|
|
1505
|
+
return model
|
|
1506
|
+
except Exception as e:
|
|
1507
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1508
|
+
raise
|
|
1509
|
+
else:
|
|
1510
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
def ModifyAIGWCustomGuardrailPolicy(self, request):
|
|
1514
|
+
r"""局部修改已有策略并重新同步。省略字段保留原值,显式 false/0/[] 与省略不同;数组按整体替换,Scope 传入时替换完整范围。切换 AddressMode 时会自动清除未显式传入的另一模式地址字段;AuthType=none 会清除已有密钥并默认清空 HeaderName。请检查 Result.Success 和 FailedResources。网关需满足最低版本 3.9.6,且已安装、启用并加载 cngw-ai-custom-guardrail。创建、修改、删除要求网关处于稳定 Running 状态,升级/回滚/撤销升级期间不能修改策略。
|
|
1515
|
+
|
|
1516
|
+
本产品为 cngw,版本为 2023-04-18。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
|
|
1517
|
+
|
|
1518
|
+
输入约束:新配置只接受 field_mapping,不再默认为 standard_v2。创建时鉴权和检测行为必须完整填写;修改为 PATCH,省略保留,显式空值不补默认值。存量 standard_v2 策略仍可查询、删除或直接停用;修改其判定配置或重新启用前需迁移到 field_mapping。条件必填由后端按完整配置校验,非法配置不写库、不下发。
|
|
1519
|
+
|
|
1520
|
+
:param request: Request instance for ModifyAIGWCustomGuardrailPolicy.
|
|
1521
|
+
:type request: :class:`tencentcloud.cngw.v20230418.models.ModifyAIGWCustomGuardrailPolicyRequest`
|
|
1522
|
+
:rtype: :class:`tencentcloud.cngw.v20230418.models.ModifyAIGWCustomGuardrailPolicyResponse`
|
|
1523
|
+
|
|
1524
|
+
"""
|
|
1525
|
+
try:
|
|
1526
|
+
params = request._serialize()
|
|
1527
|
+
headers = request.headers
|
|
1528
|
+
body = self.call("ModifyAIGWCustomGuardrailPolicy", params, headers=headers)
|
|
1529
|
+
response = json.loads(body)
|
|
1530
|
+
model = models.ModifyAIGWCustomGuardrailPolicyResponse()
|
|
1531
|
+
model._deserialize(response["Response"])
|
|
1532
|
+
return model
|
|
1533
|
+
except Exception as e:
|
|
1534
|
+
if isinstance(e, TencentCloudSDKException):
|
|
1535
|
+
raise
|
|
1536
|
+
else:
|
|
1537
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
1538
|
+
|
|
1539
|
+
|
|
1242
1540
|
def ModifyCloudNativeAPIGatewayAIServiceSource(self, request):
|
|
1243
1541
|
r"""修改云原生网关AI服务来源
|
|
1244
1542
|
|
|
@@ -1332,7 +1630,7 @@ class CngwClient(AbstractClient):
|
|
|
1332
1630
|
|
|
1333
1631
|
|
|
1334
1632
|
def ModifyCloudNativeAPIGatewayLLMModelService(self, request):
|
|
1335
|
-
r"""
|
|
1633
|
+
r"""更新指定网关实例内的 LLM 模型服务,可调整该服务向上游请求压缩响应的协商方式。
|
|
1336
1634
|
|
|
1337
1635
|
:param request: Request instance for ModifyCloudNativeAPIGatewayLLMModelService.
|
|
1338
1636
|
:type request: :class:`tencentcloud.cngw.v20230418.models.ModifyCloudNativeAPIGatewayLLMModelServiceRequest`
|
|
@@ -1563,7 +1861,7 @@ class CngwClient(AbstractClient):
|
|
|
1563
1861
|
|
|
1564
1862
|
def ModifyCloudNativeAPIGatewaySecretKey(self, request):
|
|
1565
1863
|
r"""修改AI网关密钥
|
|
1566
|
-
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,编辑返回 OperationDenied.BatchKeyPending,提示等待批次完成。其他情况继续原编辑校验和行为;原 GatewayId/SecretKeyId/Name/Description 不变,成功不新增业务 Result。
|
|
1864
|
+
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,编辑返回 OperationDenied.BatchKeyPending,提示等待批次完成。其他情况继续原编辑校验和行为;原 GatewayId/SecretKeyId/Name/Description 不变,成功不新增业务 Result。
|
|
1567
1865
|
|
|
1568
1866
|
:param request: Request instance for ModifyCloudNativeAPIGatewaySecretKey.
|
|
1569
1867
|
:type request: :class:`tencentcloud.cngw.v20230418.models.ModifyCloudNativeAPIGatewaySecretKeyRequest`
|
|
@@ -1656,7 +1954,7 @@ class CngwClient(AbstractClient):
|
|
|
1656
1954
|
|
|
1657
1955
|
def UnbindCloudNativeAPIGatewaySecretKey(self, request):
|
|
1658
1956
|
r"""解绑密钥
|
|
1659
|
-
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,解绑返回 OperationDenied.BatchKeyPending。完成后继续原解绑;原 GatewayId/SecretKeyId/ResourceType/ResourceIds 不变,成功不新增业务 Result。解绑不改写批次历史成功,后续批次明文读取返回逐项 OperationDenied.BindingChanged。
|
|
1957
|
+
【消费者批量自动分配 API Key|修改:新增未完成批次保护,字段不变】目标密钥属于批次且对应项处于 Pending/Running/Reconciling 时,解绑返回 OperationDenied.BatchKeyPending。完成后继续原解绑;原 GatewayId/SecretKeyId/ResourceType/ResourceIds 不变,成功不新增业务 Result。解绑不改写批次历史成功,后续批次明文读取返回逐项 OperationDenied.BindingChanged。
|
|
1660
1958
|
|
|
1661
1959
|
:param request: Request instance for UnbindCloudNativeAPIGatewaySecretKey.
|
|
1662
1960
|
:type request: :class:`tencentcloud.cngw.v20230418.models.UnbindCloudNativeAPIGatewaySecretKeyRequest`
|