tccli 3.0.1229.1__py2.py3-none-any.whl → 3.0.1231.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 (59) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +110 -4
  3. tccli/services/aiart/v20221229/api.json +197 -10
  4. tccli/services/aiart/v20221229/examples.json +16 -0
  5. tccli/services/batch/v20170312/api.json +19 -14
  6. tccli/services/cam/cam_client.py +53 -0
  7. tccli/services/cam/v20190116/api.json +125 -52
  8. tccli/services/cam/v20190116/examples.json +12 -4
  9. tccli/services/cfg/v20210820/api.json +9 -0
  10. tccli/services/cfw/v20190904/api.json +1 -1
  11. tccli/services/cloudaudit/v20190319/api.json +39 -39
  12. tccli/services/cloudaudit/v20190319/examples.json +5 -5
  13. tccli/services/cvm/v20170312/api.json +53 -55
  14. tccli/services/cvm/v20170312/examples.json +3 -3
  15. tccli/services/cwp/v20180228/api.json +1 -1
  16. tccli/services/cynosdb/cynosdb_client.py +110 -57
  17. tccli/services/cynosdb/v20190107/api.json +166 -18
  18. tccli/services/cynosdb/v20190107/examples.json +14 -0
  19. tccli/services/dbbrain/v20210527/api.json +3 -1
  20. tccli/services/emr/emr_client.py +110 -4
  21. tccli/services/emr/v20190103/api.json +645 -0
  22. tccli/services/emr/v20190103/examples.json +16 -0
  23. tccli/services/es/v20180416/api.json +106 -8
  24. tccli/services/essbasic/v20210526/api.json +2 -2
  25. tccli/services/iotexplorer/v20190423/api.json +10 -0
  26. tccli/services/ivld/v20210903/api.json +25 -25
  27. tccli/services/ivld/v20210903/examples.json +1 -1
  28. tccli/services/lcic/v20220817/api.json +2 -2
  29. tccli/services/lke/v20231130/api.json +4 -4
  30. tccli/services/memcached/v20190318/api.json +20 -20
  31. tccli/services/mps/v20190612/api.json +65 -1
  32. tccli/services/mqtt/mqtt_client.py +283 -71
  33. tccli/services/mqtt/v20240516/api.json +312 -0
  34. tccli/services/mqtt/v20240516/examples.json +32 -0
  35. tccli/services/ocr/v20181119/api.json +251 -28
  36. tccli/services/ocr/v20181119/examples.json +1 -1
  37. tccli/services/postgres/v20170312/api.json +232 -228
  38. tccli/services/postgres/v20170312/examples.json +38 -38
  39. tccli/services/redis/v20180412/examples.json +2 -2
  40. tccli/services/ssl/v20191205/api.json +4 -4
  41. tccli/services/ssl/v20191205/examples.json +1 -1
  42. tccli/services/sts/v20180813/api.json +9 -9
  43. tccli/services/tdmq/v20200217/api.json +2 -2
  44. tccli/services/trtc/v20190722/api.json +4 -8
  45. tccli/services/tse/tse_client.py +228 -16
  46. tccli/services/tse/v20201207/api.json +476 -0
  47. tccli/services/tse/v20201207/examples.json +32 -0
  48. tccli/services/vclm/v20240523/api.json +3 -3
  49. tccli/services/vdb/v20230616/api.json +3 -3
  50. tccli/services/vdb/v20230616/examples.json +1 -1
  51. tccli/services/vod/v20180717/api.json +17 -17
  52. tccli/services/vpc/v20170312/api.json +510 -34
  53. tccli/services/vpc/v20170312/examples.json +68 -12
  54. tccli/services/vpc/vpc_client.py +475 -104
  55. {tccli-3.0.1229.1.dist-info → tccli-3.0.1231.1.dist-info}/METADATA +2 -2
  56. {tccli-3.0.1229.1.dist-info → tccli-3.0.1231.1.dist-info}/RECORD +59 -59
  57. {tccli-3.0.1229.1.dist-info → tccli-3.0.1231.1.dist-info}/WHEEL +0 -0
  58. {tccli-3.0.1229.1.dist-info → tccli-3.0.1231.1.dist-info}/entry_points.txt +0 -0
  59. {tccli-3.0.1229.1.dist-info → tccli-3.0.1231.1.dist-info}/license_files/LICENSE +0 -0
