tencentcloud-sdk-python-tokenhub 3.1.127__tar.gz → 3.1.129__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_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.py +1 -1
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/errorcodes.py +3 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/models.py +241 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/tokenhub_client.py +96 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/tokenhub_client_async.py +76 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_tokenhub-3.1.129/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_tokenhub-3.1.127/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/README.rst +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.cfg +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/__init__.py +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/__init__.py +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/top_level.txt +0 -0
{tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-tokenhub
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.129
|
|
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.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.129
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
{tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.py
RENAMED
|
@@ -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.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.129,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Tokenhub SDK for Python',
|
|
@@ -35,6 +35,9 @@ INVALIDPARAMETER_TOOMANYOBJECTS = 'InvalidParameter.TooManyObjects'
|
|
|
35
35
|
# InvalidParameterValue.InvalidParameterValue
|
|
36
36
|
INVALIDPARAMETERVALUE_INVALIDPARAMETERVALUE = 'InvalidParameterValue.InvalidParameterValue'
|
|
37
37
|
|
|
38
|
+
# 超过配额限制。
|
|
39
|
+
LIMITEXCEEDED = 'LimitExceeded'
|
|
40
|
+
|
|
38
41
|
# MissingParameter.MissingParameter
|
|
39
42
|
MISSINGPARAMETER_MISSINGPARAMETER = 'MissingParameter.MissingParameter'
|
|
40
43
|
|
|
@@ -451,6 +451,40 @@ class BindingItem(AbstractModel):
|
|
|
451
451
|
|
|
452
452
|
|
|
453
453
|
|
|
454
|
+
class CreateApiKeyRequest(AbstractModel):
|
|
455
|
+
r"""CreateApiKey请求参数结构体
|
|
456
|
+
|
|
457
|
+
"""
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
class CreateApiKeyResponse(AbstractModel):
|
|
461
|
+
r"""CreateApiKey返回参数结构体
|
|
462
|
+
|
|
463
|
+
"""
|
|
464
|
+
|
|
465
|
+
def __init__(self):
|
|
466
|
+
r"""
|
|
467
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
468
|
+
:type RequestId: str
|
|
469
|
+
"""
|
|
470
|
+
self._RequestId = None
|
|
471
|
+
|
|
472
|
+
@property
|
|
473
|
+
def RequestId(self):
|
|
474
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
475
|
+
:rtype: str
|
|
476
|
+
"""
|
|
477
|
+
return self._RequestId
|
|
478
|
+
|
|
479
|
+
@RequestId.setter
|
|
480
|
+
def RequestId(self, RequestId):
|
|
481
|
+
self._RequestId = RequestId
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
def _deserialize(self, params):
|
|
485
|
+
self._RequestId = params.get("RequestId")
|
|
486
|
+
|
|
487
|
+
|
|
454
488
|
class CreateApiKeysResultItem(AbstractModel):
|
|
455
489
|
r"""批量创建成功项
|
|
456
490
|
|
|
@@ -1086,6 +1120,40 @@ class CreateTokenPlanTeamOrderAndBuyResponse(AbstractModel):
|
|
|
1086
1120
|
self._RequestId = params.get("RequestId")
|
|
1087
1121
|
|
|
1088
1122
|
|
|
1123
|
+
class DeleteApiKeyRequest(AbstractModel):
|
|
1124
|
+
r"""DeleteApiKey请求参数结构体
|
|
1125
|
+
|
|
1126
|
+
"""
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
class DeleteApiKeyResponse(AbstractModel):
|
|
1130
|
+
r"""DeleteApiKey返回参数结构体
|
|
1131
|
+
|
|
1132
|
+
"""
|
|
1133
|
+
|
|
1134
|
+
def __init__(self):
|
|
1135
|
+
r"""
|
|
1136
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
1137
|
+
:type RequestId: str
|
|
1138
|
+
"""
|
|
1139
|
+
self._RequestId = None
|
|
1140
|
+
|
|
1141
|
+
@property
|
|
1142
|
+
def RequestId(self):
|
|
1143
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
1144
|
+
:rtype: str
|
|
1145
|
+
"""
|
|
1146
|
+
return self._RequestId
|
|
1147
|
+
|
|
1148
|
+
@RequestId.setter
|
|
1149
|
+
def RequestId(self, RequestId):
|
|
1150
|
+
self._RequestId = RequestId
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
def _deserialize(self, params):
|
|
1154
|
+
self._RequestId = params.get("RequestId")
|
|
1155
|
+
|
|
1156
|
+
|
|
1089
1157
|
class DeleteGlossaryEntriesRequest(AbstractModel):
|
|
1090
1158
|
r"""DeleteGlossaryEntries请求参数结构体
|
|
1091
1159
|
|
|
@@ -2225,6 +2293,111 @@ class DescribeModelListRequest(AbstractModel):
|
|
|
2225
2293
|
|
|
2226
2294
|
"""
|
|
2227
2295
|
|
|
2296
|
+
def __init__(self):
|
|
2297
|
+
r"""
|
|
2298
|
+
:param _ModelIds: <p>模型 ID 列表。最多支持 10 个,不支持重复。</p>
|
|
2299
|
+
:type ModelIds: list of str
|
|
2300
|
+
:param _ModelNames: <p>模型名称列表。最多支持 10 个,不支持重复。</p>
|
|
2301
|
+
:type ModelNames: list of str
|
|
2302
|
+
:param _ModelTypes: <p>模型类型列表,筛选指定类型的模型。最多支持 10 个,不支持重复。取值:Text(文本)、Vision(视觉)、Multimodal(多模态)、Speech(语音)、Embedding(向量)。</p>
|
|
2303
|
+
:type ModelTypes: list of str
|
|
2304
|
+
:param _Tags: <p>模型标签</p>
|
|
2305
|
+
:type Tags: list of str
|
|
2306
|
+
:param _Limit: <p>返回数量,默认为 20,最大值为 100。</p>
|
|
2307
|
+
:type Limit: int
|
|
2308
|
+
:param _Offset: <p>偏移量,默认为 0。</p>
|
|
2309
|
+
:type Offset: int
|
|
2310
|
+
"""
|
|
2311
|
+
self._ModelIds = None
|
|
2312
|
+
self._ModelNames = None
|
|
2313
|
+
self._ModelTypes = None
|
|
2314
|
+
self._Tags = None
|
|
2315
|
+
self._Limit = None
|
|
2316
|
+
self._Offset = None
|
|
2317
|
+
|
|
2318
|
+
@property
|
|
2319
|
+
def ModelIds(self):
|
|
2320
|
+
r"""<p>模型 ID 列表。最多支持 10 个,不支持重复。</p>
|
|
2321
|
+
:rtype: list of str
|
|
2322
|
+
"""
|
|
2323
|
+
return self._ModelIds
|
|
2324
|
+
|
|
2325
|
+
@ModelIds.setter
|
|
2326
|
+
def ModelIds(self, ModelIds):
|
|
2327
|
+
self._ModelIds = ModelIds
|
|
2328
|
+
|
|
2329
|
+
@property
|
|
2330
|
+
def ModelNames(self):
|
|
2331
|
+
r"""<p>模型名称列表。最多支持 10 个,不支持重复。</p>
|
|
2332
|
+
:rtype: list of str
|
|
2333
|
+
"""
|
|
2334
|
+
return self._ModelNames
|
|
2335
|
+
|
|
2336
|
+
@ModelNames.setter
|
|
2337
|
+
def ModelNames(self, ModelNames):
|
|
2338
|
+
self._ModelNames = ModelNames
|
|
2339
|
+
|
|
2340
|
+
@property
|
|
2341
|
+
def ModelTypes(self):
|
|
2342
|
+
r"""<p>模型类型列表,筛选指定类型的模型。最多支持 10 个,不支持重复。取值:Text(文本)、Vision(视觉)、Multimodal(多模态)、Speech(语音)、Embedding(向量)。</p>
|
|
2343
|
+
:rtype: list of str
|
|
2344
|
+
"""
|
|
2345
|
+
return self._ModelTypes
|
|
2346
|
+
|
|
2347
|
+
@ModelTypes.setter
|
|
2348
|
+
def ModelTypes(self, ModelTypes):
|
|
2349
|
+
self._ModelTypes = ModelTypes
|
|
2350
|
+
|
|
2351
|
+
@property
|
|
2352
|
+
def Tags(self):
|
|
2353
|
+
r"""<p>模型标签</p>
|
|
2354
|
+
:rtype: list of str
|
|
2355
|
+
"""
|
|
2356
|
+
return self._Tags
|
|
2357
|
+
|
|
2358
|
+
@Tags.setter
|
|
2359
|
+
def Tags(self, Tags):
|
|
2360
|
+
self._Tags = Tags
|
|
2361
|
+
|
|
2362
|
+
@property
|
|
2363
|
+
def Limit(self):
|
|
2364
|
+
r"""<p>返回数量,默认为 20,最大值为 100。</p>
|
|
2365
|
+
:rtype: int
|
|
2366
|
+
"""
|
|
2367
|
+
return self._Limit
|
|
2368
|
+
|
|
2369
|
+
@Limit.setter
|
|
2370
|
+
def Limit(self, Limit):
|
|
2371
|
+
self._Limit = Limit
|
|
2372
|
+
|
|
2373
|
+
@property
|
|
2374
|
+
def Offset(self):
|
|
2375
|
+
r"""<p>偏移量,默认为 0。</p>
|
|
2376
|
+
:rtype: int
|
|
2377
|
+
"""
|
|
2378
|
+
return self._Offset
|
|
2379
|
+
|
|
2380
|
+
@Offset.setter
|
|
2381
|
+
def Offset(self, Offset):
|
|
2382
|
+
self._Offset = Offset
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
def _deserialize(self, params):
|
|
2386
|
+
self._ModelIds = params.get("ModelIds")
|
|
2387
|
+
self._ModelNames = params.get("ModelNames")
|
|
2388
|
+
self._ModelTypes = params.get("ModelTypes")
|
|
2389
|
+
self._Tags = params.get("Tags")
|
|
2390
|
+
self._Limit = params.get("Limit")
|
|
2391
|
+
self._Offset = params.get("Offset")
|
|
2392
|
+
memeber_set = set(params.keys())
|
|
2393
|
+
for name, value in vars(self).items():
|
|
2394
|
+
property_name = name[1:]
|
|
2395
|
+
if property_name in memeber_set:
|
|
2396
|
+
memeber_set.remove(property_name)
|
|
2397
|
+
if len(memeber_set) > 0:
|
|
2398
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
|
2399
|
+
|
|
2400
|
+
|
|
2228
2401
|
|
|
2229
2402
|
class DescribeModelListResponse(AbstractModel):
|
|
2230
2403
|
r"""DescribeModelList返回参数结构体
|
|
@@ -4843,6 +5016,74 @@ class ModelSpec(AbstractModel):
|
|
|
4843
5016
|
|
|
4844
5017
|
|
|
4845
5018
|
|
|
5019
|
+
class ModifyApiKeyInfoRequest(AbstractModel):
|
|
5020
|
+
r"""ModifyApiKeyInfo请求参数结构体
|
|
5021
|
+
|
|
5022
|
+
"""
|
|
5023
|
+
|
|
5024
|
+
|
|
5025
|
+
class ModifyApiKeyInfoResponse(AbstractModel):
|
|
5026
|
+
r"""ModifyApiKeyInfo返回参数结构体
|
|
5027
|
+
|
|
5028
|
+
"""
|
|
5029
|
+
|
|
5030
|
+
def __init__(self):
|
|
5031
|
+
r"""
|
|
5032
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
5033
|
+
:type RequestId: str
|
|
5034
|
+
"""
|
|
5035
|
+
self._RequestId = None
|
|
5036
|
+
|
|
5037
|
+
@property
|
|
5038
|
+
def RequestId(self):
|
|
5039
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
5040
|
+
:rtype: str
|
|
5041
|
+
"""
|
|
5042
|
+
return self._RequestId
|
|
5043
|
+
|
|
5044
|
+
@RequestId.setter
|
|
5045
|
+
def RequestId(self, RequestId):
|
|
5046
|
+
self._RequestId = RequestId
|
|
5047
|
+
|
|
5048
|
+
|
|
5049
|
+
def _deserialize(self, params):
|
|
5050
|
+
self._RequestId = params.get("RequestId")
|
|
5051
|
+
|
|
5052
|
+
|
|
5053
|
+
class ModifyApiKeyStatusRequest(AbstractModel):
|
|
5054
|
+
r"""ModifyApiKeyStatus请求参数结构体
|
|
5055
|
+
|
|
5056
|
+
"""
|
|
5057
|
+
|
|
5058
|
+
|
|
5059
|
+
class ModifyApiKeyStatusResponse(AbstractModel):
|
|
5060
|
+
r"""ModifyApiKeyStatus返回参数结构体
|
|
5061
|
+
|
|
5062
|
+
"""
|
|
5063
|
+
|
|
5064
|
+
def __init__(self):
|
|
5065
|
+
r"""
|
|
5066
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
5067
|
+
:type RequestId: str
|
|
5068
|
+
"""
|
|
5069
|
+
self._RequestId = None
|
|
5070
|
+
|
|
5071
|
+
@property
|
|
5072
|
+
def RequestId(self):
|
|
5073
|
+
r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
5074
|
+
:rtype: str
|
|
5075
|
+
"""
|
|
5076
|
+
return self._RequestId
|
|
5077
|
+
|
|
5078
|
+
@RequestId.setter
|
|
5079
|
+
def RequestId(self, RequestId):
|
|
5080
|
+
self._RequestId = RequestId
|
|
5081
|
+
|
|
5082
|
+
|
|
5083
|
+
def _deserialize(self, params):
|
|
5084
|
+
self._RequestId = params.get("RequestId")
|
|
5085
|
+
|
|
5086
|
+
|
|
4846
5087
|
class ModifyGlossaryEntriesRequest(AbstractModel):
|
|
4847
5088
|
r"""ModifyGlossaryEntries请求参数结构体
|
|
4848
5089
|
|
|
@@ -26,6 +26,31 @@ class TokenhubClient(AbstractClient):
|
|
|
26
26
|
_service = 'tokenhub'
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
def CreateApiKey(self, request):
|
|
30
|
+
r"""创建 API 密钥。
|
|
31
|
+
|
|
32
|
+
创建一个新的 API 密钥,创建成功后返回 API 密钥 ID。需指定平台类型、绑定方式和初始状态。
|
|
33
|
+
|
|
34
|
+
:param request: Request instance for CreateApiKey.
|
|
35
|
+
:type request: :class:`tencentcloud.tokenhub.v20260322.models.CreateApiKeyRequest`
|
|
36
|
+
:rtype: :class:`tencentcloud.tokenhub.v20260322.models.CreateApiKeyResponse`
|
|
37
|
+
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
headers = request.headers
|
|
42
|
+
body = self.call("CreateApiKey", params, headers=headers)
|
|
43
|
+
response = json.loads(body)
|
|
44
|
+
model = models.CreateApiKeyResponse()
|
|
45
|
+
model._deserialize(response["Response"])
|
|
46
|
+
return model
|
|
47
|
+
except Exception as e:
|
|
48
|
+
if isinstance(e, TencentCloudSDKException):
|
|
49
|
+
raise
|
|
50
|
+
else:
|
|
51
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
52
|
+
|
|
53
|
+
|
|
29
54
|
def CreateGlossary(self, request):
|
|
30
55
|
r"""创建术语库。
|
|
31
56
|
|
|
@@ -126,6 +151,29 @@ class TokenhubClient(AbstractClient):
|
|
|
126
151
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
127
152
|
|
|
128
153
|
|
|
154
|
+
def DeleteApiKey(self, request):
|
|
155
|
+
r"""删除指定的 API 密钥,同时清理关联的模型绑定关系。
|
|
156
|
+
|
|
157
|
+
:param request: Request instance for DeleteApiKey.
|
|
158
|
+
:type request: :class:`tencentcloud.tokenhub.v20260322.models.DeleteApiKeyRequest`
|
|
159
|
+
:rtype: :class:`tencentcloud.tokenhub.v20260322.models.DeleteApiKeyResponse`
|
|
160
|
+
|
|
161
|
+
"""
|
|
162
|
+
try:
|
|
163
|
+
params = request._serialize()
|
|
164
|
+
headers = request.headers
|
|
165
|
+
body = self.call("DeleteApiKey", params, headers=headers)
|
|
166
|
+
response = json.loads(body)
|
|
167
|
+
model = models.DeleteApiKeyResponse()
|
|
168
|
+
model._deserialize(response["Response"])
|
|
169
|
+
return model
|
|
170
|
+
except Exception as e:
|
|
171
|
+
if isinstance(e, TencentCloudSDKException):
|
|
172
|
+
raise
|
|
173
|
+
else:
|
|
174
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
175
|
+
|
|
176
|
+
|
|
129
177
|
def DeleteGlossary(self, request):
|
|
130
178
|
r"""删除术语库。
|
|
131
179
|
|
|
@@ -509,6 +557,54 @@ class TokenhubClient(AbstractClient):
|
|
|
509
557
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
510
558
|
|
|
511
559
|
|
|
560
|
+
def ModifyApiKeyInfo(self, request):
|
|
561
|
+
r"""更新 API 密钥信息。
|
|
562
|
+
|
|
563
|
+
更新 API 密钥的备注信息、 IP 白名单和 Token 限额(修改限额推荐使用QuotaDesired参数)。所有可选参数不传表示不修改。
|
|
564
|
+
|
|
565
|
+
:param request: Request instance for ModifyApiKeyInfo.
|
|
566
|
+
:type request: :class:`tencentcloud.tokenhub.v20260322.models.ModifyApiKeyInfoRequest`
|
|
567
|
+
:rtype: :class:`tencentcloud.tokenhub.v20260322.models.ModifyApiKeyInfoResponse`
|
|
568
|
+
|
|
569
|
+
"""
|
|
570
|
+
try:
|
|
571
|
+
params = request._serialize()
|
|
572
|
+
headers = request.headers
|
|
573
|
+
body = self.call("ModifyApiKeyInfo", params, headers=headers)
|
|
574
|
+
response = json.loads(body)
|
|
575
|
+
model = models.ModifyApiKeyInfoResponse()
|
|
576
|
+
model._deserialize(response["Response"])
|
|
577
|
+
return model
|
|
578
|
+
except Exception as e:
|
|
579
|
+
if isinstance(e, TencentCloudSDKException):
|
|
580
|
+
raise
|
|
581
|
+
else:
|
|
582
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
def ModifyApiKeyStatus(self, request):
|
|
586
|
+
r"""更新 API 密钥的启用或禁用状态。
|
|
587
|
+
|
|
588
|
+
:param request: Request instance for ModifyApiKeyStatus.
|
|
589
|
+
:type request: :class:`tencentcloud.tokenhub.v20260322.models.ModifyApiKeyStatusRequest`
|
|
590
|
+
:rtype: :class:`tencentcloud.tokenhub.v20260322.models.ModifyApiKeyStatusResponse`
|
|
591
|
+
|
|
592
|
+
"""
|
|
593
|
+
try:
|
|
594
|
+
params = request._serialize()
|
|
595
|
+
headers = request.headers
|
|
596
|
+
body = self.call("ModifyApiKeyStatus", params, headers=headers)
|
|
597
|
+
response = json.loads(body)
|
|
598
|
+
model = models.ModifyApiKeyStatusResponse()
|
|
599
|
+
model._deserialize(response["Response"])
|
|
600
|
+
return model
|
|
601
|
+
except Exception as e:
|
|
602
|
+
if isinstance(e, TencentCloudSDKException):
|
|
603
|
+
raise
|
|
604
|
+
else:
|
|
605
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
606
|
+
|
|
607
|
+
|
|
512
608
|
def ModifyGlossaryEntries(self, request):
|
|
513
609
|
r"""批量修改术语条目。
|
|
514
610
|
|
|
@@ -25,6 +25,26 @@ class TokenhubClient(AbstractClient):
|
|
|
25
25
|
_endpoint = 'tokenhub.tencentcloudapi.com'
|
|
26
26
|
_service = 'tokenhub'
|
|
27
27
|
|
|
28
|
+
async def CreateApiKey(
|
|
29
|
+
self,
|
|
30
|
+
request: models.CreateApiKeyRequest,
|
|
31
|
+
opts: Dict = None,
|
|
32
|
+
) -> models.CreateApiKeyResponse:
|
|
33
|
+
"""
|
|
34
|
+
创建 API 密钥。
|
|
35
|
+
|
|
36
|
+
创建一个新的 API 密钥,创建成功后返回 API 密钥 ID。需指定平台类型、绑定方式和初始状态。
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
kwargs = {}
|
|
40
|
+
kwargs["action"] = "CreateApiKey"
|
|
41
|
+
kwargs["params"] = request._serialize()
|
|
42
|
+
kwargs["resp_cls"] = models.CreateApiKeyResponse
|
|
43
|
+
kwargs["headers"] = request.headers
|
|
44
|
+
kwargs["opts"] = opts or {}
|
|
45
|
+
|
|
46
|
+
return await self.call_and_deserialize(**kwargs)
|
|
47
|
+
|
|
28
48
|
async def CreateGlossary(
|
|
29
49
|
self,
|
|
30
50
|
request: models.CreateGlossaryRequest,
|
|
@@ -105,6 +125,24 @@ class TokenhubClient(AbstractClient):
|
|
|
105
125
|
|
|
106
126
|
return await self.call_and_deserialize(**kwargs)
|
|
107
127
|
|
|
128
|
+
async def DeleteApiKey(
|
|
129
|
+
self,
|
|
130
|
+
request: models.DeleteApiKeyRequest,
|
|
131
|
+
opts: Dict = None,
|
|
132
|
+
) -> models.DeleteApiKeyResponse:
|
|
133
|
+
"""
|
|
134
|
+
删除指定的 API 密钥,同时清理关联的模型绑定关系。
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
kwargs = {}
|
|
138
|
+
kwargs["action"] = "DeleteApiKey"
|
|
139
|
+
kwargs["params"] = request._serialize()
|
|
140
|
+
kwargs["resp_cls"] = models.DeleteApiKeyResponse
|
|
141
|
+
kwargs["headers"] = request.headers
|
|
142
|
+
kwargs["opts"] = opts or {}
|
|
143
|
+
|
|
144
|
+
return await self.call_and_deserialize(**kwargs)
|
|
145
|
+
|
|
108
146
|
async def DeleteGlossary(
|
|
109
147
|
self,
|
|
110
148
|
request: models.DeleteGlossaryRequest,
|
|
@@ -413,6 +451,44 @@ class TokenhubClient(AbstractClient):
|
|
|
413
451
|
|
|
414
452
|
return await self.call_and_deserialize(**kwargs)
|
|
415
453
|
|
|
454
|
+
async def ModifyApiKeyInfo(
|
|
455
|
+
self,
|
|
456
|
+
request: models.ModifyApiKeyInfoRequest,
|
|
457
|
+
opts: Dict = None,
|
|
458
|
+
) -> models.ModifyApiKeyInfoResponse:
|
|
459
|
+
"""
|
|
460
|
+
更新 API 密钥信息。
|
|
461
|
+
|
|
462
|
+
更新 API 密钥的备注信息、 IP 白名单和 Token 限额(修改限额推荐使用QuotaDesired参数)。所有可选参数不传表示不修改。
|
|
463
|
+
"""
|
|
464
|
+
|
|
465
|
+
kwargs = {}
|
|
466
|
+
kwargs["action"] = "ModifyApiKeyInfo"
|
|
467
|
+
kwargs["params"] = request._serialize()
|
|
468
|
+
kwargs["resp_cls"] = models.ModifyApiKeyInfoResponse
|
|
469
|
+
kwargs["headers"] = request.headers
|
|
470
|
+
kwargs["opts"] = opts or {}
|
|
471
|
+
|
|
472
|
+
return await self.call_and_deserialize(**kwargs)
|
|
473
|
+
|
|
474
|
+
async def ModifyApiKeyStatus(
|
|
475
|
+
self,
|
|
476
|
+
request: models.ModifyApiKeyStatusRequest,
|
|
477
|
+
opts: Dict = None,
|
|
478
|
+
) -> models.ModifyApiKeyStatusResponse:
|
|
479
|
+
"""
|
|
480
|
+
更新 API 密钥的启用或禁用状态。
|
|
481
|
+
"""
|
|
482
|
+
|
|
483
|
+
kwargs = {}
|
|
484
|
+
kwargs["action"] = "ModifyApiKeyStatus"
|
|
485
|
+
kwargs["params"] = request._serialize()
|
|
486
|
+
kwargs["resp_cls"] = models.ModifyApiKeyStatusResponse
|
|
487
|
+
kwargs["headers"] = request.headers
|
|
488
|
+
kwargs["opts"] = opts or {}
|
|
489
|
+
|
|
490
|
+
return await self.call_and_deserialize(**kwargs)
|
|
491
|
+
|
|
416
492
|
async def ModifyGlossaryEntries(
|
|
417
493
|
self,
|
|
418
494
|
request: models.ModifyGlossaryEntriesRequest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-tokenhub
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.129
|
|
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.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.129
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
tencentcloud_sdk_python_tokenhub-3.1.129/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tencentcloud-sdk-python-common<4.0.0,>=3.1.129
|
tencentcloud_sdk_python_tokenhub-3.1.127/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tencentcloud-sdk-python-common<4.0.0,>=3.1.127
|
{tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/README.rst
RENAMED
|
File without changes
|
{tencentcloud_sdk_python_tokenhub-3.1.127 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|