tccli 3.0.1033.1__py2.py3-none-any.whl → 3.0.1035.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 (60) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cwp/v20180228/SyncBaselineDetectSummary.md +28 -0
  3. tccli/examples/dnspod/v20210323/DescribeRecordList.md +4 -2
  4. tccli/examples/ess/v20201111/ModifyExtendedService.md +79 -0
  5. tccli/examples/oceanus/v20190422/CreateFolder.md +3 -50
  6. tccli/examples/oceanus/v20190422/DescribeWorkSpaces.md +6 -3
  7. tccli/examples/oceanus/v20190422/GetMetaTable.md +29 -0
  8. tccli/examples/omics/v20221128/RetryRuns.md +50 -4
  9. tccli/examples/tcss/v20201101/DescribeAssetHostList.md +3 -1
  10. tccli/examples/trp/v20210515/DescribeProducts.md +6 -3
  11. tccli/examples/tse/v20201207/CreateCloudNativeAPIGatewayPublicNetwork.md +26 -0
  12. tccli/examples/tse/v20201207/DeleteCloudNativeAPIGatewayPublicNetwork.md +23 -0
  13. tccli/examples/tse/v20201207/ModifyConsoleNetwork.md +22 -0
  14. tccli/examples/tse/v20201207/ModifyNetworkAccessStrategy.md +26 -0
  15. tccli/examples/tse/v20201207/ModifyNetworkBasicInfo.md +25 -0
  16. tccli/examples/tsf/v20180326/ContinueRunFailedTaskBatch.md +2 -1
  17. tccli/examples/wedata/v20210820/DescribeFieldBasicInfo.md +103 -0
  18. tccli/examples/wedata/v20210820/DescribeTableBasicInfo.md +93 -0
  19. tccli/examples/wedata/v20210820/DescribeTableLineageInfo.md +135 -0
  20. tccli/services/aiart/v20221229/api.json +2 -2
  21. tccli/services/cat/v20180409/api.json +3 -3
  22. tccli/services/cfw/v20190904/api.json +7 -7
  23. tccli/services/csip/v20221121/api.json +8 -8
  24. tccli/services/cwp/v20180228/api.json +22 -12
  25. tccli/services/cwp/v20180228/examples.json +6 -0
  26. tccli/services/dbbrain/v20191016/api.json +3 -1
  27. tccli/services/dnspod/v20210323/api.json +5 -3
  28. tccli/services/dnspod/v20210323/examples.json +1 -1
  29. tccli/services/ess/ess_client.py +53 -0
  30. tccli/services/ess/v20201111/api.json +99 -19
  31. tccli/services/ess/v20201111/examples.json +20 -0
  32. tccli/services/essbasic/v20210526/api.json +18 -18
  33. tccli/services/ivld/v20210903/api.json +3 -3
  34. tccli/services/oceanus/oceanus_client.py +53 -0
  35. tccli/services/oceanus/v20190422/api.json +124 -1
  36. tccli/services/oceanus/v20190422/examples.json +11 -15
  37. tccli/services/omics/v20221128/api.json +41 -4
  38. tccli/services/omics/v20221128/examples.json +16 -4
  39. tccli/services/scf/v20180416/api.json +11 -2
  40. tccli/services/ssm/v20190923/api.json +6 -2
  41. tccli/services/tcss/v20201101/api.json +35 -5
  42. tccli/services/tcss/v20201101/examples.json +1 -1
  43. tccli/services/teo/v20220901/api.json +5 -5
  44. tccli/services/tiw/v20190919/api.json +21 -2
  45. tccli/services/trp/v20210515/api.json +63 -5
  46. tccli/services/trp/v20210515/examples.json +2 -2
  47. tccli/services/tse/tse_client.py +281 -16
  48. tccli/services/tse/v20201207/api.json +323 -0
  49. tccli/services/tse/v20201207/examples.json +40 -0
  50. tccli/services/tsf/v20180326/api.json +41 -30
  51. tccli/services/tsf/v20180326/examples.json +1 -1
  52. tccli/services/vod/v20180717/api.json +19 -6
  53. tccli/services/wedata/v20210820/api.json +1018 -80
  54. tccli/services/wedata/v20210820/examples.json +54 -0
  55. tccli/services/wedata/wedata_client.py +167 -8
  56. {tccli-3.0.1033.1.dist-info → tccli-3.0.1035.1.dist-info}/METADATA +2 -2
  57. {tccli-3.0.1033.1.dist-info → tccli-3.0.1035.1.dist-info}/RECORD +60 -50
  58. {tccli-3.0.1033.1.dist-info → tccli-3.0.1035.1.dist-info}/WHEEL +0 -0
  59. {tccli-3.0.1033.1.dist-info → tccli-3.0.1035.1.dist-info}/entry_points.txt +0 -0
  60. {tccli-3.0.1033.1.dist-info → tccli-3.0.1035.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,7 +17,7 @@ from tencentcloud.tse.v20201207 import models as models_v20201207
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doDescribeCloudNativeAPIGatewayUpstream(args, parsed_globals):
20
+ def doModifyConsoleNetwork(args, parsed_globals):
21
21
  g_param = parse_global_arg(parsed_globals)
22
22
 
23
23
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -46,11 +46,63 @@ def doDescribeCloudNativeAPIGatewayUpstream(args, parsed_globals):
46
46
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.DescribeCloudNativeAPIGatewayUpstreamRequest()
49
+ model = models.ModifyConsoleNetworkRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.DescribeCloudNativeAPIGatewayUpstream(model)
53
+ rsp = client.ModifyConsoleNetwork(model)
54
+ result = rsp.to_json_string()
55
+ try:
56
+ json_obj = json.loads(result)
57
+ except TypeError as e:
58
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
59
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
+ break
61
+ cur_time = time.time()
62
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
+ else:
67
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
+
71
+
72
+ def doDescribeOneCloudNativeAPIGatewayService(args, parsed_globals):
73
+ g_param = parse_global_arg(parsed_globals)
74
+
75
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
76
+ cred = credential.CVMRoleCredential()
77
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
78
+ cred = credential.STSAssumeRoleCredential(
79
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
80
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
81
+ )
82
+ 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):
83
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
84
+ else:
85
+ cred = credential.Credential(
86
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
87
+ )
88
+ http_profile = HttpProfile(
89
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
90
+ reqMethod="POST",
91
+ endpoint=g_param[OptionsDefine.Endpoint],
92
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
93
+ )
94
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
95
+ if g_param[OptionsDefine.Language]:
96
+ profile.language = g_param[OptionsDefine.Language]
97
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
98
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
99
+ client._sdkVersion += ("_CLI_" + __version__)
100
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
+ model = models.DescribeOneCloudNativeAPIGatewayServiceRequest()
102
+ model.from_json_string(json.dumps(args))
103
+ start_time = time.time()
104
+ while True:
105
+ rsp = client.DescribeOneCloudNativeAPIGatewayService(model)
54
106
  result = rsp.to_json_string()
