tccli 3.0.1297.1__py2.py3-none-any.whl → 3.0.1299.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 (85) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/batch/batch_client.py +4 -110
  3. tccli/services/batch/v20170312/api.json +0 -527
  4. tccli/services/batch/v20170312/examples.json +0 -16
  5. tccli/services/bi/v20220105/api.json +87 -1
  6. tccli/services/bi/v20220105/examples.json +7 -7
  7. tccli/services/cam/v20190116/api.json +84 -84
  8. tccli/services/cbs/v20170312/api.json +24 -24
  9. tccli/services/cdn/v20180606/api.json +240 -179
  10. tccli/services/cdn/v20180606/examples.json +1 -1
  11. tccli/services/cfg/v20210820/api.json +5 -3
  12. tccli/services/cfg/v20210820/examples.json +1 -1
  13. tccli/services/chdfs/v20201112/api.json +7 -1
  14. tccli/services/cls/cls_client.py +235 -23
  15. tccli/services/cls/v20201016/api.json +457 -3
  16. tccli/services/cls/v20201016/examples.json +32 -0
  17. tccli/services/controlcenter/v20230110/api.json +63 -58
  18. tccli/services/cvm/v20170312/api.json +2 -2
  19. tccli/services/dbbrain/dbbrain_client.py +106 -0
  20. tccli/services/dbbrain/v20191016/api.json +365 -6
  21. tccli/services/dbbrain/v20191016/examples.json +8 -0
  22. tccli/services/dbbrain/v20210527/api.json +550 -21
  23. tccli/services/dbbrain/v20210527/examples.json +16 -0
  24. tccli/services/dcdb/v20180411/api.json +102 -6
  25. tccli/services/dcdb/v20180411/examples.json +4 -4
  26. tccli/services/dlc/dlc_client.py +53 -0
  27. tccli/services/dlc/v20210125/api.json +162 -0
  28. tccli/services/dlc/v20210125/examples.json +8 -0
  29. tccli/services/dnspod/v20210323/api.json +128 -127
  30. tccli/services/ess/v20201111/api.json +1 -1
  31. tccli/services/essbasic/v20210526/api.json +5 -5
  32. tccli/services/facefusion/v20220927/api.json +2 -2
  33. tccli/services/facefusion/v20220927/examples.json +1 -1
  34. tccli/services/gs/v20191118/api.json +22 -3
  35. tccli/services/gs/v20191118/examples.json +1 -1
  36. tccli/services/hai/v20230812/api.json +16 -16
  37. tccli/services/iotcloud/v20210408/api.json +2 -2
  38. tccli/services/iotcloud/v20210408/examples.json +3 -3
  39. tccli/services/iotexplorer/v20190423/api.json +947 -857
  40. tccli/services/iotexplorer/v20190423/examples.json +83 -83
  41. tccli/services/live/v20180801/api.json +2 -2
  42. tccli/services/lkeap/v20240522/api.json +3 -3
  43. tccli/services/mariadb/v20170312/api.json +84 -8
  44. tccli/services/mariadb/v20170312/examples.json +3 -3
  45. tccli/services/mps/v20190612/api.json +63 -61
  46. tccli/services/mps/v20190612/examples.json +48 -48
  47. tccli/services/mqtt/v20240516/api.json +62 -12
  48. tccli/services/mqtt/v20240516/examples.json +6 -6
  49. tccli/services/ocr/ocr_client.py +307 -360
  50. tccli/services/ocr/v20181119/api.json +73 -289
  51. tccli/services/ocr/v20181119/examples.json +0 -8
  52. tccli/services/organization/v20210331/api.json +9 -0
  53. tccli/services/partners/v20180321/api.json +10 -0
  54. tccli/services/sqlserver/v20180328/api.json +9 -0
  55. tccli/services/sqlserver/v20180328/examples.json +1 -1
  56. tccli/services/tcb/v20180608/api.json +11 -1
  57. tccli/services/tdmq/v20200217/api.json +30 -0
  58. tccli/services/teo/v20220106/api.json +4 -4
  59. tccli/services/teo/v20220901/api.json +48 -7
  60. tccli/services/teo/v20220901/examples.json +51 -15
  61. tccli/services/tione/v20211111/api.json +25 -5
  62. tccli/services/tke/v20180525/api.json +2 -2
  63. tccli/services/trro/trro_client.py +269 -4
  64. tccli/services/trro/v20220325/api.json +504 -0
  65. tccli/services/trro/v20220325/examples.json +40 -0
  66. tccli/services/tse/v20201207/api.json +34 -34
  67. tccli/services/vdb/v20230616/api.json +738 -15
  68. tccli/services/vdb/v20230616/examples.json +64 -0
  69. tccli/services/vdb/vdb_client.py +428 -4
  70. tccli/services/vod/v20180717/api.json +9 -0
  71. tccli/services/vod/v20240718/api.json +985 -0
  72. tccli/services/vod/v20240718/examples.json +66 -0
  73. tccli/services/vod/vod_client.py +330 -12
  74. tccli/services/vpc/v20170312/api.json +175 -0
  75. tccli/services/vpc/v20170312/examples.json +8 -0
  76. tccli/services/vpc/vpc_client.py +53 -0
  77. tccli/services/wedata/v20210820/api.json +464 -1
  78. tccli/services/wedata/v20210820/examples.json +22 -0
  79. tccli/services/wedata/wedata_client.py +114 -8
  80. tccli/services/weilingwith/v20230427/api.json +10 -10
  81. {tccli-3.0.1297.1.dist-info → tccli-3.0.1299.1.dist-info}/METADATA +2 -2
  82. {tccli-3.0.1297.1.dist-info → tccli-3.0.1299.1.dist-info}/RECORD +85 -85
  83. {tccli-3.0.1297.1.dist-info → tccli-3.0.1299.1.dist-info}/WHEEL +0 -0
  84. {tccli-3.0.1297.1.dist-info → tccli-3.0.1299.1.dist-info}/entry_points.txt +0 -0
  85. {tccli-3.0.1297.1.dist-info → tccli-3.0.1299.1.dist-info}/license_files/LICENSE +0 -0
