tccli 3.0.1286.1__py2.py3-none-any.whl → 3.0.1287.1__py2.py3-none-any.whl

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 (31) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/autoscaling_client.py +53 -0
  3. tccli/services/autoscaling/v20180419/api.json +53 -0
  4. tccli/services/autoscaling/v20180419/examples.json +8 -0
  5. tccli/services/cdc/v20201214/api.json +107 -97
  6. tccli/services/cdwch/v20200915/api.json +70 -2
  7. tccli/services/cdwch/v20200915/examples.json +2 -2
  8. tccli/services/cdz/v20221123/api.json +10 -10
  9. tccli/services/cynosdb/v20190107/api.json +298 -298
  10. tccli/services/dbbrain/v20210527/api.json +11 -2
  11. tccli/services/hunyuan/hunyuan_client.py +53 -0
  12. tccli/services/hunyuan/v20230901/api.json +284 -0
  13. tccli/services/hunyuan/v20230901/examples.json +8 -0
  14. tccli/services/lcic/v20220817/api.json +2 -2
  15. tccli/services/lighthouse/v20200324/api.json +47 -47
  16. tccli/services/lke/v20231130/api.json +6 -6
  17. tccli/services/ocr/v20181119/api.json +36 -0
  18. tccli/services/ssl/v20191205/api.json +317 -317
  19. tccli/services/ssl/v20191205/examples.json +6 -6
  20. tccli/services/tat/v20201028/examples.json +1 -1
  21. tccli/services/tchd/tchd_client.py +53 -0
  22. tccli/services/tchd/v20230306/api.json +89 -0
  23. tccli/services/tchd/v20230306/examples.json +8 -0
  24. tccli/services/tdmq/v20200217/api.json +1 -1
  25. tccli/services/wedata/v20210820/api.json +124 -204
  26. tccli/services/wedata/v20210820/examples.json +7 -1
  27. {tccli-3.0.1286.1.dist-info → tccli-3.0.1287.1.dist-info}/METADATA +2 -2
  28. {tccli-3.0.1286.1.dist-info → tccli-3.0.1287.1.dist-info}/RECORD +31 -31
  29. {tccli-3.0.1286.1.dist-info → tccli-3.0.1287.1.dist-info}/WHEEL +0 -0
  30. {tccli-3.0.1286.1.dist-info → tccli-3.0.1287.1.dist-info}/entry_points.txt +0 -0
  31. {tccli-3.0.1286.1.dist-info → tccli-3.0.1287.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1286.1'
1
+ __version__ = '3.0.1287.1'
@@ -2201,6 +2201,58 @@ def doDescribeLaunchConfigurations(args, parsed_globals):
2201
2201
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2202
 
2203
2203
 
2204
+ def doEnterStandby(args, parsed_globals):
2205
+ g_param = parse_global_arg(parsed_globals)
2206
+
2207
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2208
+ cred = credential.CVMRoleCredential()
2209
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2210
+ cred = credential.STSAssumeRoleCredential(
2211
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2212
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2213
+ )
2214
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2215
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2216
+ else:
2217
+ cred = credential.Credential(
2218
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2219
+ )
2220
+ http_profile = HttpProfile(
2221
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2222
+ reqMethod="POST",
2223
+ endpoint=g_param[OptionsDefine.Endpoint],
2224
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2225
+ )
2226
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2227
+ if g_param[OptionsDefine.Language]:
2228
+ profile.language = g_param[OptionsDefine.Language]
2229
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2230
+ client = mod.AutoscalingClient(cred, g_param[OptionsDefine.Region], profile)
2231
+ client._sdkVersion += ("_CLI_" + __version__)
2232
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2233
+ model = models.EnterStandbyRequest()
2234
+ model.from_json_string(json.dumps(args))
2235
+ start_time = time.time()
2236
+ while True:
2237
+ rsp = client.EnterStandby(model)
2238
+ result = rsp.to_json_string()
2239
+ try:
2240
+ json_obj = json.loads(result)
2241
+ except TypeError as e:
2242
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2243
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2244
+ break
2245
+ cur_time = time.time()
2246
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2247
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2248
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2249
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2250
+ else:
2251
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2252
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2253
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
+
2255
+
2204
2256
  def doCreateScalingPolicy(args, parsed_globals):
2205
2257
  g_param = parse_global_arg(parsed_globals)
2206
2258
 
@@ -3034,6 +3086,7 @@ ACTION_MAP = {
3034
3086
  "UpgradeLifecycleHook": doUpgradeLifecycleHook,
3035
3087
  "DisableAutoScalingGroup": doDisableAutoScalingGroup,
3036
3088
  "DescribeLaunchConfigurations": doDescribeLaunchConfigurations,
3089
+ "EnterStandby": doEnterStandby,
3037
3090
  "CreateScalingPolicy": doCreateScalingPolicy,
3038
3091
  "DeleteLaunchConfiguration": doDeleteLaunchConfiguration,
3039
3092
  "DeleteLifecycleHook": doDeleteLifecycleHook,
@@ -238,6 +238,13 @@
238
238
  "output": "EnableAutoScalingGroupResponse",
239
239
  "status": "online"
240
240
  },
241
+ "EnterStandby": {
242
+ "document": "伸缩组内实例进入备用中状态。\n* 备用中状态实例的 CLB 权重值为 0,不会被自动缩容、不健康替换、实例刷新操作选中\n* 调用弹性伸缩开关机接口会使得备用中状态发生变化,而云服务器开关机接口不会影响\n* 实例进入备用中状态后,伸缩组会尝试下调期望实例数,新期望数不会小于最小值",
243
+ "input": "EnterStandbyRequest",
244
+ "name": "实例进入备用中状态",
245
+ "output": "EnterStandbyResponse",
246
+ "status": "online"
247
+ },
241
248
  "ExecuteScalingPolicy": {
242
249
  "document": "本接口(ExecuteScalingPolicy)用于执行伸缩策略。\n\n* 可以根据伸缩策略ID执行伸缩策略。\n* 伸缩策略所属伸缩组处于伸缩活动时,会拒绝执行伸缩策略。\n* 本接口不支持执行目标追踪策略。",
243
250
  "input": "ExecuteScalingPolicyRequest",
@@ -3760,6 +3767,52 @@
3760
3767
  ],
3761
3768
  "usage": "both"
3762
3769
  },