55
107
  try:
56
108
  json_obj = json.loads(result)
@@ -433,7 +485,7 @@ def doDescribeZookeeperServerInterfaces(args, parsed_globals):
433
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
486
 
435
487
 
436
- def doDescribeOneCloudNativeAPIGatewayService(args, parsed_globals):
488
+ def doDescribeCloudNativeAPIGatewayUpstream(args, parsed_globals):
437
489
  g_param = parse_global_arg(parsed_globals)
438
490
 
439
491
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -462,11 +514,11 @@ def doDescribeOneCloudNativeAPIGatewayService(args, parsed_globals):
462
514
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
463
515
  client._sdkVersion += ("_CLI_" + __version__)
464
516
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
- model = models.DescribeOneCloudNativeAPIGatewayServiceRequest()
517
+ model = models.DescribeCloudNativeAPIGatewayUpstreamRequest()
466
518
  model.from_json_string(json.dumps(args))
467
519
  start_time = time.time()
468
520
  while True:
469
- rsp = client.DescribeOneCloudNativeAPIGatewayService(model)
521
+ rsp = client.DescribeCloudNativeAPIGatewayUpstream(model)
470
522
  result = rsp.to_json_string()
471
523
  try:
472
524
  json_obj = json.loads(result)
@@ -693,6 +745,58 @@ def doModifyUpstreamNodeStatus(args, parsed_globals):
693
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
746
 
695
747
 
