tccli 3.0.1240.1__py2.py3-none-any.whl → 3.0.1242.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/apm/v20210622/api.json +276 -279
  3. tccli/services/apm/v20210622/examples.json +30 -30
  4. tccli/services/autoscaling/v20180419/api.json +12 -1
  5. tccli/services/batch/v20170312/api.json +11 -11
  6. tccli/services/bh/v20230418/api.json +9 -0
  7. tccli/services/bh/v20230418/examples.json +2 -2
  8. tccli/services/billing/v20180709/api.json +20 -0
  9. tccli/services/cam/v20190116/api.json +1 -1
  10. tccli/services/car/v20220110/api.json +1 -1
  11. tccli/services/car/v20220110/examples.json +3 -3
  12. tccli/services/cdb/v20170320/api.json +582 -579
  13. tccli/services/cdb/v20170320/examples.json +9 -9
  14. tccli/services/cdwdoris/v20211228/api.json +40 -0
  15. tccli/services/cfg/v20210820/api.json +11 -0
  16. tccli/services/cfs/v20190719/api.json +20 -20
  17. tccli/services/cfs/v20190719/examples.json +5 -5
  18. tccli/services/chdfs/v20201112/api.json +10 -10
  19. tccli/services/chdfs/v20201112/examples.json +1 -1
  20. tccli/services/ckafka/v20190819/api.json +27 -0
  21. tccli/services/clb/v20180317/api.json +84 -64
  22. tccli/services/cls/cls_client.py +220 -8
  23. tccli/services/cls/v20201016/api.json +418 -40
  24. tccli/services/cls/v20201016/examples.json +89 -45
  25. tccli/services/cmq/v20190304/api.json +77 -77
  26. tccli/services/cvm/cvm_client.py +60 -325
  27. tccli/services/cvm/v20170312/api.json +618 -1401
  28. tccli/services/cvm/v20170312/examples.json +8 -48
  29. tccli/services/cwp/cwp_client.py +0 -53
  30. tccli/services/cwp/v20180228/api.json +3 -37
  31. tccli/services/cwp/v20180228/examples.json +2 -10
  32. tccli/services/cynosdb/v20190107/api.json +470 -476
  33. tccli/services/cynosdb/v20190107/examples.json +23 -23
  34. tccli/services/dbbrain/v20191016/api.json +16 -4
  35. tccli/services/dbbrain/v20191016/examples.json +5 -5
  36. tccli/services/dbbrain/v20210527/api.json +45 -45
  37. tccli/services/dbbrain/v20210527/examples.json +8 -8
  38. tccli/services/dnspod/v20210323/api.json +173 -119
  39. tccli/services/dnspod/v20210323/examples.json +18 -18
  40. tccli/services/dts/v20180330/api.json +30 -30
  41. tccli/services/dts/v20180330/examples.json +4 -4
  42. tccli/services/dts/v20211206/api.json +19 -9
  43. tccli/services/dts/v20211206/examples.json +5 -5
  44. tccli/services/ecm/v20190719/api.json +55 -48
  45. tccli/services/ecm/v20190719/examples.json +7 -7
  46. tccli/services/emr/emr_client.py +493 -16
  47. tccli/services/emr/v20190103/api.json +1323 -246
  48. tccli/services/emr/v20190103/examples.json +72 -0
  49. tccli/services/ess/v20201111/api.json +29 -11
  50. tccli/services/ess/v20201111/examples.json +6 -0
  51. tccli/services/essbasic/v20210526/api.json +89 -2
  52. tccli/services/essbasic/v20210526/examples.json +12 -0
  53. tccli/services/faceid/v20180301/api.json +3 -3
  54. tccli/services/gaap/v20180529/api.json +194 -196
  55. tccli/services/gaap/v20180529/examples.json +31 -37
  56. tccli/services/goosefs/v20220519/api.json +17 -17
  57. tccli/services/goosefs/v20220519/examples.json +4 -4
  58. tccli/services/gs/v20191118/api.json +3 -3
  59. tccli/services/gs/v20191118/examples.json +3 -3
  60. tccli/services/iai/iai_client.py +53 -0
  61. tccli/services/iai/v20200303/api.json +80 -0
  62. tccli/services/iai/v20200303/examples.json +14 -0
  63. tccli/services/iotexplorer/v20190423/api.json +10 -0
  64. tccli/services/iotvideoindustry/v20201201/api.json +84 -84
  65. tccli/services/iotvideoindustry/v20201201/examples.json +29 -29
  66. tccli/services/keewidb/v20220308/api.json +188 -190
  67. tccli/services/live/v20180801/api.json +324 -223
  68. tccli/services/live/v20180801/examples.json +79 -79
  69. tccli/services/mna/v20210119/api.json +52 -49
  70. tccli/services/mna/v20210119/examples.json +49 -49
  71. tccli/services/mps/v20190612/api.json +49 -0
  72. tccli/services/oceanus/v20190422/api.json +407 -39
  73. tccli/services/oceanus/v20190422/examples.json +1 -1
  74. tccli/services/ocr/ocr_client.py +110 -4
  75. tccli/services/ocr/v20181119/api.json +410 -6
  76. tccli/services/ocr/v20181119/examples.json +18 -2
  77. tccli/services/pts/v20210728/api.json +1 -1
  78. tccli/services/pts/v20210728/examples.json +1 -1
  79. tccli/services/sqlserver/v20180328/api.json +273 -144
  80. tccli/services/sqlserver/v20180328/examples.json +2 -2
  81. tccli/services/ssl/v20191205/api.json +829 -829
  82. tccli/services/ssl/v20191205/examples.json +14 -14
  83. tccli/services/tbaas/v20180416/api.json +127 -88
  84. tccli/services/tbaas/v20180416/examples.json +9 -9
  85. tccli/services/tcb/v20180608/api.json +229 -189
  86. tccli/services/tcb/v20180608/examples.json +23 -23
  87. tccli/services/tcm/v20210413/api.json +6 -6
  88. tccli/services/tcm/v20210413/examples.json +3 -3
  89. tccli/services/tcr/v20190924/api.json +25 -20
  90. tccli/services/tcr/v20190924/examples.json +4 -4
  91. tccli/services/tdmq/tdmq_client.py +167 -8
  92. tccli/services/tdmq/v20200217/api.json +325 -0
  93. tccli/services/tdmq/v20200217/examples.json +24 -0
  94. tccli/services/tem/v20210701/api.json +439 -280
  95. tccli/services/tem/v20210701/examples.json +39 -39
  96. tccli/services/teo/v20220901/api.json +2 -2
  97. tccli/services/teo/v20220901/examples.json +3 -3
  98. tccli/services/thpc/v20211109/api.json +46 -58
  99. tccli/services/thpc/v20211109/examples.json +2 -2
  100. tccli/services/thpc/v20220401/api.json +168 -181
  101. tccli/services/thpc/v20220401/examples.json +1 -1
  102. tccli/services/thpc/v20230321/api.json +99 -102
  103. tccli/services/thpc/v20230321/examples.json +3 -3
  104. tccli/services/tke/v20180525/api.json +50 -39
  105. tccli/services/tke/v20180525/examples.json +51 -21
  106. tccli/services/tke/v20220501/api.json +146 -97
  107. tccli/services/tke/v20220501/examples.json +15 -21
  108. tccli/services/trocket/trocket_client.py +53 -0
  109. tccli/services/trocket/v20230308/api.json +219 -0
  110. tccli/services/trocket/v20230308/examples.json +8 -0
  111. tccli/services/trro/v20220325/api.json +27 -27
  112. tccli/services/trro/v20220325/examples.json +1 -1
  113. tccli/services/trtc/v20190722/api.json +31 -20
  114. tccli/services/trtc/v20190722/examples.json +11 -11
  115. tccli/services/tse/v20201207/api.json +187 -122
  116. tccli/services/tse/v20201207/examples.json +36 -36
  117. tccli/services/tsf/v20180326/api.json +448 -434
  118. tccli/services/tsf/v20180326/examples.json +122 -122
  119. tccli/services/tts/v20190823/api.json +1 -1
  120. tccli/services/vpc/v20170312/api.json +582 -291
  121. tccli/services/vpc/v20170312/examples.json +75 -27
  122. tccli/services/vpc/vpc_client.py +159 -0
  123. tccli/services/waf/v20180125/api.json +305 -6
  124. tccli/services/waf/v20180125/examples.json +25 -1
  125. tccli/services/waf/waf_client.py +163 -4
  126. {tccli-3.0.1240.1.dist-info → tccli-3.0.1242.1.dist-info}/METADATA +2 -2
  127. {tccli-3.0.1240.1.dist-info → tccli-3.0.1242.1.dist-info}/RECORD +130 -130
  128. {tccli-3.0.1240.1.dist-info → tccli-3.0.1242.1.dist-info}/WHEEL +0 -0
  129. {tccli-3.0.1240.1.dist-info → tccli-3.0.1242.1.dist-info}/entry_points.txt +0 -0
  130. {tccli-3.0.1240.1.dist-info → tccli-3.0.1242.1.dist-info}/license_files/LICENSE +0 -0
