tccli 3.0.1005.1__py2.py3-none-any.whl → 3.0.1006.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 (61) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cdb/v20170320/CloseAuditService.md +20 -0
  3. tccli/examples/cdb/v20170320/CreateAuditRuleTemplate.md +31 -0
  4. tccli/examples/cdb/v20170320/DeleteAuditRuleTemplates.md +20 -0
  5. tccli/examples/cdb/v20170320/DeleteDatabase.md +21 -0
  6. tccli/examples/cdb/v20170320/DescribeAuditInstanceList.md +51 -0
  7. tccli/examples/cdb/v20170320/DescribeAuditRuleTemplateModifyHistory.md +70 -0
  8. tccli/examples/cdb/v20170320/DescribeAuditRuleTemplates.md +61 -0
  9. tccli/examples/cdb/v20170320/ModifyAuditRuleTemplates.md +21 -0
  10. tccli/examples/cdb/v20170320/ModifyAuditService.md +23 -0
  11. tccli/examples/cfg/v20210820/DescribeTaskPolicyTriggerLog.md +38 -0
  12. tccli/examples/cfg/v20210820/TriggerPolicy.md +25 -0
  13. tccli/examples/config/v20220802/ListAggregateConfigRules.md +79 -0
  14. tccli/examples/config/v20220802/ListConfigRules.md +138 -0
  15. tccli/examples/tdmq/v20200217/CreateProCluster.md +3 -3
  16. tccli/examples/teo/v20220901/DescribeOverviewL7Data.md +4 -2
  17. tccli/examples/teo/v20220901/DescribePrefetchTasks.md +2 -1
  18. tccli/examples/teo/v20220901/DescribePurgeTasks.md +2 -1
  19. tccli/examples/teo/v20220901/DescribeTimingL4Data.md +4 -1
  20. tccli/examples/teo/v20220901/DescribeTimingL7AnalysisData.md +6 -3
  21. tccli/examples/teo/v20220901/DescribeTimingL7CacheData.md +6 -3
  22. tccli/examples/teo/v20220901/DescribeTopL7AnalysisData.md +6 -3
  23. tccli/examples/teo/v20220901/DescribeTopL7CacheData.md +8 -4
  24. tccli/examples/teo/v20220901/DownloadL4Logs.md +2 -1
  25. tccli/examples/teo/v20220901/DownloadL7Logs.md +2 -1
  26. tccli/examples/tke/v20180525/DescribeIPAMD.md +6 -3
  27. tccli/examples/tse/v20201207/CloseWafProtection.md +21 -0
  28. tccli/examples/tse/v20201207/CreateWafDomains.md +21 -0
  29. tccli/examples/tse/v20201207/OpenWafProtection.md +21 -0
  30. tccli/examples/vod/v20180717/DescribeTaskDetail.md +4 -0
  31. tccli/examples/vrs/v20200824/GetVRSVoiceTypes.md +4 -2
  32. tccli/services/__init__.py +3 -0
  33. tccli/services/cdb/cdb_client.py +497 -20
  34. tccli/services/cdb/v20170320/api.json +1174 -51
  35. tccli/services/cdb/v20170320/examples.json +72 -0
  36. tccli/services/cfg/cfg_client.py +106 -0
  37. tccli/services/cfg/v20210820/api.json +199 -0
  38. tccli/services/cfg/v20210820/examples.json +16 -0
  39. tccli/services/config/__init__.py +4 -0
  40. tccli/services/config/config_client.py +247 -0
  41. tccli/services/config/v20220802/api.json +767 -0
  42. tccli/services/config/v20220802/examples.json +21 -0
  43. tccli/services/hai/v20230812/api.json +11 -0
  44. tccli/services/tdmq/v20200217/api.json +50 -30
  45. tccli/services/tdmq/v20200217/examples.json +2 -2
  46. tccli/services/teo/v20220901/api.json +51 -40
  47. tccli/services/teo/v20220901/examples.json +24 -24
  48. tccli/services/tke/v20180525/api.json +18 -8
  49. tccli/services/tke/v20180525/examples.json +2 -2
  50. tccli/services/tse/tse_client.py +159 -0
  51. tccli/services/tse/v20201207/api.json +147 -0
  52. tccli/services/tse/v20201207/examples.json +24 -0
  53. tccli/services/vod/v20180717/api.json +278 -24
  54. tccli/services/vod/v20180717/examples.json +4 -4
  55. tccli/services/vrs/v20200824/examples.json +1 -1
  56. tccli/services/waf/v20180125/api.json +3 -3
  57. {tccli-3.0.1005.1.dist-info → tccli-3.0.1006.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1005.1.dist-info → tccli-3.0.1006.1.dist-info}/RECORD +61 -41
  59. {tccli-3.0.1005.1.dist-info → tccli-3.0.1006.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1005.1.dist-info → tccli-3.0.1006.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1005.1.dist-info → tccli-3.0.1006.1.dist-info}/license_files/LICENSE +0 -0