@@ -292,7 +292,7 @@
292
292
  {
293
293
  "document": "",
294
294
  "input": "https://cdn.tencentcloudapi.com/?Action=DescribePushTasks\n&TaskId=1533031853231313311\n&<公共请求参数>",
295
- "output": "{\n \"Response\": {\n \"RequestId\": \"4d5a83f8-a61f-445b-8036-5636be640bef\",\n \"PushLogs\": [\n {\n \"TaskId\": \"1533031853231313311\",\n \"Url\": \"http://www.test.com/\",\n \"Status\": \"Done\",\n \"Percent\": 100,\n \"CreateTime\": \"2018-07-30 18:10:53\",\n \"Area\": \"mainland\"\n }\n ],\n \"TotalCount\": 20\n }\n}",
295
+ "output": "{\n \"Response\": {\n \"RequestId\": \"4d5a83f8-a61f-445b-8036-5636be640bef\",\n \"PushLogs\": [\n {\n \"TaskId\": \"1533031853231313311\",\n \"Url\": \"http://www.test.com/\",\n \"Status\": \"Done\",\n \"Percent\": 100,\n \"CreateTime\": \"2018-07-30 18:10:53\",\n \"UpdateTime\": \"2018-07-30 18:11:53\",\n \"Area\": \"mainland\"\n }\n ],\n \"TotalCount\": 20\n }\n}",
296
296
  "title": "预热历史查询"
297
297
  }
298
298
  ],