@@ -901,7 +901,7 @@ def doCloseProxy(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
- def doExportResourcePackageDeductDetails(args, parsed_globals):
904
+ def doDescribeProxySpecs(args, parsed_globals):
905
905
  g_param = parse_global_arg(parsed_globals)
906
906
 
907
907
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +930,11 @@ def doExportResourcePackageDeductDetails(args, parsed_globals):
930
930
  client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
931
931
  client._sdkVersion += ("_CLI_" + __version__)
932
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.ExportResourcePackageDeductDetailsRequest()
933
+ model = models.DescribeProxySpecsRequest()
934
934
  model.from_json_string(json.dumps(args))
935
935
  start_time = time.time()
936
936
  while True:
937
- rsp = client.ExportResourcePackageDeductDetails(model)
937
+ rsp = client.DescribeProxySpecs(model)
938
938
  result = rsp.to_json_string()
939
939
  try:
940
940
  json_obj = json.loads(result)
@@ -1265,6 +1265,58 @@ def doDescribeResourcesByDealName(args, parsed_globals):
1265
1265
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
1266
 
1267
1267
 
1268
+ def doExportResourcePackageDeductDetails(args, parsed_globals):
1269
+ g_param = parse_global_arg(parsed_globals)
1270
+
1271
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1272
+ cred = credential.CVMRoleCredential()
1273
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1274
+ cred = credential.STSAssumeRoleCredential(
1275
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1276
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1277
+ )
1278
+ 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):
1279
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1280
+ else:
1281
+ cred = credential.Credential(
1282
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1283
+ )
1284
+ http_profile = HttpProfile(
1285
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1286
+ reqMethod="POST",
1287
+ endpoint=g_param[OptionsDefine.Endpoint],
1288
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1289
+ )
1290
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1291
+ if g_param[OptionsDefine.Language]:
1292
+ profile.language = g_param[OptionsDefine.Language]
1293
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1294
+ client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
1295
+ client._sdkVersion += ("_CLI_" + __version__)
1296
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1297
+ model = models.ExportResourcePackageDeductDetailsRequest()
1298
+ model.from_json_string(json.dumps(args))
1299
+ start_time = time.time()
1300
+ while True:
1301
+ rsp = client.ExportResourcePackageDeductDetails(model)
1302
+ result = rsp.to_json_string()
1303
+ try:
1304
+ json_obj = json.loads(result)
1305
+ except TypeError as e:
1306
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1307
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1308
+ break
1309
+ cur_time = time.time()
1310
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1311
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1312
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1313
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1314
+ else:
1315
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1316
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1317
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1318
+
1319
+
1268
1320
  def doModifyClusterStorage(args, parsed_globals):
1269
1321
  g_param = parse_global_arg(parsed_globals)
1270
1322
 
@@ -3761,58 +3813,6 @@ def doAddInstances(args, parsed_globals):
3761
3813
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3762
3814
 
3763
3815
 