@@ -225,7 +225,7 @@ def doDescribeDBFeatures(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doDescribeDataBackupOverview(args, parsed_globals):
228
+ def doCreateAuditRuleTemplate(args, parsed_globals):
229
229
  g_param = parse_global_arg(parsed_globals)
230
230
 
231
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +254,11 @@ def doDescribeDataBackupOverview(args, parsed_globals):
254
254
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.DescribeDataBackupOverviewRequest()
257
+ model = models.CreateAuditRuleTemplateRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.DescribeDataBackupOverview(model)
261
+ rsp = client.CreateAuditRuleTemplate(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -849,6 +849,58 @@ def doDescribeCdbZoneConfig(args, parsed_globals):
849
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
850
 
851
851
 
852
+ def doCloseAuditService(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('-', '_')]
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.CdbClient(cred, g_param[OptionsDefine.Region], profile)
879
+ client._sdkVersion += ("_CLI_" + __version__)
880
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
+ model = models.CloseAuditServiceRequest()
882
+ model.from_json_string(json.dumps(args))
883
+ start_time = time.time()
884
+ while True:
885
+ rsp = client.CloseAuditService(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
+
852
904
  def doStopRollback(args, parsed_globals):
853
905
  g_param = parse_global_arg(parsed_globals)
854
906
 
@@ -1369,6 +1421,58 @@ def doDescribeBackupConfig(args, parsed_globals):
1369
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
1422
 
1371
1423
 
1424
+ def doOpenDBInstanceEncryption(args, parsed_globals):
1425
+ g_param = parse_global_arg(parsed_globals)
1426
+
1427
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1428
+ cred = credential.CVMRoleCredential()
1429
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1430
+ cred = credential.STSAssumeRoleCredential(
1431
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1432
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1433
+ )
1434
+ 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):
1435
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1436
+ else:
1437
+ cred = credential.Credential(
1438
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1439
+ )
1440
+ http_profile = HttpProfile(
1441
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1442
+ reqMethod="POST",
1443
+ endpoint=g_param[OptionsDefine.Endpoint],
1444
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1445
+ )
1446
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1447
+ if g_param[OptionsDefine.Language]:
1448
+ profile.language = g_param[OptionsDefine.Language]
1449
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1450
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
1451
+ client._sdkVersion += ("_CLI_" + __version__)
1452
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1453
+ model = models.OpenDBInstanceEncryptionRequest()
1454
+ model.from_json_string(json.dumps(args))
1455
+ start_time = time.time()
1456
+ while True:
1457
+ rsp = client.OpenDBInstanceEncryption(model)
1458
+ result = rsp.to_json_string()
1459
+ try:
1460
+ json_obj = json.loads(result)
1461
+ except TypeError as e:
1462
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1463
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1464
+ break
1465
+ cur_time = time.time()
1466
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1467
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1468
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1469
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1470
+ else:
1471
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1472
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1473
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1474
+
1475
+
1372
1476
  def doCloseWanService(args, parsed_globals):
1373
1477
  g_param = parse_global_arg(parsed_globals)
1374
1478
 
@@ -1525,7 +1629,7 @@ def doDescribeAuditPolicies(args, parsed_globals):
1525
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
1630
 
1527
1631
 
1528
- def doOpenDBInstanceEncryption(args, parsed_globals):
1632
+ def doDeleteDatabase(args, parsed_globals):
1529
1633
  g_param = parse_global_arg(parsed_globals)
1530
1634
 
1531
1635
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1554,11 +1658,11 @@ def doOpenDBInstanceEncryption(args, parsed_globals):
1554
1658
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
1555
1659
  client._sdkVersion += ("_CLI_" + __version__)
1556
1660
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.OpenDBInstanceEncryptionRequest()
1661
+ model = models.DeleteDatabaseRequest()
1558
1662
  model.from_json_string(json.dumps(args))
1559
1663
  start_time = time.time()
1560
1664
  while True:
1561
- rsp = client.OpenDBInstanceEncryption(model)
1665
+ rsp = client.DeleteDatabase(model)
1562
1666
  result = rsp.to_json_string()
1563
1667
  try:
1564
1668
  json_obj = json.loads(result)
@@ -1785,7 +1889,7 @@ def doSwitchDBInstanceMasterSlave(args, parsed_globals):
1785
1889
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1786
1890
 
1787
1891
 
1788
- def doDeleteAuditPolicy(args, parsed_globals):
1892
+ def doCreateDatabase(args, parsed_globals):
1789
1893
  g_param = parse_global_arg(parsed_globals)
1790
1894
 
1791
1895
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1814,11 +1918,11 @@ def doDeleteAuditPolicy(args, parsed_globals):
1814
1918
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
1815
1919
  client._sdkVersion += ("_CLI_" + __version__)
1816
1920
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
- model = models.DeleteAuditPolicyRequest()
1921
+ model = models.CreateDatabaseRequest()
1818
1922
  model.from_json_string(json.dumps(args))
1819
1923
  start_time = time.time()
1820
1924
  while True:
1821
- rsp = client.DeleteAuditPolicy(model)
1925
+ rsp = client.CreateDatabase(model)
1822
1926
  result = rsp.to_json_string()
1823
1927
  try:
1824
1928
  json_obj = json.loads(result)
@@ -2097,6 +2201,58 @@ def doDescribeAccountPrivileges(args, parsed_globals):
2097
2201
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
2202
 
2099
2203
 
2204
+ def doDescribeDataBackupOverview(args, parsed_globals):
2205
+ g_param = parse_global_arg(parsed_globals)
2206
+
2207
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2208
+ cred = credential.CVMRoleCredential()
2209
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2210
+ cred = credential.STSAssumeRoleCredential(
2211
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2212
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2213
+ )
2214
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2215
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2216
+ else:
2217
+ cred = credential.Credential(
2218
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2219
+ )
2220
+ http_profile = HttpProfile(
2221
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2222
+ reqMethod="POST",
2223
+ endpoint=g_param[OptionsDefine.Endpoint],
2224
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2225
+ )
2226
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2227
+ if g_param[OptionsDefine.Language]:
2228
+ profile.language = g_param[OptionsDefine.Language]
2229
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2230
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
2231
+ client._sdkVersion += ("_CLI_" + __version__)
2232
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2233
+ model = models.DescribeDataBackupOverviewRequest()
2234
+ model.from_json_string(json.dumps(args))
2235
+ start_time = time.time()
2236
+ while True:
2237
+ rsp = client.DescribeDataBackupOverview(model)
2238
+ result = rsp.to_json_string()
2239
+ try:
2240
+ json_obj = json.loads(result)
2241
+ except TypeError as e:
2242
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2243
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2244
+ break
2245
+ cur_time = time.time()
2246
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2247
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2248
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2249
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2250
+ else:
2251
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2252
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2253
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
+
2255
+
2100
2256
  def doReleaseIsolatedDBInstances(args, parsed_globals):
2101
2257
  g_param = parse_global_arg(parsed_globals)
2102
2258
 
@@ -2461,7 +2617,7 @@ def doSwitchForUpgrade(args, parsed_globals):
2461
2617
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
2618
 
2463
2619
 
2464
- def doDeleteParamTemplate(args, parsed_globals):
2620
+ def doDeleteAuditRuleTemplates(args, parsed_globals):
2465
2621
  g_param = parse_global_arg(parsed_globals)
2466
2622
 
2467
2623
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2490,11 +2646,11 @@ def doDeleteParamTemplate(args, parsed_globals):
2490
2646
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
2491
2647
  client._sdkVersion += ("_CLI_" + __version__)
2492
2648
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2493
- model = models.DeleteParamTemplateRequest()
2649
+ model = models.DeleteAuditRuleTemplatesRequest()
2494
2650
  model.from_json_string(json.dumps(args))
2495
2651
  start_time = time.time()
2496
2652
  while True:
2497
- rsp = client.DeleteParamTemplate(model)
2653
+ rsp = client.DeleteAuditRuleTemplates(model)
2498
2654
  result = rsp.to_json_string()
2499
2655
  try:
2500
2656
  json_obj = json.loads(result)
@@ -2565,6 +2721,58 @@ def doDescribeBackups(args, parsed_globals):
2565
2721
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
2722
 
2567
2723
 
2724
+ def doDescribeAuditInstanceList(args, parsed_globals):
2725
+ g_param = parse_global_arg(parsed_globals)
2726
+
2727
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2728
+ cred = credential.CVMRoleCredential()
2729
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2730
+ cred = credential.STSAssumeRoleCredential(
2731
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2732
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2733
+ )
2734
+ 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):
2735
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2736
+ else:
2737
+ cred = credential.Credential(
2738
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2739
+ )
2740
+ http_profile = HttpProfile(
2741
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2742
+ reqMethod="POST",
2743
+ endpoint=g_param[OptionsDefine.Endpoint],
2744
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2745
+ )
2746
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2747
+ if g_param[OptionsDefine.Language]:
2748
+ profile.language = g_param[OptionsDefine.Language]
2749
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2750
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
2751
+ client._sdkVersion += ("_CLI_" + __version__)
2752
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2753
+ model = models.DescribeAuditInstanceListRequest()
2754
+ model.from_json_string(json.dumps(args))
2755
+ start_time = time.time()
2756
+ while True:
2757
+ rsp = client.DescribeAuditInstanceList(model)
2758
+ result = rsp.to_json_string()
2759
+ try:
2760
+ json_obj = json.loads(result)
2761
+ except TypeError as e:
2762
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2763
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2764
+ break
2765
+ cur_time = time.time()
2766
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2767
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2768
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2769
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2770
+ else:
2771
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2772
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2773
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2774
+
2775
+
2568
2776
  def doCreateParamTemplate(args, parsed_globals):
2569
2777
  g_param = parse_global_arg(parsed_globals)
2570
2778
 
@@ -3033,7 +3241,7 @@ def doCreateCdbProxyAddress(args, parsed_globals):
3033
3241
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3034
3242
 
3035
3243
 
3036
- def doCreateDatabase(args, parsed_globals):
3244
+ def doDeleteAuditPolicy(args, parsed_globals):
3037
3245
  g_param = parse_global_arg(parsed_globals)
3038
3246
 
3039
3247
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3062,11 +3270,11 @@ def doCreateDatabase(args, parsed_globals):
3062
3270
  client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
3063
3271
  client._sdkVersion += ("_CLI_" + __version__)
3064
3272
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3065
- model = models.CreateDatabaseRequest()
3273
+ model = models.DeleteAuditPolicyRequest()
3066
3274
  model.from_json_string(json.dumps(args))
3067
3275
  start_time = time.time()
3068
3276
  while True:
3069
- rsp = client.CreateDatabase(model)
3277
+ rsp = client.DeleteAuditPolicy(model)
3070
3278
  result = rsp.to_json_string()
3071
3279
  try:
3072
3280
  json_obj = json.loads(result)
@@ -5997,6 +6205,58 @@ def doResetRootAccount(args, parsed_globals):
5997
6205
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5998
6206
 
5999
6207
 
6208
+ def doModifyAuditRuleTemplates(args, parsed_globals):
6209
+ g_param = parse_global_arg(parsed_globals)
6210
+
6211
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6212
+ cred = credential.CVMRoleCredential()
6213
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6214
+ cred = credential.STSAssumeRoleCredential(
6215
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6216
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
6217
+ )
6218
+ 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):
6219
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6220
+ else:
6221
+ cred = credential.Credential(
6222
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6223
+ )
6224
+ http_profile = HttpProfile(
6225
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6226
+ reqMethod="POST",
6227
+ endpoint=g_param[OptionsDefine.Endpoint],
6228
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6229
+ )
6230
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6231
+ if g_param[OptionsDefine.Language]:
6232
+ profile.language = g_param[OptionsDefine.Language]
6233
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6234
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
6235
+ client._sdkVersion += ("_CLI_" + __version__)
6236
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6237
+ model = models.ModifyAuditRuleTemplatesRequest()
6238
+ model.from_json_string(json.dumps(args))
6239
+ start_time = time.time()
6240
+ while True:
6241
+ rsp = client.ModifyAuditRuleTemplates(model)
6242
+ result = rsp.to_json_string()
6243
+ try:
6244
+ json_obj = json.loads(result)
6245
+ except TypeError as e:
6246
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6247
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6248
+ break
6249
+ cur_time = time.time()
6250
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6251
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6252
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6253
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6254
+ else:
6255
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6256
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6257
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6258
+
6259
+
6000
6260
  def doModifyAccountPassword(args, parsed_globals):