748
+ def doDeleteCloudNativeAPIGatewayPublicNetwork(args, parsed_globals):
749
+ g_param = parse_global_arg(parsed_globals)
750
+
751
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
+ cred = credential.CVMRoleCredential()
753
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
+ cred = credential.STSAssumeRoleCredential(
755
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
757
+ )
758
+ 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):
759
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
+ else:
761
+ cred = credential.Credential(
762
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
+ )
764
+ http_profile = HttpProfile(
765
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
+ reqMethod="POST",
767
+ endpoint=g_param[OptionsDefine.Endpoint],
768
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
+ )
770
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
+ if g_param[OptionsDefine.Language]:
772
+ profile.language = g_param[OptionsDefine.Language]
773
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.DeleteCloudNativeAPIGatewayPublicNetworkRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.DeleteCloudNativeAPIGatewayPublicNetwork(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
696
800
  def doDeleteWafDomains(args, parsed_globals):
697
801
  g_param = parse_global_arg(parsed_globals)
698
802
 
@@ -1057,7 +1161,7 @@ def doDeleteCloudNativeAPIGatewayRoute(args, parsed_globals):
1057
1161
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1162
 
1059
1163
 
1060
- def doDeleteEngine(args, parsed_globals):
1164
+ def doCreateCloudNativeAPIGatewayPublicNetwork(args, parsed_globals):
1061
1165
  g_param = parse_global_arg(parsed_globals)
1062
1166
 
1063
1167
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +1190,11 @@ def doDeleteEngine(args, parsed_globals):
1086
1190
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
1087
1191
  client._sdkVersion += ("_CLI_" + __version__)
1088
1192
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.DeleteEngineRequest()
1193
+ model = models.CreateCloudNativeAPIGatewayPublicNetworkRequest()
1090
1194
  model.from_json_string(json.dumps(args))
1091
1195
  start_time = time.time()
1092
1196
  while True:
1093
- rsp = client.DeleteEngine(model)
1197
+ rsp = client.CreateCloudNativeAPIGatewayPublicNetwork(model)
1094
1198
  result = rsp.to_json_string()
1095
1199
  try:
1096
1200
  json_obj = json.loads(result)
@@ -2409,6 +2513,110 @@ def doDeleteCloudNativeAPIGateway(args, parsed_globals):
2409
2513
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
2514
 
2411
2515
 
2516
+ def doModifyNetworkBasicInfo(args, parsed_globals):
2517
+ g_param = parse_global_arg(parsed_globals)
2518
+
2519
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2520
+ cred = credential.CVMRoleCredential()
2521
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2522
+ cred = credential.STSAssumeRoleCredential(
2523
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2524
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2525
+ )
2526
+ 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):
2527
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2528
+ else:
2529
+ cred = credential.Credential(
2530
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2531
+ )
2532
+ http_profile = HttpProfile(
2533
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2534
+ reqMethod="POST",
2535
+ endpoint=g_param[OptionsDefine.Endpoint],
2536
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2537
+ )
2538
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2539
+ if g_param[OptionsDefine.Language]:
2540
+ profile.language = g_param[OptionsDefine.Language]
2541
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2542
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
2543
+ client._sdkVersion += ("_CLI_" + __version__)
2544
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2545
+ model = models.ModifyNetworkBasicInfoRequest()
2546
+ model.from_json_string(json.dumps(args))
2547
+ start_time = time.time()
2548
+ while True:
2549
+ rsp = client.ModifyNetworkBasicInfo(model)
2550
+ result = rsp.to_json_string()
2551
+ try:
2552
+ json_obj = json.loads(result)
2553
+ except TypeError as e:
2554
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2555
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2556
+ break
2557
+ cur_time = time.time()
2558
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2559
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2560
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2561
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2562
+ else:
2563
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2564
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2565
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
+
2567
+
2568
+ def doDeleteEngine(args, parsed_globals):
2569
+ g_param = parse_global_arg(parsed_globals)
2570
+
2571
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2572
+ cred = credential.CVMRoleCredential()
2573
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2574
+ cred = credential.STSAssumeRoleCredential(
2575
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2576
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2577
+ )
2578
+ 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):
2579
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2580
+ else:
2581
+ cred = credential.Credential(
2582
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2583
+ )
2584
+ http_profile = HttpProfile(
2585
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2586
+ reqMethod="POST",
2587
+ endpoint=g_param[OptionsDefine.Endpoint],
2588
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2589
+ )
2590
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2591
+ if g_param[OptionsDefine.Language]:
2592
+ profile.language = g_param[OptionsDefine.Language]
2593
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2594
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
2595
+ client._sdkVersion += ("_CLI_" + __version__)
2596
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2597
+ model = models.DeleteEngineRequest()
2598
+ model.from_json_string(json.dumps(args))
2599
+ start_time = time.time()
2600
+ while True:
2601
+ rsp = client.DeleteEngine(model)
2602
+ result = rsp.to_json_string()
2603
+ try:
2604
+ json_obj = json.loads(result)
2605
+ except TypeError as e:
2606
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2607
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2608
+ break
2609
+ cur_time = time.time()
2610
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2611
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2612
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2613
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2614
+ else:
2615
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2616
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2617
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
+
2619
+
2412
2620
  def doUpdateUpstreamTargets(args, parsed_globals):