3764
- def doDescribeProxySpecs(args, parsed_globals):
3765
- g_param = parse_global_arg(parsed_globals)
3766
-
3767
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3768
- cred = credential.CVMRoleCredential()
3769
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3770
- cred = credential.STSAssumeRoleCredential(
3771
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3772
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3773
- )
3774
- 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):
3775
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3776
- else:
3777
- cred = credential.Credential(
3778
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3779
- )
3780
- http_profile = HttpProfile(
3781
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3782
- reqMethod="POST",
3783
- endpoint=g_param[OptionsDefine.Endpoint],
3784
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3785
- )
3786
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3787
- if g_param[OptionsDefine.Language]:
3788
- profile.language = g_param[OptionsDefine.Language]
3789
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3790
- client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
3791
- client._sdkVersion += ("_CLI_" + __version__)
3792
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
3793
- model = models.DescribeProxySpecsRequest()
3794
- model.from_json_string(json.dumps(args))
3795
- start_time = time.time()
3796
- while True:
3797
- rsp = client.DescribeProxySpecs(model)
3798
- result = rsp.to_json_string()
3799
- try:
3800
- json_obj = json.loads(result)
3801
- except TypeError as e:
3802
- json_obj = json.loads(result.decode('utf-8')) # python3.3
3803
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3804
- break
3805
- cur_time = time.time()
3806
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3807
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3808
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3809
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3810
- else:
3811
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3812
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3813
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3814
-
3815
-
3816
3816
  def doModifyInstanceUpgradeLimitDays(args, parsed_globals):
3817
3817
  g_param = parse_global_arg(parsed_globals)
3818
3818
 
@@ -4749,6 +4749,58 @@ def doBindClusterResourcePackages(args, parsed_globals):
4749
4749
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
4750
 
4751
4751
 
4752
+ def doDescribeServerlessInstanceSpecs(args, parsed_globals):
4753
+ g_param = parse_global_arg(parsed_globals)
4754
+
4755
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4756
+ cred = credential.CVMRoleCredential()
4757
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4758
+ cred = credential.STSAssumeRoleCredential(
4759
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4760
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4761
+ )
4762
+ 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):
4763
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4764
+ else:
4765
+ cred = credential.Credential(
4766
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4767
+ )
4768
+ http_profile = HttpProfile(
4769
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4770
+ reqMethod="POST",
4771
+ endpoint=g_param[OptionsDefine.Endpoint],
4772
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4773
+ )
4774
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4775
+ if g_param[OptionsDefine.Language]:
4776
+ profile.language = g_param[OptionsDefine.Language]
4777
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4778
+ client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
4779
+ client._sdkVersion += ("_CLI_" + __version__)
4780
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4781
+ model = models.DescribeServerlessInstanceSpecsRequest()
4782
+ model.from_json_string(json.dumps(args))
4783
+ start_time = time.time()
4784
+ while True:
4785
+ rsp = client.DescribeServerlessInstanceSpecs(model)
4786
+ result = rsp.to_json_string()
4787
+ try:
4788
+ json_obj = json.loads(result)
4789
+ except TypeError as e:
4790
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4791
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4792
+ break
4793
+ cur_time = time.time()
4794
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4795
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4796
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4797
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4798
+ else:
4799
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4800
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4801
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4802
+
4803
+
4752
4804
  def doDescribeAuditLogs(args, parsed_globals):
4753
4805
  g_param = parse_global_arg(parsed_globals)
4754
4806
 