6001
6261
  g_param = parse_global_arg(parsed_globals)
6002
6262
 
@@ -6309,6 +6569,58 @@ def doDeleteAuditLogFile(args, parsed_globals):
6309
6569
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6310
6570
 
6311
6571
 
6572
+ def doDescribeAuditRuleTemplates(args, parsed_globals):
6573
+ g_param = parse_global_arg(parsed_globals)
6574
+
6575
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6576
+ cred = credential.CVMRoleCredential()
6577
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6578
+ cred = credential.STSAssumeRoleCredential(
6579
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6580
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
6581
+ )
6582
+ 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):
6583
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6584
+ else:
6585
+ cred = credential.Credential(
6586
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6587
+ )
6588
+ http_profile = HttpProfile(
6589
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6590
+ reqMethod="POST",
6591
+ endpoint=g_param[OptionsDefine.Endpoint],
6592
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6593
+ )
6594
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6595
+ if g_param[OptionsDefine.Language]:
6596
+ profile.language = g_param[OptionsDefine.Language]
6597
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6598
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
6599
+ client._sdkVersion += ("_CLI_" + __version__)
6600
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6601
+ model = models.DescribeAuditRuleTemplatesRequest()
6602
+ model.from_json_string(json.dumps(args))
6603
+ start_time = time.time()
6604
+ while True:
6605
+ rsp = client.DescribeAuditRuleTemplates(model)
6606
+ result = rsp.to_json_string()
6607
+ try:
6608
+ json_obj = json.loads(result)
6609
+ except TypeError as e:
6610
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6611
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6612
+ break
6613
+ cur_time = time.time()
6614
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6615
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6616
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6617
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6618
+ else:
6619
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6620
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6621
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6622
+
6623
+
6312
6624
  def doModifyBackupConfig(args, parsed_globals):