3770
+ "EnterStandbyRequest": {
3771
+ "document": "EnterStandby请求参数结构体",
3772
+ "members": [
3773
+ {
3774
+ "disabled": false,
3775
+ "document": "伸缩组 ID。",
3776
+ "example": "asg-boz1qhnk",
3777
+ "member": "string",
3778
+ "name": "AutoScalingGroupId",
3779
+ "required": true,
3780
+ "type": "string"
3781
+ },
3782
+ {
3783
+ "disabled": false,
3784
+ "document": "运行中状态实例列表,不支持传入非运行中状态实例。",
3785
+ "example": "[\"ins-cri8d02t\",\"ins-osckfnm7\"]",
3786
+ "member": "string",
3787
+ "name": "InstanceIds",
3788
+ "required": true,
3789
+ "type": "list"
3790
+ }
3791
+ ],
3792
+ "type": "object"
3793
+ },
3794
+ "EnterStandbyResponse": {
3795
+ "document": "EnterStandby返回参数结构体",
3796
+ "members": [
3797
+ {
3798
+ "disabled": false,
3799
+ "document": "伸缩活动ID。",
3800
+ "example": "asa-q59zikez",
3801
+ "member": "string",
3802
+ "name": "ActivityId",
3803
+ "output_required": true,
3804
+ "type": "string",
3805
+ "value_allowed_null": false
3806
+ },
3807
+ {
3808
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3809
+ "member": "string",
3810
+ "name": "RequestId",
3811
+ "type": "string"
3812
+ }
3813
+ ],
3814
+ "type": "object"
3815
+ },
3763
3816
  "ExecuteScalingPolicyRequest": {
3764
3817
  "document": "ExecuteScalingPolicy请求参数结构体",
3765
3818
  "members": [
@@ -386,6 +386,14 @@
386
386
  "title": "启用指定伸缩组"
387
387
  }
388
388
  ],
389
+ "EnterStandby": [
390
+ {
391
+ "document": "伸缩组 asg-boz1qhnk 中实例 ins-osckfnm7, ins-cri8d02t 进入备用中状态",
392
+ "input": "POST / HTTP/1.1\nHost: as.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: EnterStandby\n<公共请求参数>\n\n{\n \"AutoScalingGroupId\": \"asg-boz1qhnk\",\n \"InstanceIds\": [\n \"ins-osckfnm7\",\n \"ins-cri8d02t\"\n ]\n}",
393
+ "output": "{\n \"Response\": {\n \"ActivityId\": \"asa-q59zikez\",\n \"RequestId\": \"5b039ee6-e8ff-4605-bb24-b45337747431\"\n }\n}",
394
+ "title": "伸缩组内实例进入备用中状态"
395
+ }
396
+ ],
389
397
  "ExecuteScalingPolicy": [
390
398
  {
391
399
  "document": "触发告警伸缩策略",