@@ -8001,13 +8053,14 @@ ACTION_MAP = {
8001
8053
  "RenewClusters": doRenewClusters,
8002
8054
  "CloseProxyEndPoint": doCloseProxyEndPoint,
8003
8055
  "CloseProxy": doCloseProxy,
8004
- "ExportResourcePackageDeductDetails": doExportResourcePackageDeductDetails,
8056
+ "DescribeProxySpecs": doDescribeProxySpecs,
8005
8057
  "InquirePriceModify": doInquirePriceModify,
8006
8058
  "DescribeClusterDetail": doDescribeClusterDetail,
8007
8059
  "DescribeTasks": doDescribeTasks,
8008
8060
  "DescribeInstanceSpecs": doDescribeInstanceSpecs,
8009
8061
  "DescribeBinlogDownloadUrl": doDescribeBinlogDownloadUrl,
8010
8062
  "DescribeResourcesByDealName": doDescribeResourcesByDealName,
8063
+ "ExportResourcePackageDeductDetails": doExportResourcePackageDeductDetails,
8011
8064
  "ModifyClusterStorage": doModifyClusterStorage,
8012
8065
  "ActivateInstance": doActivateInstance,
8013
8066
  "DescribeProxyNodes": doDescribeProxyNodes,
@@ -8056,7 +8109,6 @@ ACTION_MAP = {
8056
8109
  "SwitchClusterZone": doSwitchClusterZone,
8057
8110
  "OpenClusterTransparentEncrypt": doOpenClusterTransparentEncrypt,
8058
8111
  "AddInstances": doAddInstances,
8059
- "DescribeProxySpecs": doDescribeProxySpecs,
8060
8112
  "ModifyInstanceUpgradeLimitDays": doModifyInstanceUpgradeLimitDays,
8061
8113
  "DeleteAccounts": doDeleteAccounts,
8062
8114
  "RevokeAccountPrivileges": doRevokeAccountPrivileges,
@@ -8075,6 +8127,7 @@ ACTION_MAP = {
8075
8127
  "ModifyInstanceParam": doModifyInstanceParam,
8076
8128
  "DescribeInstanceCLSLogDelivery": doDescribeInstanceCLSLogDelivery,
8077
8129
  "BindClusterResourcePackages": doBindClusterResourcePackages,
8130
+ "DescribeServerlessInstanceSpecs": doDescribeServerlessInstanceSpecs,
8078
8131
  "DescribeAuditLogs": doDescribeAuditLogs,
8079
8132
  "UnbindClusterResourcePackages": doUnbindClusterResourcePackages,
8080
8133
  "DescribeProxies": doDescribeProxies,
@@ -546,6 +546,13 @@
546
546
  "output": "DescribeRollbackTimeRangeResponse",
547
547
  "status": "online"
548
548
  },
549
+ "DescribeServerlessInstanceSpecs": {
550
+ "document": "查询Serverless实例可选规格",
551
+ "input": "DescribeServerlessInstanceSpecsRequest",
552
+ "name": "查询Serverless实例可选规格",
553
+ "output": "DescribeServerlessInstanceSpecsResponse",
554
+ "status": "online"
555
+ },
549
556
  "DescribeServerlessStrategy": {
550
557
  "document": "查询serverless策略",
551
558
  "input": "DescribeServerlessStrategyRequest",
@@ -11808,6 +11815,43 @@
11808
11815
  ],
11809
11816
  "type": "object"
11810
11817
  },
11818
+ "DescribeServerlessInstanceSpecsRequest": {
11819
+ "document": "DescribeServerlessInstanceSpecs请求参数结构体",
11820
+ "members": [
11821
+ {
11822
+ "disabled": false,
11823
+ "document": "可用区",
11824
+ "example": "ap-guangzhou-3",
11825
+ "member": "string",
11826
+ "name": "Zone",
11827
+ "required": false,
11828
+ "type": "string"
11829
+ }
11830
+ ],
11831
+ "type": "object"
11832
+ },
11833
+ "DescribeServerlessInstanceSpecsResponse": {
11834
+ "document": "DescribeServerlessInstanceSpecs返回参数结构体",
11835
+ "members": [
11836
+ {
11837
+ "disabled": false,
11838
+ "document": "Serverless实例可选规格",
11839
+ "example": "无",
11840
+ "member": "ServerlessSpec",
11841
+ "name": "Specs",
11842
+ "output_required": true,
11843
+ "type": "list",
11844
+ "value_allowed_null": false
11845
+ },
11846
+ {
11847
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
11848
+ "member": "string",
11849
+ "name": "RequestId",
11850
+ "type": "string"
11851
+ }
11852
+ ],
11853
+ "type": "object"
11854
+ },
11811
11855
  "DescribeServerlessStrategyRequest": {
11812
11856
  "document": "DescribeServerlessStrategy请求参数结构体",
11813
11857
  "members": [
@@ -15939,24 +15983,6 @@
15939
15983
  "name": "MaxRoCount",
15940
15984
  "required": false,
15941
15985
  "type": "int"
15942
- },
15943
- {
15944
- "disabled": false,
15945
- "document": "集群是否允许扩容,可选范围<li>yes</li><li>no</li>",
15946
- "example": "yes",
15947
- "member": "string",
15948
- "name": "AutoScaleUp",
15949
- "required": false,
15950
- "type": "string"
15951
- },
15952
- {
15953
- "disabled": false,
15954
- "document": "集群是否允许缩容,可选范围<li>yes</li><li>no</li>",
15955
- "example": "yes",
15956
- "member": "string",
15957
- "name": "AutoScaleDown",
15958
- "required": false,
15959
- "type": "string"
15960
15986
  }
15961
15987
  ],
15962
15988
  "type": "object"
@@ -20398,6 +20424,128 @@
20398
20424
  ],