2413
2621
  g_param = parse_global_arg(parsed_globals)
2414
2622
 
@@ -3033,6 +3241,58 @@ def doDeleteNativeGatewayServerGroup(args, parsed_globals):
3033
3241
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3034
3242
 
3035
3243
 
3244
+ def doDescribeSREInstanceAccessAddress(args, parsed_globals):
3245
+ g_param = parse_global_arg(parsed_globals)
3246
+
3247
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3248
+ cred = credential.CVMRoleCredential()
3249
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3250
+ cred = credential.STSAssumeRoleCredential(
3251
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3252
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
3253
+ )
3254
+ 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):
3255
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3256
+ else:
3257
+ cred = credential.Credential(
3258
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3259
+ )
3260
+ http_profile = HttpProfile(
3261
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3262
+ reqMethod="POST",
3263
+ endpoint=g_param[OptionsDefine.Endpoint],
3264
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3265
+ )
3266
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3267
+ if g_param[OptionsDefine.Language]:
3268
+ profile.language = g_param[OptionsDefine.Language]
3269
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3270
+ client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
3271
+ client._sdkVersion += ("_CLI_" + __version__)
3272
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3273
+ model = models.DescribeSREInstanceAccessAddressRequest()
3274
+ model.from_json_string(json.dumps(args))
3275
+ start_time = time.time()
3276
+ while True:
3277
+ rsp = client.DescribeSREInstanceAccessAddress(model)
3278
+ result = rsp.to_json_string()
3279
+ try:
3280
+ json_obj = json.loads(result)
3281
+ except TypeError as e:
3282
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3283
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3284
+ break
3285
+ cur_time = time.time()
3286
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3287
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3288
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3289
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3290
+ else:
3291
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3292
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3293
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3294
+
3295
+
3036
3296
  def doDescribeCloudNativeAPIGatewayCanaryRules(args, parsed_globals):
3037
3297
  g_param = parse_global_arg(parsed_globals)
3038
3298
 
@@ -3085,7 +3345,7 @@ def doDescribeCloudNativeAPIGatewayCanaryRules(args, parsed_globals):
3085
3345
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3086
3346
 
3087
3347
 
3088
- def doDescribeSREInstanceAccessAddress(args, parsed_globals):
3348
+ def doModifyNetworkAccessStrategy(args, parsed_globals):
3089
3349
  g_param = parse_global_arg(parsed_globals)
3090
3350
 
3091
3351
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3114,11 +3374,11 @@ def doDescribeSREInstanceAccessAddress(args, parsed_globals):
3114
3374
  client = mod.TseClient(cred, g_param[OptionsDefine.Region], profile)
3115
3375
  client._sdkVersion += ("_CLI_" + __version__)
3116
3376
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3117
- model = models.DescribeSREInstanceAccessAddressRequest()
3377
+ model = models.ModifyNetworkAccessStrategyRequest()
3118
3378
  model.from_json_string(json.dumps(args))
3119
3379
  start_time = time.time()
3120
3380
  while True:
3121
- rsp = client.DescribeSREInstanceAccessAddress(model)
3381
+ rsp = client.ModifyNetworkAccessStrategy(model)
3122
3382
  result = rsp.to_json_string()
3123
3383
  try:
3124
3384
  json_obj = json.loads(result)
@@ -3148,7 +3408,8 @@ MODELS_MAP = {
3148
3408
  }
3149
3409
 