6313
6625
  g_param = parse_global_arg(parsed_globals)
6314
6626
 
@@ -6621,6 +6933,58 @@ def doDescribeDBInstanceLogToCLS(args, parsed_globals):
6621
6933
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6622
6934
 
6623
6935
 
6936
+ def doDescribeAuditRuleTemplateModifyHistory(args, parsed_globals):
6937
+ g_param = parse_global_arg(parsed_globals)
6938
+
6939
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6940
+ cred = credential.CVMRoleCredential()
6941
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6942
+ cred = credential.STSAssumeRoleCredential(
6943
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6944
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
6945
+ )
6946
+ 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):
6947
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6948
+ else:
6949
+ cred = credential.Credential(
6950
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6951
+ )
6952
+ http_profile = HttpProfile(
6953
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6954
+ reqMethod="POST",
6955
+ endpoint=g_param[OptionsDefine.Endpoint],
6956
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6957
+ )
6958
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6959
+ if g_param[OptionsDefine.Language]:
6960
+ profile.language = g_param[OptionsDefine.Language]
6961
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6962
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
6963
+ client._sdkVersion += ("_CLI_" + __version__)
6964
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6965
+ model = models.DescribeAuditRuleTemplateModifyHistoryRequest()
6966
+ model.from_json_string(json.dumps(args))
6967
+ start_time = time.time()
6968
+ while True:
6969
+ rsp = client.DescribeAuditRuleTemplateModifyHistory(model)
6970
+ result = rsp.to_json_string()
6971
+ try:
6972
+ json_obj = json.loads(result)
6973
+ except TypeError as e:
6974
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6975
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6976
+ break
6977
+ cur_time = time.time()
6978
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6979
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6980
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6981
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6982
+ else:
6983
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6984
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6985
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6986
+
6987
+
6624
6988
  def doCreateCdbProxy(args, parsed_globals):