@@ -69,7 +69,7 @@ def doModifyKafkaConsumer(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doCreateKafkaRecharge(args, parsed_globals):
72
+ def doCreateWebCallback(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,11 @@ def doCreateKafkaRecharge(args, parsed_globals):
98
98
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.CreateKafkaRechargeRequest()
101
+ model = models.CreateWebCallbackRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.CreateKafkaRecharge(model)
105
+ rsp = client.CreateWebCallback(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -381,6 +381,58 @@ def doModifyShipper(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
+ def doCreateKafkaRecharge(args, parsed_globals):
385
+ g_param = parse_global_arg(parsed_globals)
386
+
387
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
388
+ cred = credential.CVMRoleCredential()
389
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
390
+ cred = credential.STSAssumeRoleCredential(
391
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
392
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
393
+ )
394
+ 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):
395
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
396
+ else:
397
+ cred = credential.Credential(
398
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
399
+ )
400
+ http_profile = HttpProfile(
401
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
402
+ reqMethod="POST",
403
+ endpoint=g_param[OptionsDefine.Endpoint],
404
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
405
+ )
406
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
407
+ if g_param[OptionsDefine.Language]:
408
+ profile.language = g_param[OptionsDefine.Language]
409
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
410
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
411
+ client._sdkVersion += ("_CLI_" + __version__)
412
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
+ model = models.CreateKafkaRechargeRequest()
414
+ model.from_json_string(json.dumps(args))
415
+ start_time = time.time()
416
+ while True:
417
+ rsp = client.CreateKafkaRecharge(model)
418
+ result = rsp.to_json_string()
419
+ try:
420
+ json_obj = json.loads(result)
421
+ except TypeError as e:
422
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
423
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
424
+ break
425
+ cur_time = time.time()
426
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
427
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
428
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
429
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
430
+ else:
431
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
432
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
433
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
+
435
+
384
436
  def doDescribeConfigs(args, parsed_globals):
385
437
  g_param = parse_global_arg(parsed_globals)
386
438
 
@@ -1161,6 +1213,58 @@ def doDescribeTopics(args, parsed_globals):
1161
1213
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
1214
 
1163
1215
 
1216
+ def doCreateAlarmNotice(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.CreateAlarmNoticeRequest()
1246
+ model.from_json_string(json.dumps(args))
1247
+ start_time = time.time()
1248
+ while True:
1249
+ rsp = client.CreateAlarmNotice(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
+
1164
1268
  def doCreateCosRecharge(args, parsed_globals):
1165
1269
  g_param = parse_global_arg(parsed_globals)
1166
1270
 
@@ -2409,7 +2513,7 @@ def doDeleteIndex(args, parsed_globals):
2409
2513
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
2514
 
2411
2515
 
2412
- def doCreateAlarmNotice(args, parsed_globals):
2516
+ def doDeleteWebCallback(args, parsed_globals):
2413
2517
  g_param = parse_global_arg(parsed_globals)
2414
2518
 
2415
2519
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2438,11 +2542,11 @@ def doCreateAlarmNotice(args, parsed_globals):
2438
2542
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2439
2543
  client._sdkVersion += ("_CLI_" + __version__)
2440
2544
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
- model = models.CreateAlarmNoticeRequest()
2545
+ model = models.DeleteWebCallbackRequest()
2442
2546
  model.from_json_string(json.dumps(args))
2443
2547
  start_time = time.time()
2444
2548
  while True:
2445
- rsp = client.CreateAlarmNotice(model)
2549
+ rsp = client.DeleteWebCallback(model)
2446
2550
  result = rsp.to_json_string()
2447
2551
  try:
2448
2552
  json_obj = json.loads(result)
@@ -3293,6 +3397,58 @@ def doModifyKafkaRecharge(args, parsed_globals):
3293
3397
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3294
3398
 
3295
3399
 
3400
+ def doDescribeWebCallbacks(args, parsed_globals):
3401
+ g_param = parse_global_arg(parsed_globals)
3402
+
3403
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3404
+ cred = credential.CVMRoleCredential()
3405
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3406
+ cred = credential.STSAssumeRoleCredential(
3407
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3408
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3409
+ )
3410
+ 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):
3411
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3412
+ else:
3413
+ cred = credential.Credential(
3414
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3415
+ )
3416
+ http_profile = HttpProfile(
3417
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3418
+ reqMethod="POST",
3419
+ endpoint=g_param[OptionsDefine.Endpoint],
3420
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3421
+ )
3422
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3423
+ if g_param[OptionsDefine.Language]:
3424
+ profile.language = g_param[OptionsDefine.Language]
3425
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3426
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3427
+ client._sdkVersion += ("_CLI_" + __version__)
3428
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3429
+ model = models.DescribeWebCallbacksRequest()
3430
+ model.from_json_string(json.dumps(args))
3431
+ start_time = time.time()
3432
+ while True:
3433
+ rsp = client.DescribeWebCallbacks(model)
3434
+ result = rsp.to_json_string()
3435
+ try:
3436
+ json_obj = json.loads(result)
3437
+ except TypeError as e:
3438
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3439
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3440
+ break
3441
+ cur_time = time.time()
3442
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3443
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3444
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3445
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3446
+ else:
3447
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3448
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3449
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3450
+
3451
+
3296
3452
  def doDescribeKafkaConsumer(args, parsed_globals):
3297
3453
  g_param = parse_global_arg(parsed_globals)
3298
3454
 
@@ -4385,6 +4541,58 @@ def doDescribeDashboardSubscribes(args, parsed_globals):
4385
4541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4386
4542
 
4387
4543
 
4544
+ def doModifyWebCallback(args, parsed_globals):
4545
+ g_param = parse_global_arg(parsed_globals)
4546
+
4547
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4548
+ cred = credential.CVMRoleCredential()
4549
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4550
+ cred = credential.STSAssumeRoleCredential(
4551
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4552
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4553
+ )
4554
+ 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):
4555
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4556
+ else:
4557
+ cred = credential.Credential(
4558
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4559
+ )
4560
+ http_profile = HttpProfile(
4561
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4562
+ reqMethod="POST",
4563
+ endpoint=g_param[OptionsDefine.Endpoint],
4564
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4565
+ )
4566
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4567
+ if g_param[OptionsDefine.Language]:
4568
+ profile.language = g_param[OptionsDefine.Language]
4569
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4570
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4571
+ client._sdkVersion += ("_CLI_" + __version__)
4572
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4573
+ model = models.ModifyWebCallbackRequest()
4574
+ model.from_json_string(json.dumps(args))
4575
+ start_time = time.time()
4576
+ while True:
4577
+ rsp = client.ModifyWebCallback(model)
4578
+ result = rsp.to_json_string()
4579
+ try:
4580
+ json_obj = json.loads(result)
4581
+ except TypeError as e:
4582
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4583
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4584
+ break
4585
+ cur_time = time.time()
4586
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4587
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4588
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4589
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4590
+ else:
4591
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4592
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4593
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4594
+
4595
+
4388
4596
  def doModifyMachineGroup(args, parsed_globals):
4389
4597
  g_param = parse_global_arg(parsed_globals)
4390
4598
 
@@ -5704,12 +5912,13 @@ MODELS_MAP = {
5704
5912
 
5705
5913
  ACTION_MAP = {
5706
5914
  "ModifyKafkaConsumer": doModifyKafkaConsumer,
5707
- "CreateKafkaRecharge": doCreateKafkaRecharge,
5915
+ "CreateWebCallback": doCreateWebCallback,
5708
5916
  "DescribeExports": doDescribeExports,
5709
5917
  "DescribeConsoleSharingList": doDescribeConsoleSharingList,
5710
5918
  "CreateIndex": doCreateIndex,
5711
5919
  "QueryMetric": doQueryMetric,
5712
5920
  "ModifyShipper": doModifyShipper,
5921
+ "CreateKafkaRecharge": doCreateKafkaRecharge,
5713
5922
  "DescribeConfigs": doDescribeConfigs,
5714
5923
  "CreateDeliverCloudFunction": doCreateDeliverCloudFunction,
5715
5924
  "DeleteLogset": doDeleteLogset,
@@ -5725,6 +5934,7 @@ ACTION_MAP = {
5725
5934
  "CreateConfig": doCreateConfig,
5726
5935
  "DescribeLogsets": doDescribeLogsets,
5727
5936
  "DescribeTopics": doDescribeTopics,
5937
+ "CreateAlarmNotice": doCreateAlarmNotice,
5728
5938
  "CreateCosRecharge": doCreateCosRecharge,
5729
5939
  "MergePartition": doMergePartition,
5730
5940
  "ModifyAlarmNotice": doModifyAlarmNotice,
@@ -5749,7 +5959,7 @@ ACTION_MAP = {
5749
5959
  "CreateDashboardSubscribe": doCreateDashboardSubscribe,
5750
5960
  "ModifyDashboardSubscribe": doModifyDashboardSubscribe,
5751
5961
  "DeleteIndex": doDeleteIndex,
5752
- "CreateAlarmNotice": doCreateAlarmNotice,
5962
+ "DeleteWebCallback": doDeleteWebCallback,
5753
5963
  "ModifyCosRecharge": doModifyCosRecharge,
5754
5964
  "ModifyConfigExtra": doModifyConfigExtra,
5755
5965
  "ModifyAlarmShield": doModifyAlarmShield,
@@ -5766,6 +5976,7 @@ ACTION_MAP = {
5766
5976
  "ModifyNoticeContent": doModifyNoticeContent,
5767
5977
  "SearchCosRechargeInfo": doSearchCosRechargeInfo,
5768
5978
  "ModifyKafkaRecharge": doModifyKafkaRecharge,
5979
+ "DescribeWebCallbacks": doDescribeWebCallbacks,
5769
5980
  "DescribeKafkaConsumer": doDescribeKafkaConsumer,
5770
5981
  "DeleteDashboardSubscribe": doDeleteDashboardSubscribe,
5771
5982
  "CreateDataTransform": doCreateDataTransform,
@@ -5787,6 +5998,7 @@ ACTION_MAP = {
5787
5998
  "CreateConsumer": doCreateConsumer,
5788
5999
  "ModifyTopic": doModifyTopic,
5789
6000
  "DescribeDashboardSubscribes": doDescribeDashboardSubscribes,
6001
+ "ModifyWebCallback": doModifyWebCallback,
5790
6002
  "ModifyMachineGroup": doModifyMachineGroup,
5791
6003
  "DescribeScheduledSqlInfo": doDescribeScheduledSqlInfo,
5792
6004
  "DeleteConfig": doDeleteConfig,