3150
3410
  ACTION_MAP = {
3151
- "DescribeCloudNativeAPIGatewayUpstream": doDescribeCloudNativeAPIGatewayUpstream,
3411
+ "ModifyConsoleNetwork": doModifyConsoleNetwork,
3412
+ "DescribeOneCloudNativeAPIGatewayService": doDescribeOneCloudNativeAPIGatewayService,
3152
3413
  "DescribeUpstreamHealthCheckConfig": doDescribeUpstreamHealthCheckConfig,
3153
3414
  "CloseWafProtection": doCloseWafProtection,
3154
3415
  "ModifyCloudNativeAPIGateway": doModifyCloudNativeAPIGateway,
@@ -3156,11 +3417,12 @@ ACTION_MAP = {
3156
3417
  "DeleteCloudNativeAPIGatewayServiceRateLimit": doDeleteCloudNativeAPIGatewayServiceRateLimit,
3157
3418
  "CreateWafDomains": doCreateWafDomains,
3158
3419
  "DescribeZookeeperServerInterfaces": doDescribeZookeeperServerInterfaces,
3159
- "DescribeOneCloudNativeAPIGatewayService": doDescribeOneCloudNativeAPIGatewayService,
3420
+ "DescribeCloudNativeAPIGatewayUpstream": doDescribeCloudNativeAPIGatewayUpstream,
3160
3421
  "DescribeCloudNativeAPIGatewayCertificates": doDescribeCloudNativeAPIGatewayCertificates,
3161
3422
  "ModifyCloudNativeAPIGatewayServiceRateLimit": doModifyCloudNativeAPIGatewayServiceRateLimit,
3162
3423
  "CreateEngine": doCreateEngine,
3163
3424
  "ModifyUpstreamNodeStatus": doModifyUpstreamNodeStatus,
3425
+ "DeleteCloudNativeAPIGatewayPublicNetwork": doDeleteCloudNativeAPIGatewayPublicNetwork,
3164
3426
  "DeleteWafDomains": doDeleteWafDomains,
3165
3427
  "DeleteCloudNativeAPIGatewayService": doDeleteCloudNativeAPIGatewayService,
3166
3428
  "CreateCloudNativeAPIGatewayServiceRateLimit": doCreateCloudNativeAPIGatewayServiceRateLimit,
@@ -3168,7 +3430,7 @@ ACTION_MAP = {
3168
3430
  "DescribeCloudNativeAPIGateway": doDescribeCloudNativeAPIGateway,
3169
3431
  "DescribeCloudNativeAPIGatewayPorts": doDescribeCloudNativeAPIGatewayPorts,
3170
3432
  "DeleteCloudNativeAPIGatewayRoute": doDeleteCloudNativeAPIGatewayRoute,
3171
- "DeleteEngine": doDeleteEngine,
3433
+ "CreateCloudNativeAPIGatewayPublicNetwork": doCreateCloudNativeAPIGatewayPublicNetwork,
3172
3434
  "ModifyCloudNativeAPIGatewayCertificate": doModifyCloudNativeAPIGatewayCertificate,
3173
3435
  "DeleteCloudNativeAPIGatewayCanaryRule": doDeleteCloudNativeAPIGatewayCanaryRule,
3174
3436
  "DescribeCloudNativeAPIGateways": doDescribeCloudNativeAPIGateways,
@@ -3194,6 +3456,8 @@ ACTION_MAP = {
3194
3456
  "ModifyCloudNativeAPIGatewayCanaryRule": doModifyCloudNativeAPIGatewayCanaryRule,
3195
3457
  "CreateCloudNativeAPIGatewayService": doCreateCloudNativeAPIGatewayService,
3196
3458
  "DeleteCloudNativeAPIGateway": doDeleteCloudNativeAPIGateway,
3459
+ "ModifyNetworkBasicInfo": doModifyNetworkBasicInfo,
3460
+ "DeleteEngine": doDeleteEngine,
3197
3461
  "UpdateUpstreamTargets": doUpdateUpstreamTargets,
3198
3462
  "DeleteCloudNativeAPIGatewayCertificate": doDeleteCloudNativeAPIGatewayCertificate,
3199
3463
  "CreateCloudNativeAPIGatewayRoute": doCreateCloudNativeAPIGatewayRoute,
@@ -3206,8 +3470,9 @@ ACTION_MAP = {
3206
3470
  "UpdateUpstreamHealthCheckConfig": doUpdateUpstreamHealthCheckConfig,
3207
3471
  "ModifyCloudNativeAPIGatewayRoute": doModifyCloudNativeAPIGatewayRoute,
3208
3472
  "DeleteNativeGatewayServerGroup": doDeleteNativeGatewayServerGroup,
3209
- "DescribeCloudNativeAPIGatewayCanaryRules": doDescribeCloudNativeAPIGatewayCanaryRules,
3210
3473
  "DescribeSREInstanceAccessAddress": doDescribeSREInstanceAccessAddress,
3474
+ "DescribeCloudNativeAPIGatewayCanaryRules": doDescribeCloudNativeAPIGatewayCanaryRules,
3475
+ "ModifyNetworkAccessStrategy": doModifyNetworkAccessStrategy,
3211
3476
 
3212
3477
  }
3213
3478