6625
6989
  g_param = parse_global_arg(parsed_globals)
6626
6990
 
@@ -6777,6 +7141,58 @@ def doSwitchCDBProxy(args, parsed_globals):
6777
7141
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6778
7142
 
6779
7143
 
7144
+ def doModifyAuditService(args, parsed_globals):
7145
+ g_param = parse_global_arg(parsed_globals)
7146
+
7147
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
7148
+ cred = credential.CVMRoleCredential()
7149
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
7150
+ cred = credential.STSAssumeRoleCredential(
7151
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
7152
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
7153
+ )
7154
+ 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):
7155
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
7156
+ else:
7157
+ cred = credential.Credential(
7158
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
7159
+ )
7160
+ http_profile = HttpProfile(
7161
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
7162
+ reqMethod="POST",
7163
+ endpoint=g_param[OptionsDefine.Endpoint],
7164
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
7165
+ )
7166
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
7167
+ if g_param[OptionsDefine.Language]:
7168
+ profile.language = g_param[OptionsDefine.Language]
7169
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
7170
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
7171
+ client._sdkVersion += ("_CLI_" + __version__)
7172
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
7173
+ model = models.ModifyAuditServiceRequest()
7174
+ model.from_json_string(json.dumps(args))
7175
+ start_time = time.time()
7176
+ while True:
7177
+ rsp = client.ModifyAuditService(model)
7178
+ result = rsp.to_json_string()
7179
+ try:
7180
+ json_obj = json.loads(result)
7181
+ except TypeError as e:
7182
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
7183
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
7184
+ break
7185
+ cur_time = time.time()
7186
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
7187
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
7188
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
7189
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
7190
+ else:
7191
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
7192
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
7193
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7194
+
7195
+
6780
7196
  def doRenewDBInstance(args, parsed_globals):