20399
20425
  "usage": "out"
20400
20426
  },
20427
+ "ServerlessSpec": {
20428
+ "document": "serverless规格",
20429
+ "members": [
20430
+ {
20431
+ "disabled": false,
20432
+ "document": "cpu最小值",
20433
+ "example": "1",
20434
+ "member": "float",
20435
+ "name": "MinCpu",
20436
+ "output_required": true,
20437
+ "type": "float",
20438
+ "value_allowed_null": false
20439
+ },
20440
+ {
20441
+ "disabled": false,
20442
+ "document": "cpu最大值",
20443
+ "example": "1",
20444
+ "member": "float",
20445
+ "name": "MaxCpu",
20446
+ "output_required": true,
20447
+ "type": "float",
20448
+ "value_allowed_null": false
20449
+ },
20450
+ {
20451
+ "disabled": false,
20452
+ "document": "最大存储空间",
20453
+ "example": "1",
20454
+ "member": "int64",
20455
+ "name": "MaxStorageSize",
20456
+ "output_required": true,
20457
+ "type": "int",
20458
+ "value_allowed_null": false
20459
+ },
20460
+ {
20461
+ "disabled": false,
20462
+ "document": "是否为默认规格",
20463
+ "example": "1",
20464
+ "member": "int64",
20465
+ "name": "IsDefault",
20466
+ "output_required": true,
20467
+ "type": "int",
20468
+ "value_allowed_null": false
20469
+ },
20470
+ {
20471
+ "disabled": false,
20472
+ "document": "是否有库存",
20473
+ "example": "false",
20474
+ "member": "bool",
20475
+ "name": "HasStock",
20476
+ "output_required": true,
20477
+ "type": "bool",
20478
+ "value_allowed_null": false
20479
+ },
20480
+ {
20481
+ "disabled": false,
20482
+ "document": "库存数量",
20483
+ "example": "1",
20484
+ "member": "int64",
20485
+ "name": "StockCount",
20486
+ "output_required": true,
20487
+ "type": "int",
20488
+ "value_allowed_null": false
20489
+ },
20490
+ {
20491
+ "disabled": false,
20492
+ "document": "可用区库存信息\n注意:此字段可能返回 null,表示取不到有效值。",
20493
+ "example": "无",
20494
+ "member": "ServerlessZoneStockInfo",
20495
+ "name": "ZoneStockInfos",
20496
+ "output_required": false,
20497
+ "type": "list",
20498
+ "value_allowed_null": true
20499
+ }
20500
+ ],
20501
+ "usage": "out"
20502
+ },
20503
+ "ServerlessZoneStockInfo": {
20504
+ "document": "serverless类型的可用区库存信息",
20505
+ "members": [
20506
+ {
20507
+ "disabled": false,
20508
+ "document": "可用区\n注意:此字段可能返回 null,表示取不到有效值。",
20509
+ "example": "无",
20510
+ "member": "string",
20511
+ "name": "Zone",
20512
+ "output_required": false,
20513
+ "type": "string",
20514
+ "value_allowed_null": true
20515
+ },
20516
+ {
20517
+ "disabled": false,
20518
+ "document": "存储量\n注意:此字段可能返回 null,表示取不到有效值。",
20519
+ "example": "无",
20520
+ "member": "int64",
20521
+ "name": "StockCount",
20522
+ "output_required": false,
20523
+ "type": "int",
20524
+ "value_allowed_null": true
20525
+ },
20526
+ {
20527
+ "disabled": false,
20528
+ "document": "是否包含库存\n注意:此字段可能返回 null,表示取不到有效值。",
20529
+ "example": "无",
20530
+ "member": "bool",
20531
+ "name": "HasStock",
20532
+ "output_required": false,
20533
+ "type": "bool",
20534
+ "value_allowed_null": true
20535
+ },
20536
+ {
20537
+ "disabled": false,
20538
+ "document": "从可用区库存信息\n注意:此字段可能返回 null,表示取不到有效值。",
20539
+ "example": "无",
20540
+ "member": "SlaveZoneStockInfo",
20541
+ "name": "SlaveZoneStockInfos",
20542
+ "output_required": false,
20543
+ "type": "list",
20544
+ "value_allowed_null": true
20545
+ }
20546
+ ],
20547
+ "usage": "out"
20548
+ },
20401
20549
  "SetRenewFlagRequest": {
20402
20550
  "document": "SetRenewFlag请求参数结构体",
20403
20551
  "members": [
@@ -648,6 +648,14 @@
648
648
  "title": "查询回档时间范围"
649
649
  }
650
650
  ],
