tccli 3.0.1208.1__py2.py3-none-any.whl → 3.0.1210.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 (63) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/batch/v20170312/api.json +20 -2
  4. tccli/services/bma/v20221115/api.json +26 -1
  5. tccli/services/bma/v20221115/examples.json +7 -7
  6. tccli/services/cam/v20190116/api.json +38 -30
  7. tccli/services/cam/v20190116/examples.json +2 -2
  8. tccli/services/ccc/v20200210/api.json +28 -1
  9. tccli/services/cdwdoris/v20211228/api.json +20 -1
  10. tccli/services/cfg/v20210820/api.json +21 -1
  11. tccli/services/cls/cls_client.py +216 -4
  12. tccli/services/cls/v20201016/api.json +497 -11
  13. tccli/services/cls/v20201016/examples.json +32 -0
  14. tccli/services/cynosdb/v20190107/api.json +30 -9
  15. tccli/services/cynosdb/v20190107/examples.json +2 -2
  16. tccli/services/dasb/v20191018/api.json +19 -10
  17. tccli/services/dasb/v20191018/examples.json +1 -1
  18. tccli/services/dc/dc_client.py +126 -73
  19. tccli/services/dc/v20180410/api.json +300 -0
  20. tccli/services/dc/v20180410/examples.json +8 -0
  21. tccli/services/dnspod/v20210323/api.json +3 -1
  22. tccli/services/emr/emr_client.py +238 -26
  23. tccli/services/emr/v20190103/api.json +1012 -116
  24. tccli/services/emr/v20190103/examples.json +32 -0
  25. tccli/services/es/v20180416/api.json +144 -2
  26. tccli/services/ess/v20201111/api.json +4 -4
  27. tccli/services/ess/v20201111/examples.json +10 -10
  28. tccli/services/essbasic/v20210526/api.json +15 -6
  29. tccli/services/faceid/v20180301/api.json +10 -0
  30. tccli/services/gwlb/__init__.py +4 -0
  31. tccli/services/gwlb/gwlb_client.py +1096 -0
  32. tccli/services/gwlb/v20240906/api.json +1807 -0
  33. tccli/services/gwlb/v20240906/examples.json +155 -0
  34. tccli/services/hunyuan/v20230901/api.json +85 -9
  35. tccli/services/hunyuan/v20230901/examples.json +1 -1
  36. tccli/services/iss/v20230517/api.json +62 -14
  37. tccli/services/iss/v20230517/examples.json +19 -13
  38. tccli/services/oceanus/v20190422/api.json +4 -4
  39. tccli/services/privatedns/privatedns_client.py +57 -4
  40. tccli/services/privatedns/v20201028/api.json +101 -0
  41. tccli/services/privatedns/v20201028/examples.json +8 -0
  42. tccli/services/redis/v20180412/api.json +2 -2
  43. tccli/services/sms/v20210111/api.json +3 -3
  44. tccli/services/sms/v20210111/examples.json +2 -2
  45. tccli/services/sqlserver/v20180328/api.json +32 -11
  46. tccli/services/sqlserver/v20180328/examples.json +1 -1
  47. tccli/services/sts/v20180813/api.json +11 -10
  48. tccli/services/sts/v20180813/examples.json +2 -2
  49. tccli/services/tcss/v20201101/api.json +136 -19
  50. tccli/services/teo/v20220901/api.json +23 -23
  51. tccli/services/teo/v20220901/examples.json +4 -58
  52. tccli/services/tke/tke_client.py +118 -12
  53. tccli/services/tke/v20180525/api.json +154 -2
  54. tccli/services/tke/v20180525/examples.json +16 -0
  55. tccli/services/vclm/v20240523/api.json +9 -0
  56. tccli/services/vpc/v20170312/api.json +59 -43
  57. tccli/services/vpc/v20170312/examples.json +1 -1
  58. tccli/services/vtc/v20240223/api.json +9 -0
  59. {tccli-3.0.1208.1.dist-info → tccli-3.0.1210.1.dist-info}/METADATA +2 -2
  60. {tccli-3.0.1208.1.dist-info → tccli-3.0.1210.1.dist-info}/RECORD +63 -59
  61. {tccli-3.0.1208.1.dist-info → tccli-3.0.1210.1.dist-info}/WHEEL +0 -0
  62. {tccli-3.0.1208.1.dist-info → tccli-3.0.1210.1.dist-info}/entry_points.txt +0 -0
  63. {tccli-3.0.1208.1.dist-info → tccli-3.0.1210.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,7 +17,7 @@ from tencentcloud.dc.v20180410 import models as models_v20180410
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doDeleteDirectConnect(args, parsed_globals):
20
+ def doModifyDirectConnectTunnelExtra(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,11 @@ def doDeleteDirectConnect(args, parsed_globals):
46
46
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.DeleteDirectConnectRequest()
49
+ model = models.ModifyDirectConnectTunnelExtraRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.DeleteDirectConnect(model)
53
+ rsp = client.ModifyDirectConnectTunnelExtra(model)
54
54
  result = rsp.to_json_string()
55
55
  try:
56
56
  json_obj = json.loads(result)
@@ -69,7 +69,7 @@ def doDeleteDirectConnect(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doDescribePublicDirectConnectTunnelRoutes(args, parsed_globals):
72
+ def doDescribeInternetAddressStatistics(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 doDescribePublicDirectConnectTunnelRoutes(args, parsed_globals):
98
98
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.DescribePublicDirectConnectTunnelRoutesRequest()
101
+ model = models.DescribeInternetAddressStatisticsRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.DescribePublicDirectConnectTunnelRoutes(model)
105
+ rsp = client.DescribeInternetAddressStatistics(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -121,7 +121,7 @@ def doDescribePublicDirectConnectTunnelRoutes(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doModifyDirectConnectTunnelExtra(args, parsed_globals):
124
+ def doDeleteDirectConnect(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doModifyDirectConnectTunnelExtra(args, parsed_globals):
150
150
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.ModifyDirectConnectTunnelExtraRequest()
153
+ model = models.DeleteDirectConnectRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.ModifyDirectConnectTunnelExtra(model)
157
+ rsp = client.DeleteDirectConnect(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -173,7 +173,7 @@ def doModifyDirectConnectTunnelExtra(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
- def doModifyDirectConnectAttribute(args, parsed_globals):
176
+ def doDeleteDirectConnectTunnel(args, parsed_globals):
177
177
  g_param = parse_global_arg(parsed_globals)
178
178
 
179
179
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +202,11 @@ def doModifyDirectConnectAttribute(args, parsed_globals):
202
202
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
203
203
  client._sdkVersion += ("_CLI_" + __version__)
204
204
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.ModifyDirectConnectAttributeRequest()
205
+ model = models.DeleteDirectConnectTunnelRequest()
206
206
  model.from_json_string(json.dumps(args))
207
207
  start_time = time.time()
208
208
  while True:
209
- rsp = client.ModifyDirectConnectAttribute(model)
209
+ rsp = client.DeleteDirectConnectTunnel(model)
210
210
  result = rsp.to_json_string()
211
211
  try:
212
212
  json_obj = json.loads(result)
@@ -225,7 +225,7 @@ def doModifyDirectConnectAttribute(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doCreateDirectConnectTunnel(args, parsed_globals):
228
+ def doCreateDirectConnect(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 doCreateDirectConnectTunnel(args, parsed_globals):
254
254
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.CreateDirectConnectTunnelRequest()
257
+ model = models.CreateDirectConnectRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.CreateDirectConnectTunnel(model)
261
+ rsp = client.CreateDirectConnect(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -277,7 +277,7 @@ def doCreateDirectConnectTunnel(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
- def doDescribeDirectConnectTunnelExtra(args, parsed_globals):
280
+ def doDescribeDirectConnects(args, parsed_globals):
281
281
  g_param = parse_global_arg(parsed_globals)
282
282
 
283
283
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -306,11 +306,11 @@ def doDescribeDirectConnectTunnelExtra(args, parsed_globals):
306
306
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
307
307
  client._sdkVersion += ("_CLI_" + __version__)
308
308
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.DescribeDirectConnectTunnelExtraRequest()
309
+ model = models.DescribeDirectConnectsRequest()
310
310
  model.from_json_string(json.dumps(args))
311
311
  start_time = time.time()
312
312
  while True:
313
- rsp = client.DescribeDirectConnectTunnelExtra(model)
313
+ rsp = client.DescribeDirectConnects(model)
314
314
  result = rsp.to_json_string()
315
315
  try:
316
316
  json_obj = json.loads(result)
@@ -329,7 +329,7 @@ def doDescribeDirectConnectTunnelExtra(args, parsed_globals):
329
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
330
 
331
331
 
332
- def doDisableInternetAddress(args, parsed_globals):
332
+ def doEnableInternetAddress(args, parsed_globals):
333
333
  g_param = parse_global_arg(parsed_globals)
334
334
 
335
335
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -358,11 +358,11 @@ def doDisableInternetAddress(args, parsed_globals):
358
358
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
359
359
  client._sdkVersion += ("_CLI_" + __version__)
360
360
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.DisableInternetAddressRequest()
361
+ model = models.EnableInternetAddressRequest()
362
362
  model.from_json_string(json.dumps(args))
363
363
  start_time = time.time()
364
364
  while True:
365
- rsp = client.DisableInternetAddress(model)
365
+ rsp = client.EnableInternetAddress(model)
366
366
  result = rsp.to_json_string()
367
367
  try:
368
368
  json_obj = json.loads(result)
@@ -381,7 +381,7 @@ def doDisableInternetAddress(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
- def doAcceptDirectConnectTunnel(args, parsed_globals):
384
+ def doModifyDirectConnectAttribute(args, parsed_globals):
385
385
  g_param = parse_global_arg(parsed_globals)
386
386
 
387
387
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -410,11 +410,11 @@ def doAcceptDirectConnectTunnel(args, parsed_globals):
410
410
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
411
411
  client._sdkVersion += ("_CLI_" + __version__)
412
412
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
- model = models.AcceptDirectConnectTunnelRequest()
413
+ model = models.ModifyDirectConnectAttributeRequest()
414
414
  model.from_json_string(json.dumps(args))
415
415
  start_time = time.time()
416
416
  while True:
417
- rsp = client.AcceptDirectConnectTunnel(model)
417
+ rsp = client.ModifyDirectConnectAttribute(model)
418
418
  result = rsp.to_json_string()
419
419
  try:
420
420
  json_obj = json.loads(result)
@@ -433,7 +433,7 @@ def doAcceptDirectConnectTunnel(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
- def doDescribeDirectConnectTunnels(args, parsed_globals):
436
+ def doDescribeDirectConnectTunnelExtra(args, parsed_globals):
437
437
  g_param = parse_global_arg(parsed_globals)
438
438
 
439
439
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -462,11 +462,11 @@ def doDescribeDirectConnectTunnels(args, parsed_globals):
462
462
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
463
463
  client._sdkVersion += ("_CLI_" + __version__)
464
464
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
- model = models.DescribeDirectConnectTunnelsRequest()
465
+ model = models.DescribeDirectConnectTunnelExtraRequest()
466
466
  model.from_json_string(json.dumps(args))
467
467
  start_time = time.time()
468
468
  while True:
469
- rsp = client.DescribeDirectConnectTunnels(model)
469
+ rsp = client.DescribeDirectConnectTunnelExtra(model)
470
470
  result = rsp.to_json_string()
471
471
  try:
472
472
  json_obj = json.loads(result)
@@ -485,7 +485,7 @@ def doDescribeDirectConnectTunnels(args, parsed_globals):
485
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
486
 
487
487
 
488
- def doDeleteDirectConnectTunnel(args, parsed_globals):
488
+ def doDisableInternetAddress(args, parsed_globals):
489
489
  g_param = parse_global_arg(parsed_globals)
490
490
 
491
491
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +514,11 @@ def doDeleteDirectConnectTunnel(args, parsed_globals):
514
514
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
515
515
  client._sdkVersion += ("_CLI_" + __version__)
516
516
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.DeleteDirectConnectTunnelRequest()
517
+ model = models.DisableInternetAddressRequest()
518
518
  model.from_json_string(json.dumps(args))
519
519
  start_time = time.time()
520
520
  while True:
521
- rsp = client.DeleteDirectConnectTunnel(model)
521
+ rsp = client.DisableInternetAddress(model)
522
522
  result = rsp.to_json_string()
523
523
  try:
524
524
  json_obj = json.loads(result)
@@ -537,7 +537,7 @@ def doDeleteDirectConnectTunnel(args, parsed_globals):
537
537
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
538
 
539
539
 
540
- def doDescribeInternetAddressStatistics(args, parsed_globals):
540
+ def doCreateCloudAttachService(args, parsed_globals):
541
541
  g_param = parse_global_arg(parsed_globals)
542
542
 
543
543
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -566,11 +566,11 @@ def doDescribeInternetAddressStatistics(args, parsed_globals):
566
566
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
567
567
  client._sdkVersion += ("_CLI_" + __version__)
568
568
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
- model = models.DescribeInternetAddressStatisticsRequest()
569
+ model = models.CreateCloudAttachServiceRequest()
570
570
  model.from_json_string(json.dumps(args))
571
571
  start_time = time.time()
572
572
  while True:
573
- rsp = client.DescribeInternetAddressStatistics(model)
573
+ rsp = client.CreateCloudAttachService(model)
574
574
  result = rsp.to_json_string()
575
575
  try:
576
576
  json_obj = json.loads(result)
@@ -589,7 +589,7 @@ def doDescribeInternetAddressStatistics(args, parsed_globals):
589
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
590
 
591
591
 
592
- def doCreateDirectConnect(args, parsed_globals):
592
+ def doDescribePublicDirectConnectTunnelRoutes(args, parsed_globals):
593
593
  g_param = parse_global_arg(parsed_globals)
594
594
 
595
595
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -618,11 +618,11 @@ def doCreateDirectConnect(args, parsed_globals):
618
618
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
619
619
  client._sdkVersion += ("_CLI_" + __version__)
620
620
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
- model = models.CreateDirectConnectRequest()
621
+ model = models.DescribePublicDirectConnectTunnelRoutesRequest()
622
622
  model.from_json_string(json.dumps(args))
623
623
  start_time = time.time()
624
624
  while True:
625
- rsp = client.CreateDirectConnect(model)
625
+ rsp = client.DescribePublicDirectConnectTunnelRoutes(model)
626
626
  result = rsp.to_json_string()
627
627
  try:
628
628
  json_obj = json.loads(result)
@@ -641,7 +641,7 @@ def doCreateDirectConnect(args, parsed_globals):
641
641
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
642
 
643
643
 
644
- def doEnableInternetAddress(args, parsed_globals):
644
+ def doCreateDirectConnectTunnel(args, parsed_globals):
645
645
  g_param = parse_global_arg(parsed_globals)
646
646
 
647
647
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -670,11 +670,11 @@ def doEnableInternetAddress(args, parsed_globals):
670
670
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
671
671
  client._sdkVersion += ("_CLI_" + __version__)
672
672
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
- model = models.EnableInternetAddressRequest()
673
+ model = models.CreateDirectConnectTunnelRequest()
674
674
  model.from_json_string(json.dumps(args))
675
675
  start_time = time.time()
676
676
  while True:
677
- rsp = client.EnableInternetAddress(model)
677
+ rsp = client.CreateDirectConnectTunnel(model)
678
678
  result = rsp.to_json_string()
679
679
  try:
680
680
  json_obj = json.loads(result)
@@ -693,7 +693,7 @@ def doEnableInternetAddress(args, parsed_globals):
693
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
694
 
695
695
 
696
- def doDescribeInternetAddressQuota(args, parsed_globals):
696
+ def doApplyInternetAddress(args, parsed_globals):
697
697
  g_param = parse_global_arg(parsed_globals)
698
698
 
699
699
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -722,11 +722,11 @@ def doDescribeInternetAddressQuota(args, parsed_globals):
722
722
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
723
723
  client._sdkVersion += ("_CLI_" + __version__)
724
724
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.DescribeInternetAddressQuotaRequest()
725
+ model = models.ApplyInternetAddressRequest()
726
726
  model.from_json_string(json.dumps(args))
727
727
  start_time = time.time()
728
728
  while True:
729
- rsp = client.DescribeInternetAddressQuota(model)
729
+ rsp = client.ApplyInternetAddress(model)
730
730
  result = rsp.to_json_string()
731
731
  try:
732
732
  json_obj = json.loads(result)
@@ -745,7 +745,7 @@ def doDescribeInternetAddressQuota(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
- def doApplyInternetAddress(args, parsed_globals):
748
+ def doDescribeInternetAddressQuota(args, parsed_globals):
749
749
  g_param = parse_global_arg(parsed_globals)
750
750
 
751
751
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +774,11 @@ def doApplyInternetAddress(args, parsed_globals):
774
774
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
775
775
  client._sdkVersion += ("_CLI_" + __version__)
776
776
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.ApplyInternetAddressRequest()
777
+ model = models.DescribeInternetAddressQuotaRequest()
778
778
  model.from_json_string(json.dumps(args))
779
779
  start_time = time.time()
780
780
  while True:
781
- rsp = client.ApplyInternetAddress(model)
781
+ rsp = client.DescribeInternetAddressQuota(model)
782
782
  result = rsp.to_json_string()
783
783
  try:
784
784
  json_obj = json.loads(result)
@@ -797,7 +797,7 @@ def doApplyInternetAddress(args, parsed_globals):
797
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
798
 
799
799
 
800
- def doDescribeInternetAddress(args, parsed_globals):
800
+ def doDescribeDirectConnectTunnels(args, parsed_globals):
801
801
  g_param = parse_global_arg(parsed_globals)
802
802
 
803
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +826,11 @@ def doDescribeInternetAddress(args, parsed_globals):
826
826
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
827
827
  client._sdkVersion += ("_CLI_" + __version__)
828
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.DescribeInternetAddressRequest()
829
+ model = models.DescribeDirectConnectTunnelsRequest()
830
830
  model.from_json_string(json.dumps(args))
831
831
  start_time = time.time()
832
832
  while True:
833
- rsp = client.DescribeInternetAddress(model)
833
+ rsp = client.DescribeDirectConnectTunnels(model)
834
834
  result = rsp.to_json_string()
835
835
  try:
836
836
  json_obj = json.loads(result)
@@ -901,7 +901,7 @@ def doDescribeAccessPoints(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
- def doRejectDirectConnectTunnel(args, parsed_globals):
904
+ def doReleaseInternetAddress(args, parsed_globals):
905
905
  g_param = parse_global_arg(parsed_globals)
906
906
 
907
907
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +930,11 @@ def doRejectDirectConnectTunnel(args, parsed_globals):
930
930
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
931
931
  client._sdkVersion += ("_CLI_" + __version__)
932
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.RejectDirectConnectTunnelRequest()
933
+ model = models.ReleaseInternetAddressRequest()
934
934
  model.from_json_string(json.dumps(args))
935
935
  start_time = time.time()
936
936
  while True:
937
- rsp = client.RejectDirectConnectTunnel(model)
937
+ rsp = client.ReleaseInternetAddress(model)
938
938
  result = rsp.to_json_string()
939
939
  try:
940
940
  json_obj = json.loads(result)
@@ -953,7 +953,7 @@ def doRejectDirectConnectTunnel(args, parsed_globals):
953
953
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
954
 
955
955
 
956
- def doDescribeDirectConnects(args, parsed_globals):
956
+ def doModifyDirectConnectTunnelAttribute(args, parsed_globals):
957
957
  g_param = parse_global_arg(parsed_globals)
958
958
 
959
959
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -982,11 +982,11 @@ def doDescribeDirectConnects(args, parsed_globals):
982
982
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
983
983
  client._sdkVersion += ("_CLI_" + __version__)
984
984
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
- model = models.DescribeDirectConnectsRequest()
985
+ model = models.ModifyDirectConnectTunnelAttributeRequest()
986
986
  model.from_json_string(json.dumps(args))
987
987
  start_time = time.time()
988
988
  while True:
989
- rsp = client.DescribeDirectConnects(model)
989
+ rsp = client.ModifyDirectConnectTunnelAttribute(model)
990
990
  result = rsp.to_json_string()
991
991
  try:
992
992
  json_obj = json.loads(result)
@@ -1005,7 +1005,7 @@ def doDescribeDirectConnects(args, parsed_globals):
1005
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1006
 
1007
1007
 
1008
- def doReleaseInternetAddress(args, parsed_globals):
1008
+ def doAcceptDirectConnectTunnel(args, parsed_globals):
1009
1009
  g_param = parse_global_arg(parsed_globals)
1010
1010
 
1011
1011
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1034,11 +1034,11 @@ def doReleaseInternetAddress(args, parsed_globals):
1034
1034
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
1035
1035
  client._sdkVersion += ("_CLI_" + __version__)
1036
1036
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
- model = models.ReleaseInternetAddressRequest()
1037
+ model = models.AcceptDirectConnectTunnelRequest()
1038
1038
  model.from_json_string(json.dumps(args))
1039
1039
  start_time = time.time()
1040
1040
  while True:
1041
- rsp = client.ReleaseInternetAddress(model)
1041
+ rsp = client.AcceptDirectConnectTunnel(model)
1042
1042
  result = rsp.to_json_string()
1043
1043
  try:
1044
1044
  json_obj = json.loads(result)
@@ -1057,7 +1057,7 @@ def doReleaseInternetAddress(args, parsed_globals):
1057
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1058
 
1059
1059
 
1060
- def doModifyDirectConnectTunnelAttribute(args, parsed_globals):
1060
+ def doDescribeInternetAddress(args, parsed_globals):
1061
1061
  g_param = parse_global_arg(parsed_globals)
1062
1062
 
1063
1063
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +1086,63 @@ def doModifyDirectConnectTunnelAttribute(args, parsed_globals):
1086
1086
  client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
1087
1087
  client._sdkVersion += ("_CLI_" + __version__)
1088
1088
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.ModifyDirectConnectTunnelAttributeRequest()
1089
+ model = models.DescribeInternetAddressRequest()
1090
1090
  model.from_json_string(json.dumps(args))
1091
1091
  start_time = time.time()
1092
1092
  while True:
1093
- rsp = client.ModifyDirectConnectTunnelAttribute(model)
1093
+ rsp = client.DescribeInternetAddress(model)
1094
+ result = rsp.to_json_string()
1095
+ try:
1096
+ json_obj = json.loads(result)
1097
+ except TypeError as e:
1098
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1099
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1100
+ break
1101
+ cur_time = time.time()
1102
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1103
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1104
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1105
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1106
+ else:
1107
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1108
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1109
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
+
1111
+
1112
+ def doRejectDirectConnectTunnel(args, parsed_globals):
1113
+ g_param = parse_global_arg(parsed_globals)
1114
+
1115
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1116
+ cred = credential.CVMRoleCredential()
1117
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1118
+ cred = credential.STSAssumeRoleCredential(
1119
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1120
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1121
+ )
1122
+ 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):
1123
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1124
+ else:
1125
+ cred = credential.Credential(
1126
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1127
+ )
1128
+ http_profile = HttpProfile(
1129
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1130
+ reqMethod="POST",
1131
+ endpoint=g_param[OptionsDefine.Endpoint],
1132
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1133
+ )
1134
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1135
+ if g_param[OptionsDefine.Language]:
1136
+ profile.language = g_param[OptionsDefine.Language]
1137
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1138
+ client = mod.DcClient(cred, g_param[OptionsDefine.Region], profile)
1139
+ client._sdkVersion += ("_CLI_" + __version__)
1140
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
+ model = models.RejectDirectConnectTunnelRequest()
1142
+ model.from_json_string(json.dumps(args))
1143
+ start_time = time.time()
1144
+ while True:
1145
+ rsp = client.RejectDirectConnectTunnel(model)
1094
1146
  result = rsp.to_json_string()
1095
1147
  try:
1096
1148
  json_obj = json.loads(result)
@@ -1120,27 +1172,28 @@ MODELS_MAP = {
1120
1172
  }
1121
1173
 
1122
1174
  ACTION_MAP = {
1123
- "DeleteDirectConnect": doDeleteDirectConnect,
1124
- "DescribePublicDirectConnectTunnelRoutes": doDescribePublicDirectConnectTunnelRoutes,
1125
1175
  "ModifyDirectConnectTunnelExtra": doModifyDirectConnectTunnelExtra,
1126
- "ModifyDirectConnectAttribute": doModifyDirectConnectAttribute,
1127
- "CreateDirectConnectTunnel": doCreateDirectConnectTunnel,
1128
- "DescribeDirectConnectTunnelExtra": doDescribeDirectConnectTunnelExtra,
1129
- "DisableInternetAddress": doDisableInternetAddress,
1130
- "AcceptDirectConnectTunnel": doAcceptDirectConnectTunnel,
1131
- "DescribeDirectConnectTunnels": doDescribeDirectConnectTunnels,
1132
- "DeleteDirectConnectTunnel": doDeleteDirectConnectTunnel,
1133
1176
  "DescribeInternetAddressStatistics": doDescribeInternetAddressStatistics,
1177
+ "DeleteDirectConnect": doDeleteDirectConnect,
1178
+ "DeleteDirectConnectTunnel": doDeleteDirectConnectTunnel,
1134
1179
  "CreateDirectConnect": doCreateDirectConnect,
1180
+ "DescribeDirectConnects": doDescribeDirectConnects,
1135
1181
  "EnableInternetAddress": doEnableInternetAddress,
1136
- "DescribeInternetAddressQuota": doDescribeInternetAddressQuota,
1182
+ "ModifyDirectConnectAttribute": doModifyDirectConnectAttribute,
1183
+ "DescribeDirectConnectTunnelExtra": doDescribeDirectConnectTunnelExtra,
1184
+ "DisableInternetAddress": doDisableInternetAddress,
1185
+ "CreateCloudAttachService": doCreateCloudAttachService,
1186
+ "DescribePublicDirectConnectTunnelRoutes": doDescribePublicDirectConnectTunnelRoutes,
1187
+ "CreateDirectConnectTunnel": doCreateDirectConnectTunnel,
1137
1188
  "ApplyInternetAddress": doApplyInternetAddress,
1138
- "DescribeInternetAddress": doDescribeInternetAddress,
1189
+ "DescribeInternetAddressQuota": doDescribeInternetAddressQuota,
1190
+ "DescribeDirectConnectTunnels": doDescribeDirectConnectTunnels,
1139
1191
  "DescribeAccessPoints": doDescribeAccessPoints,
1140
- "RejectDirectConnectTunnel": doRejectDirectConnectTunnel,
1141
- "DescribeDirectConnects": doDescribeDirectConnects,
1142
1192
  "ReleaseInternetAddress": doReleaseInternetAddress,
1143
1193
  "ModifyDirectConnectTunnelAttribute": doModifyDirectConnectTunnelAttribute,
1194
+ "AcceptDirectConnectTunnel": doAcceptDirectConnectTunnel,
1195
+ "DescribeInternetAddress": doDescribeInternetAddress,
1196
+ "RejectDirectConnectTunnel": doRejectDirectConnectTunnel,
1144
1197
 
1145
1198
  }
1146
1199