6781
7197
  g_param = parse_global_arg(parsed_globals)
6782
7198
 
@@ -7245,6 +7661,58 @@ def doDescribeSupportedPrivileges(args, parsed_globals):
7245
7661
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7246
7662
 
7247
7663
 
7664
+ def doDeleteParamTemplate(args, parsed_globals):
7665
+ g_param = parse_global_arg(parsed_globals)
7666
+
7667
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
7668
+ cred = credential.CVMRoleCredential()
7669
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
7670
+ cred = credential.STSAssumeRoleCredential(
7671
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
7672
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
7673
+ )
7674
+ 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):
7675
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
7676
+ else:
7677
+ cred = credential.Credential(
7678
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
7679
+ )
7680
+ http_profile = HttpProfile(
7681
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
7682
+ reqMethod="POST",
7683
+ endpoint=g_param[OptionsDefine.Endpoint],
7684
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
7685
+ )
7686
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
7687
+ if g_param[OptionsDefine.Language]:
7688
+ profile.language = g_param[OptionsDefine.Language]
7689
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
7690
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
7691
+ client._sdkVersion += ("_CLI_" + __version__)
7692
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
7693
+ model = models.DeleteParamTemplateRequest()
7694
+ model.from_json_string(json.dumps(args))
7695
+ start_time = time.time()
7696
+ while True:
7697
+ rsp = client.DeleteParamTemplate(model)
7698
+ result = rsp.to_json_string()
7699
+ try:
7700
+ json_obj = json.loads(result)
7701
+ except TypeError as e:
7702
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
7703
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
7704
+ break
7705
+ cur_time = time.time()
7706
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
7707
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
7708
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
7709
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
7710
+ else:
7711
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
7712
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
7713
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7714
+
7715
+
7248
7716
  def doCreateDeployGroup(args, parsed_globals):
