tencentcloud-sdk-python-hai 3.1.38__tar.gz → 3.1.40__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_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/PKG-INFO +2 -2
  2. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/setup.py +1 -1
  3. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/__init__.py +1 -1
  4. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/v20230812/errorcodes.py +12 -0
  5. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/v20230812/hai_client.py +23 -0
  6. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/v20230812/hai_client_async.py +18 -0
  7. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/v20230812/models.py +79 -0
  8. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud_sdk_python_hai.egg-info/PKG-INFO +2 -2
  9. tencentcloud_sdk_python_hai-3.1.40/tencentcloud_sdk_python_hai.egg-info/requires.txt +1 -0
  10. tencentcloud_sdk_python_hai-3.1.38/tencentcloud_sdk_python_hai.egg-info/requires.txt +0 -1
  11. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/README.rst +0 -0
  12. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/setup.cfg +0 -0
  13. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/__init__.py +0 -0
  14. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud/hai/v20230812/__init__.py +0 -0
  15. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud_sdk_python_hai.egg-info/SOURCES.txt +0 -0
  16. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud_sdk_python_hai.egg-info/dependency_links.txt +0 -0
  17. {tencentcloud_sdk_python_hai-3.1.38 → tencentcloud_sdk_python_hai-3.1.40}/tencentcloud_sdk_python_hai.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-hai
3
- Version: 3.1.38
3
+ Version: 3.1.40
4
4
  Summary: Tencent Cloud Hai 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.38
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.40
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-hai',
11
- install_requires=["tencentcloud-sdk-python-common>=3.1.38,<4.0.0"],
11
+ install_requires=["tencentcloud-sdk-python-common>=3.1.40,<4.0.0"],
12
12
 
13
13
  version=tencentcloud.__version__,
14
14
  description='Tencent Cloud Hai SDK for Python',
@@ -14,4 +14,4 @@
14
14
  # limitations under the License.
15
15
 
16
16
 
17
- __version__ = '3.1.38'
17
+ __version__ = '3.1.40'
@@ -98,18 +98,27 @@ INVALIDPARAMETERVALUE_INVALIDPASSWORD = 'InvalidParameterValue.InvalidPassword'
98
98
  # 场景ID格式非法
99
99
  INVALIDPARAMETERVALUE_INVALIDSCENEIDMALFORMED = 'InvalidParameterValue.InvalidSceneIdMalformed'
100
100
 
101
+ # 服务ID格式错误
102
+ INVALIDPARAMETERVALUE_INVALIDSERVICEIDMALFORMED = 'InvalidParameterValue.InvalidServiceIdMalformed'
103
+
101
104
  # 地域非法
102
105
  INVALIDPARAMETERVALUE_REGIONINVALID = 'InvalidParameterValue.RegionInvalid'
103
106
 
104
107
  # 无法找到指定的安全组
105
108
  INVALIDPARAMETERVALUE_SECURITYGROUPNOTFOUND = 'InvalidParameterValue.SecurityGroupNotFound'
106
109
 
110
+ # 服务ID不存在
111
+ INVALIDPARAMETERVALUE_SERVICEIDNOTFOUND = 'InvalidParameterValue.ServiceIdNotFound'
112
+
107
113
  # 入参中若存在子网ID,则必须同时存在VPC ID。
108
114
  INVALIDPARAMETERVALUE_SUBNETMUSTCOEXISTWITHVPC = 'InvalidParameterValue.SubnetMustCoexistWithVpc'
109
115
 
110
116
  # 无法找到指定的子网,或该子网不属于指定的VPC
111
117
  INVALIDPARAMETERVALUE_SUBNETNOTFOUND = 'InvalidParameterValue.SubnetNotFound'
112
118
 
119
+ # 目标副本数不能与运行中副本数相同
120
+ INVALIDPARAMETERVALUE_TARGETREPLICASMUSTDIFFERFROMRUNNINGREPLICAS = 'InvalidParameterValue.TargetReplicasMustDifferFromRunningReplicas'
121
+
113
122
  # 无法找到指定的VPC
114
123
  INVALIDPARAMETERVALUE_VPCNOTFOUND = 'InvalidParameterValue.VpcNotFound'
115
124
 
@@ -122,6 +131,9 @@ LIMITEXCEEDED_VPCLIMITEXCEEDED = 'LimitExceeded.VpcLimitExceeded'
122
131
  # 指定实例有正在执行的操作,不能执行新的操作
123
132
  OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = 'OperationDenied.InstanceOperationInProgress'
124
133
 
134
+ # 指定服务有正在执行的操作,不能执行新的操作
135
+ OPERATIONDENIED_SERVICEOPERATIONINPROGRESS = 'OperationDenied.ServiceOperationInProgress'
136
+
125
137
  # 指定的算力套餐库存不足
126
138
  RESOURCEINSUFFICIENT_BUNDLEINVENTORYSHORTAGE = 'ResourceInsufficient.BundleInventoryShortage'
127
139
 
@@ -389,6 +389,29 @@ class HaiClient(AbstractClient):
389
389
  model = models.TerminateInstancesResponse()
390
390
  model._deserialize(response["Response"])
391
391
  return model