@@ -1611,7 +1611,7 @@
1611
1611
  {
1612
1612
  "disabled": false,
1613
1613
  "document": "任务ID",
1614
- "example": "123",
1614
+ "example": "5432",
1615
1615
  "member": "int64",
1616
1616
  "name": "TaskId",
1617
1617
  "required": true,
@@ -2045,9 +2045,10 @@
2045
2045
  {
2046
2046
  "disabled": false,
2047
2047
  "document": "标签键",
2048
- "example": "test",
2048
+ "example": "资源归属",
2049
2049
  "member": "string",
2050
2050
  "name": "TagKey",
2051
+ "output_required": true,
2051
2052
  "required": true,
2052
2053
  "type": "string",
2053
2054
  "value_allowed_null": false
@@ -2055,9 +2056,10 @@
2055
2056
  {
2056
2057
  "disabled": false,
2057
2058
  "document": "标签值",
2058
- "example": "mytest",
2059
+ "example": "研发组",
2059
2060
  "member": "string",
2060
2061
  "name": "TagValue",
2062
+ "output_required": true,
2061
2063
  "required": true,
2062
2064
  "type": "string",
2063
2065
  "value_allowed_null": false
@@ -112,7 +112,7 @@
112
112
  {
113
113
  "document": "查询经验库列表",
114
114
  "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTemplateList\n<公共请求参数>\n\n{\n \"Limit\": \"10\",\n \"Offset\": \"0\"\n}",
115
- "output": "{\n \"Response\": {\n \"RequestId\": \"0c06dc9d-1e90-4062-a038-74abf2bbd43d\",\n \"TemplateList\": [\n {\n \"TemplateId\": 511,\n \"TemplateTitle\": \"测试经验\",\n \"TemplateDescription\": \"测试\",\n \"TemplateTag\": null,\n \"TemplateIsUsed\": 1,\n \"TemplateCreateTime\": \"2021-10-12 17:28:13\",\n \"TemplateUpdateTime\": \"2021-10-12 17:48:16\",\n \"TemplateUsedNum\": 0\n },\n {\n \"TemplateId\": 509,\n \"TemplateTitle\": \"test\",\n \"TemplateDescription\": \"test\",\n \"TemplateTag\": \"test\",\n \"TemplateIsUsed\": 2,\n \"TemplateCreateTime\": \"2021-09-28 15:38:00\",\n \"TemplateUpdateTime\": \"2021-10-11 16:26:45\",\n \"TemplateUsedNum\": 0\n }\n ],\n \"Total\": 2\n }\n}",
115
+ "output": "{\n \"Response\": {\n \"RequestId\": \"0c06dc9d-1e90-4062-a038-74abf2bbd43d\",\n \"TemplateList\": [\n {\n \"TemplateId\": 511,\n \"TemplateTitle\": \"跨AZ容灾\",\n \"TemplateDescription\": \"跨AZ容灾场景验证\",\n \"TemplateTag\": \"资源归属:研发组\",\n \"TemplateIsUsed\": 1,\n \"TemplateCreateTime\": \"2021-10-12 17:28:13\",\n \"TemplateUpdateTime\": \"2021-10-12 17:48:16\",\n \"TemplateUsedNum\": 0\n },\n {\n \"TemplateId\": 509,\n \"TemplateTitle\": \"CPU高负载\",\n \"TemplateDescription\": \"CPU高负载故障场景验证\",\n \"TemplateTag\": \"资源归属:研发组\",\n \"TemplateIsUsed\": 2,\n \"TemplateCreateTime\": \"2021-09-28 15:38:00\",\n \"TemplateUpdateTime\": \"2021-10-11 16:26:45\",\n \"TemplateUsedNum\": 0\n }\n ],\n \"Total\": 2\n }\n}",
116
116
  "title": "经验库列表"
117
117
  },
118
118
  {
@@ -1916,6 +1916,7 @@
1916
1916
  "example": "1",
1917
1917
  "member": "uint64",
1918
1918
  "name": "RestoreTaskId",
1919
+ "output_required": true,
1919
1920
  "required": false,
1920
1921
  "type": "int",
1921
1922
  "value_allowed_null": false
@@ -1926,16 +1927,18 @@
1926
1927
  "example": "/test/file0",
1927
1928
  "member": "string",
1928
1929
  "name": "FilePath",
1930
+ "output_required": true,
1929
1931
  "required": false,
1930
1932
  "type": "string",
1931
1933
  "value_allowed_null": false
1932
1934
  },
1933
1935
  {
1934
1936
  "disabled": false,
1935
- "document": "回热任务类型(1:标准;2:极速;3:批量,暂时仅支持极速)",
1937
+ "document": "回热任务类型(1:标准;2:极速;3:批量,暂时仅支持标准)",
1936
1938
  "example": "1",
1937
1939
  "member": "uint64",
1938
1940
  "name": "Type",
1941
+ "output_required": true,
1939
1942
  "required": false,
1940
1943
  "type": "int",
1941
1944
  "value_allowed_null": false
@@ -1946,6 +1949,7 @@
1946
1949
  "example": "7",
1947
1950
  "member": "uint64",
1948
1951
  "name": "Days",
1952
+ "output_required": true,
1949
1953
  "required": false,
1950
1954
  "type": "int",
1951
1955
  "value_allowed_null": false
@@ -1956,6 +1960,7 @@
1956
1960
  "example": "1",
1957
1961
  "member": "uint64",
1958
1962
  "name": "Status",
1963
+ "output_required": true,
1959
1964
  "required": false,
1960
1965
  "type": "int",
1961
1966
  "value_allowed_null": false
@@ -1966,6 +1971,7 @@
1966
1971
  "example": "2019-07-30T16:24:38+08:00",
1967
1972
  "member": "datetime_iso",
1968
1973
  "name": "CreateTime",
1974
+ "output_required": true,
1969
1975
  "required": false,
1970
1976
  "type": "string",
1971
1977
  "value_allowed_null": false
@@ -225,6 +225,58 @@ def doDescribeConsoleSharingList(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
+ def doDeleteCloudProductLogCollection(args, parsed_globals):
229
+ g_param = parse_global_arg(parsed_globals)
230
+
231
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
232
+ cred = credential.CVMRoleCredential()
233
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
234
+ cred = credential.STSAssumeRoleCredential(
235
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
236
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
237
+ )
238
+ 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):
239
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
240
+ else:
241
+ cred = credential.Credential(
242
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
243
+ )
244
+ http_profile = HttpProfile(
245
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
246
+ reqMethod="POST",
247
+ endpoint=g_param[OptionsDefine.Endpoint],
248
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
249
+ )
250
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
251
+ if g_param[OptionsDefine.Language]:
252
+ profile.language = g_param[OptionsDefine.Language]
253
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
254
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.DeleteCloudProductLogCollectionRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.DeleteCloudProductLogCollection(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
228
280
  def doCreateIndex(args, parsed_globals):
229
281
  g_param = parse_global_arg(parsed_globals)
230
282
 
@@ -797,6 +849,58 @@ def doCreateTopic(args, parsed_globals):
797
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
850
 
799
851
 
852
+ def doDescribeCloudProductLogTasks(args, parsed_globals):
853
+ g_param = parse_global_arg(parsed_globals)
854
+
855
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
856
+ cred = credential.CVMRoleCredential()
857
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
858
+ cred = credential.STSAssumeRoleCredential(
859
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
860
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
861
+ )
862
+ 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):
863
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
864
+ else:
865
+ cred = credential.Credential(
866
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
867
+ )
868
+ http_profile = HttpProfile(
869
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
870
+ reqMethod="POST",
871
+ endpoint=g_param[OptionsDefine.Endpoint],
872
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
873
+ )
874
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
875
+ if g_param[OptionsDefine.Language]:
876
+ profile.language = g_param[OptionsDefine.Language]
877
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
878
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
879
+ client._sdkVersion += ("_CLI_" + __version__)
880
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
+ model = models.DescribeCloudProductLogTasksRequest()
882
+ model.from_json_string(json.dumps(args))
883
+ start_time = time.time()
884
+ while True:
885
+ rsp = client.DescribeCloudProductLogTasks(model)
886
+ result = rsp.to_json_string()
887
+ try:
888
+ json_obj = json.loads(result)
889
+ except TypeError as e:
890
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
891
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
+ break
893
+ cur_time = time.time()
894
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
+ else:
899
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
+
903
+
800
904
  def doDeleteAlarmNotice(args, parsed_globals):
801
905
  g_param = parse_global_arg(parsed_globals)
802
906
 
@@ -1109,6 +1213,110 @@ def doDescribeTopics(args, parsed_globals):
1109
1213
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
1214
 
1111
1215
 
1216
+ def doCreateCloudProductLogCollection(args, parsed_globals):
1217
+ g_param = parse_global_arg(parsed_globals)
1218
+
1219
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1220
+ cred = credential.CVMRoleCredential()
1221
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1222
+ cred = credential.STSAssumeRoleCredential(
1223
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1224
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1225
+ )
1226
+ 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):
1227
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1228
+ else:
1229
+ cred = credential.Credential(
1230
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1231
+ )
1232
+ http_profile = HttpProfile(
1233
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1234
+ reqMethod="POST",
1235
+ endpoint=g_param[OptionsDefine.Endpoint],
1236
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1237
+ )
1238
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1239
+ if g_param[OptionsDefine.Language]:
1240
+ profile.language = g_param[OptionsDefine.Language]
1241
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1242
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1243
+ client._sdkVersion += ("_CLI_" + __version__)
1244
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
+ model = models.CreateCloudProductLogCollectionRequest()
1246
+ model.from_json_string(json.dumps(args))
1247
+ start_time = time.time()
1248
+ while True:
1249
+ rsp = client.CreateCloudProductLogCollection(model)
1250
+ result = rsp.to_json_string()
1251
+ try:
1252
+ json_obj = json.loads(result)
1253
+ except TypeError as e:
1254
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1255
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1256
+ break
1257
+ cur_time = time.time()
1258
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1259
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1260
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1261
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1262
+ else:
1263
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1264
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1265
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
+
1267
+
1268
+ def doCreateAlarmNotice(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.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1295
+ client._sdkVersion += ("_CLI_" + __version__)
1296
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1297
+ model = models.CreateAlarmNoticeRequest()
1298
+ model.from_json_string(json.dumps(args))
1299
+ start_time = time.time()
1300
+ while True:
1301
+ rsp = client.CreateAlarmNotice(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
+
1112
1320
  def doCreateCosRecharge(args, parsed_globals):
1113
1321
  g_param = parse_global_arg(parsed_globals)
1114
1322
 
@@ -1473,7 +1681,7 @@ def doDescribeIndex(args, parsed_globals):
1473
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1474
1682
 
1475
1683
 
1476
- def doCreateAlarmShield(args, parsed_globals):
1684
+ def doModifyCloudProductLogCollection(args, parsed_globals):
1477
1685
  g_param = parse_global_arg(parsed_globals)
1478
1686
 
1479
1687
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1502,11 +1710,11 @@ def doCreateAlarmShield(args, parsed_globals):
1502
1710
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1503
1711
  client._sdkVersion += ("_CLI_" + __version__)
1504
1712
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1505
- model = models.CreateAlarmShieldRequest()
1713
+ model = models.ModifyCloudProductLogCollectionRequest()
1506
1714
  model.from_json_string(json.dumps(args))
1507
1715
  start_time = time.time()
1508
1716
  while True:
1509
- rsp = client.CreateAlarmShield(model)
1717
+ rsp = client.ModifyCloudProductLogCollection(model)
1510
1718
  result = rsp.to_json_string()
1511
1719
  try:
1512
1720
  json_obj = json.loads(result)
@@ -1525,7 +1733,7 @@ def doCreateAlarmShield(args, parsed_globals):
1525
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
1734
 
1527
1735
 
1528
- def doCreateShipper(args, parsed_globals):
1736
+ def doCreateAlarmShield(args, parsed_globals):
1529
1737
  g_param = parse_global_arg(parsed_globals)
1530
1738
 
1531
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1554,11 +1762,11 @@ def doCreateShipper(args, parsed_globals):
1554
1762
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1555
1763
  client._sdkVersion += ("_CLI_" + __version__)
1556
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.CreateShipperRequest()
1765
+ model = models.CreateAlarmShieldRequest()
1558
1766
  model.from_json_string(json.dumps(args))
1559
1767
  start_time = time.time()
1560
1768
  while True:
1561
- rsp = client.CreateShipper(model)
1769
+ rsp = client.CreateAlarmShield(model)
1562
1770
  result = rsp.to_json_string()
1563
1771
  try:
1564
1772
  json_obj = json.loads(result)
@@ -1577,7 +1785,7 @@ def doCreateShipper(args, parsed_globals):
1577
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
1786
 
1579
1787
 
1580
- def doCreateNoticeContent(args, parsed_globals):
1788
+ def doCreateShipper(args, parsed_globals):
1581
1789
  g_param = parse_global_arg(parsed_globals)
1582
1790
 
1583
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1606,11 +1814,11 @@ def doCreateNoticeContent(args, parsed_globals):
1606
1814
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1607
1815
  client._sdkVersion += ("_CLI_" + __version__)
1608
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
- model = models.CreateNoticeContentRequest()
1817
+ model = models.CreateShipperRequest()
1610
1818
  model.from_json_string(json.dumps(args))
1611
1819
  start_time = time.time()
1612
1820
  while True:
1613
- rsp = client.CreateNoticeContent(model)
1821
+ rsp = client.CreateShipper(model)
1614
1822
  result = rsp.to_json_string()
1615
1823
  try:
1616
1824
  json_obj = json.loads(result)
@@ -1629,7 +1837,7 @@ def doCreateNoticeContent(args, parsed_globals):
1629
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1838
 
1631
1839
 
1632
- def doDeleteConsumer(args, parsed_globals):
1840
+ def doCreateNoticeContent(args, parsed_globals):
1633
1841
  g_param = parse_global_arg(parsed_globals)
1634
1842
 
1635
1843
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1658,11 +1866,11 @@ def doDeleteConsumer(args, parsed_globals):
1658
1866
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1659
1867
  client._sdkVersion += ("_CLI_" + __version__)
1660
1868
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
- model = models.DeleteConsumerRequest()
1869
+ model = models.CreateNoticeContentRequest()
1662
1870
  model.from_json_string(json.dumps(args))
1663
1871
  start_time = time.time()
1664
1872
  while True:
1665
- rsp = client.DeleteConsumer(model)
1873
+ rsp = client.CreateNoticeContent(model)
1666
1874
  result = rsp.to_json_string()
1667
1875
  try:
1668
1876
  json_obj = json.loads(result)
@@ -1681,7 +1889,7 @@ def doDeleteConsumer(args, parsed_globals):
1681
1889
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
1890
 
1683
1891
 
1684
- def doDeleteMachineGroup(args, parsed_globals):
1892
+ def doDeleteConsumer(args, parsed_globals):
1685
1893
  g_param = parse_global_arg(parsed_globals)
1686
1894
 
1687
1895
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1710,11 +1918,11 @@ def doDeleteMachineGroup(args, parsed_globals):
1710
1918
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1711
1919
  client._sdkVersion += ("_CLI_" + __version__)
1712
1920
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1713
- model = models.DeleteMachineGroupRequest()
1921
+ model = models.DeleteConsumerRequest()
1714
1922
  model.from_json_string(json.dumps(args))
1715
1923
  start_time = time.time()
1716
1924
  while True:
1717
- rsp = client.DeleteMachineGroup(model)
1925
+ rsp = client.DeleteConsumer(model)
1718
1926
  result = rsp.to_json_string()
1719
1927
  try:
1720
1928
  json_obj = json.loads(result)
@@ -1733,7 +1941,7 @@ def doDeleteMachineGroup(args, parsed_globals):
1733
1941
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
1942
 
1735
1943
 
1736
- def doDescribeConfigMachineGroups(args, parsed_globals):
1944
+ def doDeleteMachineGroup(args, parsed_globals):
1737
1945
  g_param = parse_global_arg(parsed_globals)
1738
1946
 
1739
1947
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1762,11 +1970,11 @@ def doDescribeConfigMachineGroups(args, parsed_globals):
1762
1970
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1763
1971
  client._sdkVersion += ("_CLI_" + __version__)
1764
1972
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1765
- model = models.DescribeConfigMachineGroupsRequest()
1973
+ model = models.DeleteMachineGroupRequest()
1766
1974
  model.from_json_string(json.dumps(args))
1767
1975
  start_time = time.time()
1768
1976
  while True:
1769
- rsp = client.DescribeConfigMachineGroups(model)
1977
+ rsp = client.DeleteMachineGroup(model)
1770
1978
  result = rsp.to_json_string()
1771
1979
  try:
1772
1980
  json_obj = json.loads(result)
@@ -3969,7 +4177,7 @@ def doQueryRangeMetric(args, parsed_globals):
3969
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3970
4178
 
3971
4179
 
3972
- def doCreateAlarmNotice(args, parsed_globals):
4180
+ def doDescribeConfigMachineGroups(args, parsed_globals):
3973
4181
  g_param = parse_global_arg(parsed_globals)
3974
4182
 
3975
4183
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3998,11 +4206,11 @@ def doCreateAlarmNotice(args, parsed_globals):
3998
4206
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3999
4207
  client._sdkVersion += ("_CLI_" + __version__)
4000
4208
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4001
- model = models.CreateAlarmNoticeRequest()
4209
+ model = models.DescribeConfigMachineGroupsRequest()
4002
4210
  model.from_json_string(json.dumps(args))
4003
4211
  start_time = time.time()
4004
4212
  while True:
4005
- rsp = client.CreateAlarmNotice(model)
4213
+ rsp = client.DescribeConfigMachineGroups(model)
4006
4214
  result = rsp.to_json_string()
4007
4215
  try:
4008
4216
  json_obj = json.loads(result)
@@ -5707,6 +5915,7 @@ ACTION_MAP = {
5707
5915
  "CreateWebCallback": doCreateWebCallback,
5708
5916
  "DescribeExports": doDescribeExports,
5709
5917
  "DescribeConsoleSharingList": doDescribeConsoleSharingList,
5918
+ "DeleteCloudProductLogCollection": doDeleteCloudProductLogCollection,
5710
5919
  "CreateIndex": doCreateIndex,
5711
5920
  "QueryMetric": doQueryMetric,
5712
5921
  "ModifyShipper": doModifyShipper,
@@ -5718,12 +5927,15 @@ ACTION_MAP = {
5718
5927
  "DeleteDataTransform": doDeleteDataTransform,
5719
5928
  "CreateLogset": doCreateLogset,
5720
5929
  "CreateTopic": doCreateTopic,
5930
+ "DescribeCloudProductLogTasks": doDescribeCloudProductLogTasks,
5721
5931
  "DeleteAlarmNotice": doDeleteAlarmNotice,
5722
5932
  "DescribeAlertRecordHistory": doDescribeAlertRecordHistory,
5723
5933
  "DeleteKafkaRecharge": doDeleteKafkaRecharge,
5724
5934
  "CreateConfig": doCreateConfig,
5725
5935
  "DescribeLogsets": doDescribeLogsets,
5726
5936
  "DescribeTopics": doDescribeTopics,
5937
+ "CreateCloudProductLogCollection": doCreateCloudProductLogCollection,
5938
+ "CreateAlarmNotice": doCreateAlarmNotice,
5727
5939
  "CreateCosRecharge": doCreateCosRecharge,
5728
5940
  "MergePartition": doMergePartition,
5729
5941
  "ModifyAlarmNotice": doModifyAlarmNotice,
@@ -5731,12 +5943,12 @@ ACTION_MAP = {
5731
5943
  "CloseKafkaConsumer": doCloseKafkaConsumer,
5732
5944
  "ModifyIndex": doModifyIndex,
5733
5945
  "DescribeIndex": doDescribeIndex,
5946
+ "ModifyCloudProductLogCollection": doModifyCloudProductLogCollection,
5734
5947
  "CreateAlarmShield": doCreateAlarmShield,
5735
5948
  "CreateShipper": doCreateShipper,
5736
5949
  "CreateNoticeContent": doCreateNoticeContent,
5737
5950
  "DeleteConsumer": doDeleteConsumer,
5738
5951
  "DeleteMachineGroup": doDeleteMachineGroup,
5739
- "DescribeConfigMachineGroups": doDescribeConfigMachineGroups,
5740
5952
  "DescribeKafkaRecharges": doDescribeKafkaRecharges,
5741
5953
  "DescribeAlarms": doDescribeAlarms,
5742
5954
  "DescribeCosRecharges": doDescribeCosRecharges,
@@ -5779,7 +5991,7 @@ ACTION_MAP = {
5779
5991
  "DeleteAlarm": doDeleteAlarm,
5780
5992
  "DeleteShipper": doDeleteShipper,
5781
5993
  "QueryRangeMetric": doQueryRangeMetric,
5782
- "CreateAlarmNotice": doCreateAlarmNotice,
5994
+ "DescribeConfigMachineGroups": doDescribeConfigMachineGroups,
5783
5995
  "DeleteExport": doDeleteExport,
5784
5996
  "SplitPartition": doSplitPartition,
5785
5997
  "DescribeDataTransformInfo": doDescribeDataTransformInfo,