7249
7717
  g_param = parse_global_arg(parsed_globals)
7250
7718
 
@@ -7780,7 +8248,7 @@ ACTION_MAP = {
7780
8248
  "CreateRoInstanceIp": doCreateRoInstanceIp,
7781
8249
  "CreateAuditPolicy": doCreateAuditPolicy,
7782
8250
  "DescribeDBFeatures": doDescribeDBFeatures,
7783
- "DescribeDataBackupOverview": doDescribeDataBackupOverview,
8251
+ "CreateAuditRuleTemplate": doCreateAuditRuleTemplate,
7784
8252
  "BalanceRoGroupLoad": doBalanceRoGroupLoad,
7785
8253
  "IsolateDBInstance": doIsolateDBInstance,
7786
8254
  "DescribeAccounts": doDescribeAccounts,
@@ -7792,6 +8260,7 @@ ACTION_MAP = {
7792
8260
  "StopCpuExpand": doStopCpuExpand,
7793
8261
  "ModifyDBInstanceName": doModifyDBInstanceName,
7794
8262
  "DescribeCdbZoneConfig": doDescribeCdbZoneConfig,
8263
+ "CloseAuditService": doCloseAuditService,
7795
8264
  "StopRollback": doStopRollback,
7796
8265
  "DescribeRoGroups": doDescribeRoGroups,
7797
8266
  "OfflineIsolatedInstances": doOfflineIsolatedInstances,
@@ -7802,20 +8271,22 @@ ACTION_MAP = {
7802
8271
  "CloseCdbProxyAddress": doCloseCdbProxyAddress,
7803
8272
  "DescribeTasks": doDescribeTasks,
7804
8273
  "DescribeBackupConfig": doDescribeBackupConfig,
8274
+ "OpenDBInstanceEncryption": doOpenDBInstanceEncryption,
7805
8275
  "CloseWanService": doCloseWanService,
7806
8276
  "DescribeDefaultParams": doDescribeDefaultParams,
7807
8277
  "DescribeAuditPolicies": doDescribeAuditPolicies,
7808
- "OpenDBInstanceEncryption": doOpenDBInstanceEncryption,
8278
+ "DeleteDatabase": doDeleteDatabase,
7809
8279
  "DescribeTagsOfInstanceIds": doDescribeTagsOfInstanceIds,
7810
8280
  "DescribeDatabases": doDescribeDatabases,
7811
8281
  "DescribeErrorLogData": doDescribeErrorLogData,
7812
8282
  "SwitchDBInstanceMasterSlave": doSwitchDBInstanceMasterSlave,
7813
- "DeleteAuditPolicy": doDeleteAuditPolicy,
8283
+ "CreateDatabase": doCreateDatabase,
7814
8284
  "DisassociateSecurityGroups": doDisassociateSecurityGroups,
7815
8285
  "ModifyCdbProxyParam": doModifyCdbProxyParam,
7816
8286
  "DescribeTables": doDescribeTables,
7817
8287
  "DeleteTimeWindow": doDeleteTimeWindow,
7818
8288
  "DescribeAccountPrivileges": doDescribeAccountPrivileges,
8289
+ "DescribeDataBackupOverview": doDescribeDataBackupOverview,
7819
8290
  "ReleaseIsolatedDBInstances": doReleaseIsolatedDBInstances,
7820
8291
  "CreateCloneInstance": doCreateCloneInstance,
7821
8292
  "ModifyAuditConfig": doModifyAuditConfig,
@@ -7823,8 +8294,9 @@ ACTION_MAP = {
7823
8294
  "ModifyTimeWindow": doModifyTimeWindow,
7824
8295
  "DeleteDeployGroups": doDeleteDeployGroups,
7825
8296
  "SwitchForUpgrade": doSwitchForUpgrade,
7826
- "DeleteParamTemplate": doDeleteParamTemplate,
8297
+ "DeleteAuditRuleTemplates": doDeleteAuditRuleTemplates,
7827
8298
  "DescribeBackups": doDescribeBackups,
8299
+ "DescribeAuditInstanceList": doDescribeAuditInstanceList,
7828
8300
  "CreateParamTemplate": doCreateParamTemplate,
7829
8301
  "CreateDBInstanceHour": doCreateDBInstanceHour,
7830
8302
  "AddTimeWindow": doAddTimeWindow,
@@ -7834,7 +8306,7 @@ ACTION_MAP = {
7834
8306
  "ModifyDBInstanceVipVport": doModifyDBInstanceVipVport,
7835
8307
  "DescribeDBInstanceConfig": doDescribeDBInstanceConfig,
7836
8308
  "CreateCdbProxyAddress": doCreateCdbProxyAddress,
7837
- "CreateDatabase": doCreateDatabase,
8309
+ "DeleteAuditPolicy": doDeleteAuditPolicy,
7838
8310
  "DescribeProjectSecurityGroups": doDescribeProjectSecurityGroups,
7839
8311
  "DescribeSlowLogs": doDescribeSlowLogs,
7840
8312
  "InquiryPriceUpgradeInstances": doInquiryPriceUpgradeInstances,
@@ -7891,21 +8363,25 @@ ACTION_MAP = {
7891
8363
  "ModifyRoGroupInfo": doModifyRoGroupInfo,
7892
8364
  "DescribeBackupDownloadRestriction": doDescribeBackupDownloadRestriction,
7893
8365
  "ResetRootAccount": doResetRootAccount,
8366
+ "ModifyAuditRuleTemplates": doModifyAuditRuleTemplates,
7894
8367
  "ModifyAccountPassword": doModifyAccountPassword,
7895
8368
  "DescribeUploadedFiles": doDescribeUploadedFiles,
7896
8369
  "ModifyAccountDescription": doModifyAccountDescription,
7897
8370
  "DescribeSlowLogData": doDescribeSlowLogData,
7898
8371
  "OpenAuditService": doOpenAuditService,
7899
8372
  "DeleteAuditLogFile": doDeleteAuditLogFile,
8373
+ "DescribeAuditRuleTemplates": doDescribeAuditRuleTemplates,
7900
8374
  "ModifyBackupConfig": doModifyBackupConfig,
7901
8375
  "DescribeAuditRules": doDescribeAuditRules,
7902
8376
  "DescribeRemoteBackupConfig": doDescribeRemoteBackupConfig,
7903
8377
  "ModifyCdbProxyAddressVipAndVPort": doModifyCdbProxyAddressVipAndVPort,
7904
8378
  "InitDBInstances": doInitDBInstances,
7905
8379
  "DescribeDBInstanceLogToCLS": doDescribeDBInstanceLogToCLS,
8380
+ "DescribeAuditRuleTemplateModifyHistory": doDescribeAuditRuleTemplateModifyHistory,
7906
8381
  "CreateCdbProxy": doCreateCdbProxy,
7907
8382
  "ModifyAutoRenewFlag": doModifyAutoRenewFlag,
7908
8383
  "SwitchCDBProxy": doSwitchCDBProxy,
8384
+ "ModifyAuditService": doModifyAuditService,
7909
8385
  "RenewDBInstance": doRenewDBInstance,
7910
8386
  "StartBatchRollback": doStartBatchRollback,
7911
8387
  "DescribeDeviceMonitorInfo": doDescribeDeviceMonitorInfo,
@@ -7915,6 +8391,7 @@ ACTION_MAP = {
7915
8391
  "ModifyDBInstanceProject": doModifyDBInstanceProject,
7916
8392
  "StartCpuExpand": doStartCpuExpand,
7917
8393
  "DescribeSupportedPrivileges": doDescribeSupportedPrivileges,
8394
+ "DeleteParamTemplate": doDeleteParamTemplate,
7918
8395
  "CreateDeployGroup": doCreateDeployGroup,
7919
8396
  "DescribeBinlogs": doDescribeBinlogs,
7920
8397
  "DescribeDBSecurityGroups": doDescribeDBSecurityGroups,