392
+ except Exception as e:
393
+ if isinstance(e, TencentCloudSDKException):
394
+ raise
395
+ else:
396
+ raise TencentCloudSDKException(type(e).__name__, str(e))
397
+
398
+
399
+ def UpdateServiceConfigs(self, request):
400
+ r"""本接口(UpdateServiceConfigs)用于更新服务配置
401
+
402
+ :param request: Request instance for UpdateServiceConfigs.
403
+ :type request: :class:`tencentcloud.hai.v20230812.models.UpdateServiceConfigsRequest`
404
+ :rtype: :class:`tencentcloud.hai.v20230812.models.UpdateServiceConfigsResponse`
405
+
406
+ """
407
+ try:
408
+ params = request._serialize()
409
+ headers = request.headers
410
+ body = self.call("UpdateServiceConfigs", params, headers=headers)
411
+ response = json.loads(body)
412
+ model = models.UpdateServiceConfigsResponse()
413
+ model._deserialize(response["Response"])
414
+ return model
392
415
  except Exception as e:
393
416
  if isinstance(e, TencentCloudSDKException):
394
417
  raise
@@ -313,4 +313,22 @@ class HaiClient(AbstractClient):
313
313
  kwargs["headers"] = request.headers
314
314
  kwargs["opts"] = opts or {}
315
315
 
316
+ return await self.call_and_deserialize(**kwargs)
317
+
318
+ async def UpdateServiceConfigs(
319
+ self,
320
+ request: models.UpdateServiceConfigsRequest,
321
+ opts: Dict = None,
322
+ ) -> models.UpdateServiceConfigsResponse:
323
+ """
324
+ 本接口(UpdateServiceConfigs)用于更新服务配置
325
+ """
326
+
327
+ kwargs = {}
328
+ kwargs["action"] = "UpdateServiceConfigs"
329
+ kwargs["params"] = request._serialize()
330
+ kwargs["resp_cls"] = models.UpdateServiceConfigsResponse
331
+ kwargs["headers"] = request.headers
332
+ kwargs["opts"] = opts or {}
333
+
316
334
  return await self.call_and_deserialize(**kwargs)
@@ -3443,5 +3443,84 @@ class TerminateInstancesResponse(AbstractModel):
3443
3443
  self._RequestId = RequestId
3444
3444
 
3445
3445
 
3446
+ def _deserialize(self, params):
3447
+ self._RequestId = params.get("RequestId")
3448
+
3449
+
3450
+ class UpdateServiceConfigsRequest(AbstractModel):
3451
+ r"""UpdateServiceConfigs请求参数结构体
3452
+
3453
+ """
3454
+
3455
+ def __init__(self):
3456
+ r"""
3457
+ :param _ServiceId: 服务ID
3458
+ :type ServiceId: str
3459
+ :param _TargetReplicas: 期望副本数
3460
+ :type TargetReplicas: int
3461
+ """
3462
+ self._ServiceId = None
3463
+ self._TargetReplicas = None
3464
+
3465
+ @property
3466
+ def ServiceId(self):
3467
+ r"""服务ID
3468
+ :rtype: str
3469
+ """
3470
+ return self._ServiceId
3471
+
3472
+ @ServiceId.setter
3473
+ def ServiceId(self, ServiceId):
3474
+ self._ServiceId = ServiceId
3475
+
3476
+ @property
3477
+ def TargetReplicas(self):
3478
+ r"""期望副本数
3479
+ :rtype: int
3480
+ """
3481
+ return self._TargetReplicas
3482
+
3483
+ @TargetReplicas.setter
3484
+ def TargetReplicas(self, TargetReplicas):
3485
+ self._TargetReplicas = TargetReplicas
3486
+
3487
+
3488
+ def _deserialize(self, params):
3489
+ self._ServiceId = params.get("ServiceId")
3490
+ self._TargetReplicas = params.get("TargetReplicas")
3491
+ memeber_set = set(params.keys())
3492
+ for name, value in vars(self).items():
3493
+ property_name = name[1:]
3494
+ if property_name in memeber_set:
3495
+ memeber_set.remove(property_name)
3496
+ if len(memeber_set) > 0:
3497
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
3498
+
3499
+
3500
+
3501
+ class UpdateServiceConfigsResponse(AbstractModel):
3502
+ r"""UpdateServiceConfigs返回参数结构体
3503
+
3504
+ """
3505
+
3506
+ def __init__(self):
3507
+ r"""
3508
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3509
+ :type RequestId: str
3510
+ """
3511
+ self._RequestId = None
3512
+
3513
+ @property
3514
+ def RequestId(self):
3515
+ r"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
3516
+ :rtype: str
3517
+ """
3518
+ return self._RequestId
3519
+
3520
+ @RequestId.setter
3521
+ def RequestId(self, RequestId):
3522
+ self._RequestId = RequestId
3523
+
3524
+
3446
3525
  def _deserialize(self, params):
3447
3526
  self._RequestId = params.get("RequestId")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tencentcloud-sdk-python-hai
3
- Version: 3.1.38
3
+ Version: 3.1.40
4
4
  Summary: Tencent Cloud Hai 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.38
18
+ Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.40
19
19
 
20
20
  ============================
21
21
  Tencent Cloud SDK for Python
@@ -0,0 +1 @@
1
+ tencentcloud-sdk-python-common<4.0.0,>=3.1.40
@@ -1 +0,0 @@
1
- tencentcloud-sdk-python-common<4.0.0,>=3.1.38