651
+ "DescribeServerlessInstanceSpecs": [
652
+ {
653
+ "document": "",
654
+ "input": "POST / HTTP/1.1\nHost: cynosdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeServerlessInstanceSpecs\n<公共请求参数>\n\n{}",
655
+ "output": "{\n \"Response\": {\n \"Specs\": [\n {\n \"MaxStorageSize\": 1000,\n \"MinCpu\": 0.25,\n \"StockCount\": 0,\n \"MaxCpu\": 0.5,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 1000,\n \"MinCpu\": 0.25,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 5000,\n \"MinCpu\": 0.25,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 10000,\n \"MinCpu\": 0.25,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 1000,\n \"MinCpu\": 0.5,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 5000,\n \"MinCpu\": 0.5,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 1\n },\n {\n \"MaxStorageSize\": 10000,\n \"MinCpu\": 0.5,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 5000,\n \"MinCpu\": 0.0,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 10000,\n \"MinCpu\": 0.0,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n },\n {\n \"MaxStorageSize\": 10000,\n \"MinCpu\": 0.0,\n \"StockCount\": 0,\n \"MaxCpu\": 0.0,\n \"HasStock\": true,\n \"IsDefault\": 0\n }\n ],\n \"RequestId\": \"52-a341-4269-bce2-221ec952ea16|m\"\n }\n}",
656
+ "title": "查询Serverless实例可选规格"
657
+ }
658
+ ],
651
659
  "DescribeServerlessStrategy": [
652
660
  {
653
661
  "document": "",
@@ -982,6 +990,12 @@
982
990
  "input": "POST / HTTP/1.1\nHost: cynosdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyServerlessStrategy\n<公共请求参数>\n\n{\n \"AutoPause\": \"no\",\n \"AutoScaleUpDelay\": 200,\n \"AutoPauseDelay\": 100,\n \"MinCpu\": 0.25,\n \"MaxCpu\": 2,\n \"ClusterId\": \"cynosdbmysql-8vcxoq75\",\n \"AutoScaleDownDelay\": 300\n}",
983
991
  "output": "{\n \"Response\": {\n \"FlowId\": 1008300,\n \"RequestId\": \"c3da7958-23e8-11eb-8e52-525400b7dd5a\"\n }\n}",
984
992
  "title": "修改serverless策略"
993
+ },
994
+ {
995
+ "document": "调整主节点",
996
+ "input": "POST / HTTP/1.1\nHost: cynosdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyServerlessStrategy\n<公共请求参数>\n\n{\n \"ClusterId\": \"cynosdbmysql-92oecwyv\",\n \"MinCpu\": 2,\n \"MaxCpu\": 2\n}",
997
+ "output": "{\n \"Response\": {\n \"FlowId\": 917319,\n \"RequestId\": \"a7ef1e81-e306-45fd-ab3d-37a6ae7ecf96\"\n }\n}",
998
+ "title": "变更serverless策略"
985
999
  }
986
1000
  ],
