tencentcloud-sdk-python-tokenhub 3.1.128__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.
Files changed (17) hide show
  1. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.py +1 -1
  3. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/errorcodes.py +3 -0
  5. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/models.py +136 -0
  6. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/tokenhub_client.py +96 -0
  7. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/tokenhub_client_async.py +76 -0
  8. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/PKG-INFO +2 -2
  9. tencentcloud_sdk_python_tokenhub-3.1.129/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +1 -0
  10. tencentcloud_sdk_python_tokenhub-3.1.128/tencentcloud_sdk_python_tokenhub.egg-info/requires.txt +0 -1
  11. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/README.rst +0 -0
  12. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/setup.cfg +0 -0
  13. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/__init__.py +0 -0
  14. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud/tokenhub/v20260322/__init__.py +0 -0
  15. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/tencentcloud_sdk_python_tokenhub.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_tokenhub-3.1.128 → tencentcloud_sdk_python_tokenhub-3.1.129}/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.128
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.128
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.129
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.128,<4.0.0"],
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',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.128'
17
+ __version__ = '3.1.129'
@@ -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
 
@@ -4948,6 +5016,74 @@ class ModelSpec(AbstractModel):
4948
5016
 
4949
5017
 
4950
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
+
4951
5087
  class ModifyGlossaryEntriesRequest(AbstractModel):
4952
5088
  r"""ModifyGlossaryEntries请求参数结构体
4953
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.128
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.128
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.129
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.129
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.128