987
1001
  "ModifyVipVport": [
@@ -6686,7 +6686,7 @@
6686
6686
  },
6687
6687
  {
6688
6688
  "disabled": false,
6689
- "document": "默认是ture, 记录下kill的记录,为了加快kill,可设置为false。",
6689
+ "document": "默认是true,会记录下kill的记录;该参数为true, 则在kill操作前校验目标会话是否存在,存在则继续kill,否则取消kill。为了加快kill速度,可设置为false。",
6690
6690
  "example": "false",
6691
6691
  "member": "bool",
6692
6692
  "name": "RecordHistory",
@@ -6705,6 +6705,7 @@
6705
6705
  "example": "[536284]",
6706
6706
  "member": "int64",
6707
6707
  "name": "Threads",
6708
+ "output_required": true,
6708
6709
  "type": "list",
6709
6710
  "value_allowed_null": false
6710
6711
  },
@@ -6714,6 +6715,7 @@
6714
6715
  "example": "\"AEnnKexGijsX\"",
6715
6716
  "member": "string",
6716
6717
  "name": "SqlExecId",
6718
+ "output_required": true,
6717
6719
  "type": "string",
6718
6720
  "value_allowed_null": true
6719
6721
  },
@@ -433,7 +433,7 @@ def doModifyYarnQueueV2(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
- def doDescribeHDFSStorageInfo(args, parsed_globals):
436
+ def doCreateCloudInstance(args, parsed_globals):
437
437
  g_param = parse_global_arg(parsed_globals)
438
438
 
439
439
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -462,11 +462,11 @@ def doDescribeHDFSStorageInfo(args, parsed_globals):
462
462
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
463
463
  client._sdkVersion += ("_CLI_" + __version__)
464
464
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
- model = models.DescribeHDFSStorageInfoRequest()
465
+ model = models.CreateCloudInstanceRequest()
466
466
  model.from_json_string(json.dumps(args))
467
467
  start_time = time.time()
468
468
  while True:
469
- rsp = client.DescribeHDFSStorageInfo(model)
469
+ rsp = client.CreateCloudInstance(model)
470
470
  result = rsp.to_json_string()
471
471
  try:
472
472
  json_obj = json.loads(result)
@@ -1993,6 +1993,58 @@ def doDescribeInstanceRenewNodes(args, parsed_globals):
1993
1993
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
1994
 
1995
1995
 
1996
+ def doDescribeHDFSStorageInfo(args, parsed_globals):
1997
+ g_param = parse_global_arg(parsed_globals)
1998
+
1999
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2000
+ cred = credential.CVMRoleCredential()
2001
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2002
+ cred = credential.STSAssumeRoleCredential(
2003
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2004
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2005
+ )
2006
+ 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):
2007
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2008
+ else:
2009
+ cred = credential.Credential(
2010
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2011
+ )
2012
+ http_profile = HttpProfile(
2013
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2014
+ reqMethod="POST",
2015
+ endpoint=g_param[OptionsDefine.Endpoint],
2016
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2017
+ )
2018
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2019
+ if g_param[OptionsDefine.Language]:
2020
+ profile.language = g_param[OptionsDefine.Language]
2021
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2022
+ client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
2023
+ client._sdkVersion += ("_CLI_" + __version__)
2024
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2025
+ model = models.DescribeHDFSStorageInfoRequest()
2026
+ model.from_json_string(json.dumps(args))
2027
+ start_time = time.time()
2028
+ while True:
2029
+ rsp = client.DescribeHDFSStorageInfo(model)
2030
+ result = rsp.to_json_string()
2031
+ try:
2032
+ json_obj = json.loads(result)
2033
+ except TypeError as e:
2034
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2035
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2036
+ break
2037
+ cur_time = time.time()
2038
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2039
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2040
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2041
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2042
+ else:
2043
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2044
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2045
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2046
+
2047
+
1996
2048
  def doModifyResourceScheduler(args, parsed_globals):
1997
2049
  g_param = parse_global_arg(parsed_globals)
1998
2050
 
@@ -3293,6 +3345,58 @@ def doDescribeEmrOverviewMetrics(args, parsed_globals):
3293
3345
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3294
3346
 
3295
3347
 
3348
+ def doModifyPodNum(args, parsed_globals):
3349
+ g_param = parse_global_arg(parsed_globals)
3350
+
3351
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3352
+ cred = credential.CVMRoleCredential()
3353
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3354
+ cred = credential.STSAssumeRoleCredential(
3355
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3356
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3357
+ )
3358
+ 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):
3359
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3360
+ else:
3361
+ cred = credential.Credential(
3362
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3363
+ )
3364
+ http_profile = HttpProfile(
3365
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3366
+ reqMethod="POST",
3367
+ endpoint=g_param[OptionsDefine.Endpoint],
3368
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3369
+ )
3370
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3371
+ if g_param[OptionsDefine.Language]:
3372
+ profile.language = g_param[OptionsDefine.Language]
3373
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3374
+ client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
3375
+ client._sdkVersion += ("_CLI_" + __version__)
3376
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3377
+ model = models.ModifyPodNumRequest()
3378
+ model.from_json_string(json.dumps(args))
3379
+ start_time = time.time()
3380
+ while True:
3381
+ rsp = client.ModifyPodNum(model)
3382
+ result = rsp.to_json_string()
3383
+ try:
3384
+ json_obj = json.loads(result)
3385
+ except TypeError as e:
3386
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3387
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3388
+ break
3389
+ cur_time = time.time()
3390
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3391
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3392
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3393
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3394
+ else:
3395
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3396
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3397
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3398
+
3399
+
3296
3400
  def doScaleOutCluster(args, parsed_globals):
3297
3401
  g_param = parse_global_arg(parsed_globals)
3298
3402
 
@@ -3416,7 +3520,7 @@ ACTION_MAP = {
3416
3520
  "DescribeImpalaQueries": doDescribeImpalaQueries,
3417
3521
  "DescribeYarnQueue": doDescribeYarnQueue,
3418
3522
  "ModifyYarnQueueV2": doModifyYarnQueueV2,
3419
- "DescribeHDFSStorageInfo": doDescribeHDFSStorageInfo,
3523
+ "CreateCloudInstance": doCreateCloudInstance,
3420
3524
  "DeployYarnConf": doDeployYarnConf,
3421
3525
  "DescribeClusterFlowStatusDetail": doDescribeClusterFlowStatusDetail,
3422
3526
  "InquiryPriceScaleOutInstance": doInquiryPriceScaleOutInstance,
@@ -3446,6 +3550,7 @@ ACTION_MAP = {
3446
3550
  "DeleteAutoScaleStrategy": doDeleteAutoScaleStrategy,
3447
3551
  "DescribeEmrApplicationStatics": doDescribeEmrApplicationStatics,
3448
3552
  "DescribeInstanceRenewNodes": doDescribeInstanceRenewNodes,
3553
+ "DescribeHDFSStorageInfo": doDescribeHDFSStorageInfo,
3449
3554
  "ModifyResourceScheduler": doModifyResourceScheduler,
3450
3555
  "DescribeResourceScheduleDiffDetail": doDescribeResourceScheduleDiffDetail,
3451
3556
  "DescribeSLInstance": doDescribeSLInstance,
@@ -3471,6 +3576,7 @@ ACTION_MAP = {
3471
3576
  "ModifyResourcePools": doModifyResourcePools,
3472
3577
  "DescribeInsightList": doDescribeInsightList,
3473
3578
  "DescribeEmrOverviewMetrics": doDescribeEmrOverviewMetrics,
3579
+ "ModifyPodNum": doModifyPodNum,
3474
3580
  "ScaleOutCluster": doScaleOutCluster,
3475
3581
  "RunJobFlow": doRunJobFlow,
3476
3582