tccli 3.0.1040.1__py2.py3-none-any.whl → 3.0.1042.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 (56) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cloudaudit/v20190319/DeleteAuditTrack.md +1 -1
  3. tccli/examples/cloudaudit/v20190319/DescribeAuditTrack.md +1 -1
  4. tccli/examples/cloudaudit/v20190319/DescribeAuditTracks.md +1 -1
  5. tccli/examples/cloudaudit/v20190319/DescribeEvents.md +2 -2
  6. tccli/examples/cloudaudit/v20190319/ModifyAuditTrack.md +1 -1
  7. tccli/examples/dts/v20211206/ConfigureSubscribeJob.md +36 -0
  8. tccli/examples/dts/v20211206/CreateConsumerGroup.md +24 -0
  9. tccli/examples/dts/v20211206/CreateSubscribe.md +28 -0
  10. tccli/examples/dts/v20211206/CreateSubscribeCheckJob.md +20 -0
  11. tccli/examples/dts/v20211206/DeleteConsumerGroup.md +22 -0
  12. tccli/examples/dts/v20211206/DescribeConsumerGroups.md +83 -0
  13. tccli/examples/dts/v20211206/DescribeOffsetByTime.md +39 -0
  14. tccli/examples/dts/v20211206/DescribeSubscribeCheckJob.md +78 -0
  15. tccli/examples/dts/v20211206/DescribeSubscribeDetail.md +67 -0
  16. tccli/examples/dts/v20211206/DescribeSubscribeJobs.md +52 -0
  17. tccli/examples/dts/v20211206/DescribeSubscribeReturnable.md +22 -0
  18. tccli/examples/dts/v20211206/DestroyIsolatedSubscribe.md +20 -0
  19. tccli/examples/dts/v20211206/IsolateSubscribe.md +20 -0
  20. tccli/examples/dts/v20211206/ModifyConsumerGroupDescription.md +23 -0
  21. tccli/examples/dts/v20211206/ModifyConsumerGroupPassword.md +24 -0
  22. tccli/examples/dts/v20211206/ModifySubscribeAutoRenewFlag.md +21 -0
  23. tccli/examples/dts/v20211206/ModifySubscribeName.md +21 -0
  24. tccli/examples/dts/v20211206/ModifySubscribeObjects.md +21 -0
  25. tccli/examples/dts/v20211206/ResetConsumerGroupOffset.md +25 -0
  26. tccli/examples/dts/v20211206/ResetSubscribe.md +20 -0
  27. tccli/examples/dts/v20211206/ResumeSubscribe.md +20 -0
  28. tccli/examples/dts/v20211206/StartSubscribe.md +20 -0
  29. tccli/examples/essbasic/v20210526/ChannelCreatePrepareFlow.md +56 -0
  30. tccli/examples/ocr/v20181119/VerifyOfdVatInvoiceOCR.md +6 -1
  31. tccli/services/car/v20220110/api.json +2 -2
  32. tccli/services/clb/v20180317/api.json +3 -1
  33. tccli/services/cloudaudit/v20190319/api.json +61 -27
  34. tccli/services/cloudaudit/v20190319/examples.json +6 -6
  35. tccli/services/cvm/v20170312/api.json +2 -2
  36. tccli/services/cynosdb/v20190107/api.json +118 -0
  37. tccli/services/dnspod/v20210323/api.json +10 -0
  38. tccli/services/dts/dts_client.py +1008 -160
  39. tccli/services/dts/v20211206/api.json +4354 -1796
  40. tccli/services/dts/v20211206/examples.json +176 -0
  41. tccli/services/ess/v20201111/api.json +12 -12
  42. tccli/services/essbasic/v20210526/api.json +3 -3
  43. tccli/services/essbasic/v20210526/examples.json +1 -1
  44. tccli/services/monitor/v20180724/api.json +13 -8
  45. tccli/services/ocr/v20181119/api.json +1 -1
  46. tccli/services/ocr/v20181119/examples.json +1 -1
  47. tccli/services/rum/rum_client.py +12 -171
  48. tccli/services/rum/v20210622/api.json +0 -170
  49. tccli/services/rum/v20210622/examples.json +0 -24
  50. tccli/services/trtc/v20190722/api.json +1 -1
  51. tccli/services/vpc/v20170312/api.json +1 -0
  52. {tccli-3.0.1040.1.dist-info → tccli-3.0.1042.1.dist-info}/METADATA +2 -2
  53. {tccli-3.0.1040.1.dist-info → tccli-3.0.1042.1.dist-info}/RECORD +56 -34
  54. {tccli-3.0.1040.1.dist-info → tccli-3.0.1042.1.dist-info}/WHEEL +0 -0
  55. {tccli-3.0.1040.1.dist-info → tccli-3.0.1042.1.dist-info}/entry_points.txt +0 -0
  56. {tccli-3.0.1040.1.dist-info → tccli-3.0.1042.1.dist-info}/license_files/LICENSE +0 -0
@@ -19,6 +19,110 @@ from tencentcloud.dts.v20180330 import models as models_v20180330
19
19
  from jmespath import search
20
20
  import time
21
21
 
22
+ def doResumeSubscribe(args, parsed_globals):
23
+ g_param = parse_global_arg(parsed_globals)
24
+
25
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
26
+ cred = credential.CVMRoleCredential()
27
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
28
+ cred = credential.STSAssumeRoleCredential(
29
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
30
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
31
+ )
32
+ 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):
33
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
34
+ else:
35
+ cred = credential.Credential(
36
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
37
+ )
38
+ http_profile = HttpProfile(
39
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
40
+ reqMethod="POST",
41
+ endpoint=g_param[OptionsDefine.Endpoint],
42
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
43
+ )
44
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
45
+ if g_param[OptionsDefine.Language]:
46
+ profile.language = g_param[OptionsDefine.Language]
47
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
48
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
49
+ client._sdkVersion += ("_CLI_" + __version__)
50
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
51
+ model = models.ResumeSubscribeRequest()
52
+ model.from_json_string(json.dumps(args))
53
+ start_time = time.time()
54
+ while True:
55
+ rsp = client.ResumeSubscribe(model)
56
+ result = rsp.to_json_string()
57
+ try:
58
+ json_obj = json.loads(result)
59
+ except TypeError as e:
60
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
61
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
62
+ break
63
+ cur_time = time.time()
64
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
65
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
66
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
67
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
68
+ else:
69
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
70
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
71
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
72
+
73
+
74
+ def doDestroyIsolatedSubscribe(args, parsed_globals):
75
+ g_param = parse_global_arg(parsed_globals)
76
+
77
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
78
+ cred = credential.CVMRoleCredential()
79
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
80
+ cred = credential.STSAssumeRoleCredential(
81
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
82
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
83
+ )
84
+ 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):
85
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
86
+ else:
87
+ cred = credential.Credential(
88
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
89
+ )
90
+ http_profile = HttpProfile(
91
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
92
+ reqMethod="POST",
93
+ endpoint=g_param[OptionsDefine.Endpoint],
94
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
95
+ )
96
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
97
+ if g_param[OptionsDefine.Language]:
98
+ profile.language = g_param[OptionsDefine.Language]
99
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
100
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
101
+ client._sdkVersion += ("_CLI_" + __version__)
102
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
103
+ model = models.DestroyIsolatedSubscribeRequest()
104
+ model.from_json_string(json.dumps(args))
105
+ start_time = time.time()
106
+ while True:
107
+ rsp = client.DestroyIsolatedSubscribe(model)
108
+ result = rsp.to_json_string()
109
+ try:
110
+ json_obj = json.loads(result)
111
+ except TypeError as e:
112
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
113
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
114
+ break
115
+ cur_time = time.time()
116
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
117
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
118
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
119
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
120
+ else:
121
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
122
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
123
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
124
+
125
+
22
126
  def doModifySubscribeConsumeTime(args, parsed_globals):
23
127
  g_param = parse_global_arg(parsed_globals)
24
128
 
@@ -331,6 +435,58 @@ def doCreateMigrationService(args, parsed_globals):
331
435
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
332
436
 
333
437
 
438
+ def doDescribeSubscribeJobs(args, parsed_globals):
439
+ g_param = parse_global_arg(parsed_globals)
440
+
441
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
442
+ cred = credential.CVMRoleCredential()
443
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
444
+ cred = credential.STSAssumeRoleCredential(
445
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
446
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
447
+ )
448
+ 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):
449
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
450
+ else:
451
+ cred = credential.Credential(
452
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
453
+ )
454
+ http_profile = HttpProfile(
455
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
456
+ reqMethod="POST",
457
+ endpoint=g_param[OptionsDefine.Endpoint],
458
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
459
+ )
460
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
461
+ if g_param[OptionsDefine.Language]:
462
+ profile.language = g_param[OptionsDefine.Language]
463
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
464
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
465
+ client._sdkVersion += ("_CLI_" + __version__)
466
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
467
+ model = models.DescribeSubscribeJobsRequest()
468
+ model.from_json_string(json.dumps(args))
469
+ start_time = time.time()
470
+ while True:
471
+ rsp = client.DescribeSubscribeJobs(model)
472
+ result = rsp.to_json_string()
473
+ try:
474
+ json_obj = json.loads(result)
475
+ except TypeError as e:
476
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
477
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
478
+ break
479
+ cur_time = time.time()
480
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
481
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
482
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
483
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
484
+ else:
485
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
486
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
487
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
488
+
489
+
334
490
  def doModifyMigrateRateLimit(args, parsed_globals):
335
491
  g_param = parse_global_arg(parsed_globals)
336
492
 
@@ -435,6 +591,58 @@ def doDeleteMigrateJob(args, parsed_globals):
435
591
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
436
592
 
437
593
 
594
+ def doDescribeSubscribeReturnable(args, parsed_globals):
595
+ g_param = parse_global_arg(parsed_globals)
596
+
597
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
598
+ cred = credential.CVMRoleCredential()
599
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
600
+ cred = credential.STSAssumeRoleCredential(
601
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
602
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
603
+ )
604
+ 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):
605
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
606
+ else:
607
+ cred = credential.Credential(
608
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
609
+ )
610
+ http_profile = HttpProfile(
611
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
612
+ reqMethod="POST",
613
+ endpoint=g_param[OptionsDefine.Endpoint],
614
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
615
+ )
616
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
617
+ if g_param[OptionsDefine.Language]:
618
+ profile.language = g_param[OptionsDefine.Language]
619
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
620
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
621
+ client._sdkVersion += ("_CLI_" + __version__)
622
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
623
+ model = models.DescribeSubscribeReturnableRequest()
624
+ model.from_json_string(json.dumps(args))
625
+ start_time = time.time()
626
+ while True:
627
+ rsp = client.DescribeSubscribeReturnable(model)
628
+ result = rsp.to_json_string()
629
+ try:
630
+ json_obj = json.loads(result)
631
+ except TypeError as e:
632
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
633
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
634
+ break
635
+ cur_time = time.time()
636
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
637
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
638
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
639
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
640
+ else:
641
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
642
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
643
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
644
+
645
+
438
646
  def doIsolateSyncJob(args, parsed_globals):
439
647
  g_param = parse_global_arg(parsed_globals)
440
648
 
@@ -591,7 +799,7 @@ def doCreateSyncJob(args, parsed_globals):
591
799
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
592
800
 
593
801
 
594
- def doDeleteCompareTask(args, parsed_globals):
802
+ def doConfigureSubscribeJob(args, parsed_globals):
595
803
  g_param = parse_global_arg(parsed_globals)
596
804
 
597
805
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -620,11 +828,11 @@ def doDeleteCompareTask(args, parsed_globals):
620
828
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
621
829
  client._sdkVersion += ("_CLI_" + __version__)
622
830
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
623
- model = models.DeleteCompareTaskRequest()
831
+ model = models.ConfigureSubscribeJobRequest()
624
832
  model.from_json_string(json.dumps(args))
625
833
  start_time = time.time()
626
834
  while True:
627
- rsp = client.DeleteCompareTask(model)
835
+ rsp = client.ConfigureSubscribeJob(model)
628
836
  result = rsp.to_json_string()
629
837
  try:
630
838
  json_obj = json.loads(result)
@@ -643,7 +851,7 @@ def doDeleteCompareTask(args, parsed_globals):
643
851
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
644
852
 
645
853
 
646
- def doStartSyncJob(args, parsed_globals):
854
+ def doDescribeConsumerGroups(args, parsed_globals):
647
855
  g_param = parse_global_arg(parsed_globals)
648
856
 
649
857
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -672,11 +880,11 @@ def doStartSyncJob(args, parsed_globals):
672
880
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
673
881
  client._sdkVersion += ("_CLI_" + __version__)
674
882
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
675
- model = models.StartSyncJobRequest()
883
+ model = models.DescribeConsumerGroupsRequest()
676
884
  model.from_json_string(json.dumps(args))
677
885
  start_time = time.time()
678
886
  while True:
679
- rsp = client.StartSyncJob(model)
887
+ rsp = client.DescribeConsumerGroups(model)
680
888
  result = rsp.to_json_string()
681
889
  try:
682
890
  json_obj = json.loads(result)
@@ -695,7 +903,7 @@ def doStartSyncJob(args, parsed_globals):
695
903
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
696
904
 
697
905
 
698
- def doCreateCheckSyncJob(args, parsed_globals):
906
+ def doCreateConsumerGroup(args, parsed_globals):
699
907
  g_param = parse_global_arg(parsed_globals)
700
908
 
701
909
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -724,11 +932,11 @@ def doCreateCheckSyncJob(args, parsed_globals):
724
932
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
725
933
  client._sdkVersion += ("_CLI_" + __version__)
726
934
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
727
- model = models.CreateCheckSyncJobRequest()
935
+ model = models.CreateConsumerGroupRequest()
728
936
  model.from_json_string(json.dumps(args))
729
937
  start_time = time.time()
730
938
  while True:
731
- rsp = client.CreateCheckSyncJob(model)
939
+ rsp = client.CreateConsumerGroup(model)
732
940
  result = rsp.to_json_string()
733
941
  try:
734
942
  json_obj = json.loads(result)
@@ -747,7 +955,7 @@ def doCreateCheckSyncJob(args, parsed_globals):
747
955
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
748
956
 
749
957
 
750
- def doDescribeCompareReport(args, parsed_globals):
958
+ def doResetConsumerGroupOffset(args, parsed_globals):
751
959
  g_param = parse_global_arg(parsed_globals)
752
960
 
753
961
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -776,11 +984,11 @@ def doDescribeCompareReport(args, parsed_globals):
776
984
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
777
985
  client._sdkVersion += ("_CLI_" + __version__)
778
986
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
779
- model = models.DescribeCompareReportRequest()
987
+ model = models.ResetConsumerGroupOffsetRequest()
780
988
  model.from_json_string(json.dumps(args))
781
989
  start_time = time.time()
782
990
  while True:
783
- rsp = client.DescribeCompareReport(model)
991
+ rsp = client.ResetConsumerGroupOffset(model)
784
992
  result = rsp.to_json_string()
785
993
  try:
786
994
  json_obj = json.loads(result)
@@ -799,7 +1007,7 @@ def doDescribeCompareReport(args, parsed_globals):
799
1007
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
800
1008
 
801
1009
 
802
- def doContinueMigrateJob(args, parsed_globals):
1010
+ def doDeleteCompareTask(args, parsed_globals):
803
1011
  g_param = parse_global_arg(parsed_globals)
804
1012
 
805
1013
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -828,11 +1036,11 @@ def doContinueMigrateJob(args, parsed_globals):
828
1036
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
829
1037
  client._sdkVersion += ("_CLI_" + __version__)
830
1038
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
831
- model = models.ContinueMigrateJobRequest()
1039
+ model = models.DeleteCompareTaskRequest()
832
1040
  model.from_json_string(json.dumps(args))
833
1041
  start_time = time.time()
834
1042
  while True:
835
- rsp = client.ContinueMigrateJob(model)
1043
+ rsp = client.DeleteCompareTask(model)
836
1044
  result = rsp.to_json_string()
837
1045
  try:
838
1046
  json_obj = json.loads(result)
@@ -851,7 +1059,7 @@ def doContinueMigrateJob(args, parsed_globals):
851
1059
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
852
1060
 
853
1061
 
854
- def doModifyCompareTask(args, parsed_globals):
1062
+ def doStartSubscribe(args, parsed_globals):
855
1063
  g_param = parse_global_arg(parsed_globals)
856
1064
 
857
1065
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -880,11 +1088,11 @@ def doModifyCompareTask(args, parsed_globals):
880
1088
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
881
1089
  client._sdkVersion += ("_CLI_" + __version__)
882
1090
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
883
- model = models.ModifyCompareTaskRequest()
1091
+ model = models.StartSubscribeRequest()
884
1092
  model.from_json_string(json.dumps(args))
885
1093
  start_time = time.time()
886
1094
  while True:
887
- rsp = client.ModifyCompareTask(model)
1095
+ rsp = client.StartSubscribe(model)
888
1096
  result = rsp.to_json_string()
889
1097
  try:
890
1098
  json_obj = json.loads(result)
@@ -903,7 +1111,7 @@ def doModifyCompareTask(args, parsed_globals):
903
1111
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
904
1112
 
905
1113
 
906
- def doPauseMigrateJob(args, parsed_globals):
1114
+ def doStartSyncJob(args, parsed_globals):
907
1115
  g_param = parse_global_arg(parsed_globals)
908
1116
 
909
1117
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -932,11 +1140,11 @@ def doPauseMigrateJob(args, parsed_globals):
932
1140
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
933
1141
  client._sdkVersion += ("_CLI_" + __version__)
934
1142
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
935
- model = models.PauseMigrateJobRequest()
1143
+ model = models.StartSyncJobRequest()
936
1144
  model.from_json_string(json.dumps(args))
937
1145
  start_time = time.time()
938
1146
  while True:
939
- rsp = client.PauseMigrateJob(model)
1147
+ rsp = client.StartSyncJob(model)
940
1148
  result = rsp.to_json_string()
941
1149
  try:
942
1150
  json_obj = json.loads(result)
@@ -955,7 +1163,631 @@ def doPauseMigrateJob(args, parsed_globals):
955
1163
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
956
1164
 
957
1165
 
958
- def doDescribeMigrateCheckJob(args, parsed_globals):
1166
+ def doCreateCheckSyncJob(args, parsed_globals):
1167
+ g_param = parse_global_arg(parsed_globals)
1168
+
1169
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1170
+ cred = credential.CVMRoleCredential()
1171
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1172
+ cred = credential.STSAssumeRoleCredential(
1173
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1174
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1175
+ )
1176
+ 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):
1177
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1178
+ else:
1179
+ cred = credential.Credential(
1180
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1181
+ )
1182
+ http_profile = HttpProfile(
1183
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1184
+ reqMethod="POST",
1185
+ endpoint=g_param[OptionsDefine.Endpoint],
1186
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1187
+ )
1188
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1189
+ if g_param[OptionsDefine.Language]:
1190
+ profile.language = g_param[OptionsDefine.Language]
1191
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1192
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1193
+ client._sdkVersion += ("_CLI_" + __version__)
1194
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1195
+ model = models.CreateCheckSyncJobRequest()
1196
+ model.from_json_string(json.dumps(args))
1197
+ start_time = time.time()
1198
+ while True:
1199
+ rsp = client.CreateCheckSyncJob(model)
1200
+ result = rsp.to_json_string()
1201
+ try:
1202
+ json_obj = json.loads(result)
1203
+ except TypeError as e:
1204
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1205
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1206
+ break
1207
+ cur_time = time.time()
1208
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1209
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1210
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1211
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1212
+ else:
1213
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1214
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1215
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1216
+
1217
+
1218
+ def doDescribeCompareReport(args, parsed_globals):
1219
+ g_param = parse_global_arg(parsed_globals)
1220
+
1221
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1222
+ cred = credential.CVMRoleCredential()
1223
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1224
+ cred = credential.STSAssumeRoleCredential(
1225
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1226
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1227
+ )
1228
+ 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):
1229
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1230
+ else:
1231
+ cred = credential.Credential(
1232
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1233
+ )
1234
+ http_profile = HttpProfile(
1235
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1236
+ reqMethod="POST",
1237
+ endpoint=g_param[OptionsDefine.Endpoint],
1238
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1239
+ )
1240
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1241
+ if g_param[OptionsDefine.Language]:
1242
+ profile.language = g_param[OptionsDefine.Language]
1243
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1244
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1245
+ client._sdkVersion += ("_CLI_" + __version__)
1246
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1247
+ model = models.DescribeCompareReportRequest()
1248
+ model.from_json_string(json.dumps(args))
1249
+ start_time = time.time()
1250
+ while True:
1251
+ rsp = client.DescribeCompareReport(model)
1252
+ result = rsp.to_json_string()
1253
+ try:
1254
+ json_obj = json.loads(result)
1255
+ except TypeError as e:
1256
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1257
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1258
+ break
1259
+ cur_time = time.time()
1260
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1261
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1262
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1263
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1264
+ else:
1265
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1266
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1267
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1268
+
1269
+
1270
+ def doContinueMigrateJob(args, parsed_globals):
1271
+ g_param = parse_global_arg(parsed_globals)
1272
+
1273
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1274
+ cred = credential.CVMRoleCredential()
1275
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1276
+ cred = credential.STSAssumeRoleCredential(
1277
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1278
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1279
+ )
1280
+ 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):
1281
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1282
+ else:
1283
+ cred = credential.Credential(
1284
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1285
+ )
1286
+ http_profile = HttpProfile(
1287
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1288
+ reqMethod="POST",
1289
+ endpoint=g_param[OptionsDefine.Endpoint],
1290
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1291
+ )
1292
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1293
+ if g_param[OptionsDefine.Language]:
1294
+ profile.language = g_param[OptionsDefine.Language]
1295
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1296
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1297
+ client._sdkVersion += ("_CLI_" + __version__)
1298
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1299
+ model = models.ContinueMigrateJobRequest()
1300
+ model.from_json_string(json.dumps(args))
1301
+ start_time = time.time()
1302
+ while True:
1303
+ rsp = client.ContinueMigrateJob(model)
1304
+ result = rsp.to_json_string()
1305
+ try:
1306
+ json_obj = json.loads(result)
1307
+ except TypeError as e:
1308
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1309
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1310
+ break
1311
+ cur_time = time.time()
1312
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1313
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1314
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1315
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1316
+ else:
1317
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1318
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1319
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1320
+
1321
+
1322
+ def doModifyCompareTask(args, parsed_globals):
1323
+ g_param = parse_global_arg(parsed_globals)
1324
+
1325
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1326
+ cred = credential.CVMRoleCredential()
1327
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1328
+ cred = credential.STSAssumeRoleCredential(
1329
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1330
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1331
+ )
1332
+ 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):
1333
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1334
+ else:
1335
+ cred = credential.Credential(
1336
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1337
+ )
1338
+ http_profile = HttpProfile(
1339
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1340
+ reqMethod="POST",
1341
+ endpoint=g_param[OptionsDefine.Endpoint],
1342
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1343
+ )
1344
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1345
+ if g_param[OptionsDefine.Language]:
1346
+ profile.language = g_param[OptionsDefine.Language]
1347
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1348
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1349
+ client._sdkVersion += ("_CLI_" + __version__)
1350
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1351
+ model = models.ModifyCompareTaskRequest()
1352
+ model.from_json_string(json.dumps(args))
1353
+ start_time = time.time()
1354
+ while True:
1355
+ rsp = client.ModifyCompareTask(model)
1356
+ result = rsp.to_json_string()
1357
+ try:
1358
+ json_obj = json.loads(result)
1359
+ except TypeError as e:
1360
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1361
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1362
+ break
1363
+ cur_time = time.time()
1364
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1365
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1366
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1367
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1368
+ else:
1369
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1370
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1371
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1372
+
1373
+
1374
+ def doPauseMigrateJob(args, parsed_globals):
1375
+ g_param = parse_global_arg(parsed_globals)
1376
+
1377
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1378
+ cred = credential.CVMRoleCredential()
1379
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1380
+ cred = credential.STSAssumeRoleCredential(
1381
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1382
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1383
+ )
1384
+ 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):
1385
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1386
+ else:
1387
+ cred = credential.Credential(
1388
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1389
+ )
1390
+ http_profile = HttpProfile(
1391
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1392
+ reqMethod="POST",
1393
+ endpoint=g_param[OptionsDefine.Endpoint],
1394
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1395
+ )
1396
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1397
+ if g_param[OptionsDefine.Language]:
1398
+ profile.language = g_param[OptionsDefine.Language]
1399
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1400
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1401
+ client._sdkVersion += ("_CLI_" + __version__)
1402
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1403
+ model = models.PauseMigrateJobRequest()
1404
+ model.from_json_string(json.dumps(args))
1405
+ start_time = time.time()
1406
+ while True:
1407
+ rsp = client.PauseMigrateJob(model)
1408
+ result = rsp.to_json_string()
1409
+ try:
1410
+ json_obj = json.loads(result)
1411
+ except TypeError as e:
1412
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1413
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1414
+ break
1415
+ cur_time = time.time()
1416
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1417
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1418
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1419
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1420
+ else:
1421
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1422
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1423
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1424
+
1425
+
1426
+ def doDescribeMigrateCheckJob(args, parsed_globals):
1427
+ g_param = parse_global_arg(parsed_globals)
1428
+
1429
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1430
+ cred = credential.CVMRoleCredential()
1431
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1432
+ cred = credential.STSAssumeRoleCredential(
1433
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1434
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1435
+ )
1436
+ 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):
1437
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1438
+ else:
1439
+ cred = credential.Credential(
1440
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1441
+ )
1442
+ http_profile = HttpProfile(
1443
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1444
+ reqMethod="POST",
1445
+ endpoint=g_param[OptionsDefine.Endpoint],
1446
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1447
+ )
1448
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1449
+ if g_param[OptionsDefine.Language]:
1450
+ profile.language = g_param[OptionsDefine.Language]
1451
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1452
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1453
+ client._sdkVersion += ("_CLI_" + __version__)
1454
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1455
+ model = models.DescribeMigrateCheckJobRequest()
1456
+ model.from_json_string(json.dumps(args))
1457
+ start_time = time.time()
1458
+ while True:
1459
+ rsp = client.DescribeMigrateCheckJob(model)
1460
+ result = rsp.to_json_string()
1461
+ try:
1462
+ json_obj = json.loads(result)
1463
+ except TypeError as e:
1464
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1465
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1466
+ break
1467
+ cur_time = time.time()
1468
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1469
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1470
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1471
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1472
+ else:
1473
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1474
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1475
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1476
+
1477
+
1478
+ def doModifySubscribeObjects(args, parsed_globals):
1479
+ g_param = parse_global_arg(parsed_globals)
1480
+
1481
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1482
+ cred = credential.CVMRoleCredential()
1483
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1484
+ cred = credential.STSAssumeRoleCredential(
1485
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1486
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1487
+ )
1488
+ 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):
1489
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1490
+ else:
1491
+ cred = credential.Credential(
1492
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1493
+ )
1494
+ http_profile = HttpProfile(
1495
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1496
+ reqMethod="POST",
1497
+ endpoint=g_param[OptionsDefine.Endpoint],
1498
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1499
+ )
1500
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1501
+ if g_param[OptionsDefine.Language]:
1502
+ profile.language = g_param[OptionsDefine.Language]
1503
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1504
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1505
+ client._sdkVersion += ("_CLI_" + __version__)
1506
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1507
+ model = models.ModifySubscribeObjectsRequest()
1508
+ model.from_json_string(json.dumps(args))
1509
+ start_time = time.time()
1510
+ while True:
1511
+ rsp = client.ModifySubscribeObjects(model)
1512
+ result = rsp.to_json_string()
1513
+ try:
1514
+ json_obj = json.loads(result)
1515
+ except TypeError as e:
1516
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1517
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1518
+ break
1519
+ cur_time = time.time()
1520
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1521
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1522
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1523
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1524
+ else:
1525
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1526
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1527
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1528
+
1529
+
1530
+ def doConfigureSyncJob(args, parsed_globals):
1531
+ g_param = parse_global_arg(parsed_globals)
1532
+
1533
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1534
+ cred = credential.CVMRoleCredential()
1535
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1536
+ cred = credential.STSAssumeRoleCredential(
1537
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1538
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1539
+ )
1540
+ 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):
1541
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1542
+ else:
1543
+ cred = credential.Credential(
1544
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1545
+ )
1546
+ http_profile = HttpProfile(
1547
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1548
+ reqMethod="POST",
1549
+ endpoint=g_param[OptionsDefine.Endpoint],
1550
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1551
+ )
1552
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1553
+ if g_param[OptionsDefine.Language]:
1554
+ profile.language = g_param[OptionsDefine.Language]
1555
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1556
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1557
+ client._sdkVersion += ("_CLI_" + __version__)
1558
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1559
+ model = models.ConfigureSyncJobRequest()
1560
+ model.from_json_string(json.dumps(args))
1561
+ start_time = time.time()
1562
+ while True:
1563
+ rsp = client.ConfigureSyncJob(model)
1564
+ result = rsp.to_json_string()
1565
+ try:
1566
+ json_obj = json.loads(result)
1567
+ except TypeError as e:
1568
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1569
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1570
+ break
1571
+ cur_time = time.time()
1572
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1573
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1574
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1575
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1576
+ else:
1577
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1578
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1579
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1580
+
1581
+
1582
+ def doIsolateSubscribe(args, parsed_globals):
1583
+ g_param = parse_global_arg(parsed_globals)
1584
+
1585
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1586
+ cred = credential.CVMRoleCredential()
1587
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1588
+ cred = credential.STSAssumeRoleCredential(
1589
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1590
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1591
+ )
1592
+ 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):
1593
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1594
+ else:
1595
+ cred = credential.Credential(
1596
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1597
+ )
1598
+ http_profile = HttpProfile(
1599
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1600
+ reqMethod="POST",
1601
+ endpoint=g_param[OptionsDefine.Endpoint],
1602
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1603
+ )
1604
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1605
+ if g_param[OptionsDefine.Language]:
1606
+ profile.language = g_param[OptionsDefine.Language]
1607
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1608
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1609
+ client._sdkVersion += ("_CLI_" + __version__)
1610
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1611
+ model = models.IsolateSubscribeRequest()
1612
+ model.from_json_string(json.dumps(args))
1613
+ start_time = time.time()
1614
+ while True:
1615
+ rsp = client.IsolateSubscribe(model)
1616
+ result = rsp.to_json_string()
1617
+ try:
1618
+ json_obj = json.loads(result)
1619
+ except TypeError as e:
1620
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1621
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1622
+ break
1623
+ cur_time = time.time()
1624
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1625
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1626
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1627
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1628
+ else:
1629
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1630
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1631
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1632
+
1633
+
1634
+ def doDestroyMigrateJob(args, parsed_globals):
1635
+ g_param = parse_global_arg(parsed_globals)
1636
+
1637
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1638
+ cred = credential.CVMRoleCredential()
1639
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1640
+ cred = credential.STSAssumeRoleCredential(
1641
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1642
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1643
+ )
1644
+ 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):
1645
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1646
+ else:
1647
+ cred = credential.Credential(
1648
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1649
+ )
1650
+ http_profile = HttpProfile(
1651
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1652
+ reqMethod="POST",
1653
+ endpoint=g_param[OptionsDefine.Endpoint],
1654
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1655
+ )
1656
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1657
+ if g_param[OptionsDefine.Language]:
1658
+ profile.language = g_param[OptionsDefine.Language]
1659
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1660
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1661
+ client._sdkVersion += ("_CLI_" + __version__)
1662
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1663
+ model = models.DestroyMigrateJobRequest()
1664
+ model.from_json_string(json.dumps(args))
1665
+ start_time = time.time()
1666
+ while True:
1667
+ rsp = client.DestroyMigrateJob(model)
1668
+ result = rsp.to_json_string()
1669
+ try:
1670
+ json_obj = json.loads(result)
1671
+ except TypeError as e:
1672
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1673
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1674
+ break
1675
+ cur_time = time.time()
1676
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1677
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1678
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1679
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1680
+ else:
1681
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1682
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1683
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1684
+
1685
+
1686
+ def doResizeSyncJob(args, parsed_globals):
1687
+ g_param = parse_global_arg(parsed_globals)
1688
+
1689
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1690
+ cred = credential.CVMRoleCredential()
1691
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1692
+ cred = credential.STSAssumeRoleCredential(
1693
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1694
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1695
+ )
1696
+ 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):
1697
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1698
+ else:
1699
+ cred = credential.Credential(
1700
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1701
+ )
1702
+ http_profile = HttpProfile(
1703
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1704
+ reqMethod="POST",
1705
+ endpoint=g_param[OptionsDefine.Endpoint],
1706
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1707
+ )
1708
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1709
+ if g_param[OptionsDefine.Language]:
1710
+ profile.language = g_param[OptionsDefine.Language]
1711
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1712
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1713
+ client._sdkVersion += ("_CLI_" + __version__)
1714
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1715
+ model = models.ResizeSyncJobRequest()
1716
+ model.from_json_string(json.dumps(args))
1717
+ start_time = time.time()
1718
+ while True:
1719
+ rsp = client.ResizeSyncJob(model)
1720
+ result = rsp.to_json_string()
1721
+ try:
1722
+ json_obj = json.loads(result)
1723
+ except TypeError as e:
1724
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1725
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1726
+ break
1727
+ cur_time = time.time()
1728
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1729
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1730
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1731
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1732
+ else:
1733
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1734
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1735
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1736
+
1737
+
1738
+ def doModifySubscribeAutoRenewFlag(args, parsed_globals):
1739
+ g_param = parse_global_arg(parsed_globals)
1740
+
1741
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1742
+ cred = credential.CVMRoleCredential()
1743
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1744
+ cred = credential.STSAssumeRoleCredential(
1745
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1746
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1747
+ )
1748
+ 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):
1749
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1750
+ else:
1751
+ cred = credential.Credential(
1752
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1753
+ )
1754
+ http_profile = HttpProfile(
1755
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1756
+ reqMethod="POST",
1757
+ endpoint=g_param[OptionsDefine.Endpoint],
1758
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1759
+ )
1760
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1761
+ if g_param[OptionsDefine.Language]:
1762
+ profile.language = g_param[OptionsDefine.Language]
1763
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1764
+ client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1765
+ client._sdkVersion += ("_CLI_" + __version__)
1766
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1767
+ model = models.ModifySubscribeAutoRenewFlagRequest()
1768
+ model.from_json_string(json.dumps(args))
1769
+ start_time = time.time()
1770
+ while True:
1771
+ rsp = client.ModifySubscribeAutoRenewFlag(model)
1772
+ result = rsp.to_json_string()
1773
+ try:
1774
+ json_obj = json.loads(result)
1775
+ except TypeError as e:
1776
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1777
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1778
+ break
1779
+ cur_time = time.time()
1780
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1781
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1782
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1783
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1784
+ else:
1785
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1786
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1787
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1788
+
1789
+
1790
+ def doModifySyncJobConfig(args, parsed_globals):
959
1791
  g_param = parse_global_arg(parsed_globals)
960
1792
 
961
1793
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -984,11 +1816,11 @@ def doDescribeMigrateCheckJob(args, parsed_globals):
984
1816
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
985
1817
  client._sdkVersion += ("_CLI_" + __version__)
986
1818
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
987
- model = models.DescribeMigrateCheckJobRequest()
1819
+ model = models.ModifySyncJobConfigRequest()
988
1820
  model.from_json_string(json.dumps(args))
989
1821
  start_time = time.time()
990
1822
  while True:
991
- rsp = client.DescribeMigrateCheckJob(model)
1823
+ rsp = client.ModifySyncJobConfig(model)
992
1824
  result = rsp.to_json_string()
993
1825
  try:
994
1826
  json_obj = json.loads(result)
@@ -1007,7 +1839,7 @@ def doDescribeMigrateCheckJob(args, parsed_globals):
1007
1839
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1008
1840
 
1009
1841
 
1010
- def doModifySubscribeObjects(args, parsed_globals):
1842
+ def doResumeMigrateJob(args, parsed_globals):
1011
1843
  g_param = parse_global_arg(parsed_globals)
1012
1844
 
1013
1845
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1036,11 +1868,11 @@ def doModifySubscribeObjects(args, parsed_globals):
1036
1868
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1037
1869
  client._sdkVersion += ("_CLI_" + __version__)
1038
1870
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1039
- model = models.ModifySubscribeObjectsRequest()
1871
+ model = models.ResumeMigrateJobRequest()
1040
1872
  model.from_json_string(json.dumps(args))
1041
1873
  start_time = time.time()
1042
1874
  while True:
1043
- rsp = client.ModifySubscribeObjects(model)
1875
+ rsp = client.ResumeMigrateJob(model)
1044
1876
  result = rsp.to_json_string()
1045
1877
  try:
1046
1878
  json_obj = json.loads(result)
@@ -1059,7 +1891,7 @@ def doModifySubscribeObjects(args, parsed_globals):
1059
1891
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1060
1892
 
1061
1893
 
1062
- def doConfigureSyncJob(args, parsed_globals):
1894
+ def doStopMigrateJob(args, parsed_globals):
1063
1895
  g_param = parse_global_arg(parsed_globals)
1064
1896
 
1065
1897
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1088,11 +1920,11 @@ def doConfigureSyncJob(args, parsed_globals):
1088
1920
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1089
1921
  client._sdkVersion += ("_CLI_" + __version__)
1090
1922
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1091
- model = models.ConfigureSyncJobRequest()
1923
+ model = models.StopMigrateJobRequest()
1092
1924
  model.from_json_string(json.dumps(args))
1093
1925
  start_time = time.time()
1094
1926
  while True:
1095
- rsp = client.ConfigureSyncJob(model)
1927
+ rsp = client.StopMigrateJob(model)
1096
1928
  result = rsp.to_json_string()
1097
1929
  try:
1098
1930
  json_obj = json.loads(result)
@@ -1111,7 +1943,7 @@ def doConfigureSyncJob(args, parsed_globals):
1111
1943
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1112
1944
 
1113
1945
 
1114
- def doIsolateSubscribe(args, parsed_globals):
1946
+ def doDescribeRegionConf(args, parsed_globals):
1115
1947
  g_param = parse_global_arg(parsed_globals)
1116
1948
 
1117
1949
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1140,11 +1972,11 @@ def doIsolateSubscribe(args, parsed_globals):
1140
1972
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1141
1973
  client._sdkVersion += ("_CLI_" + __version__)
1142
1974
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1143
- model = models.IsolateSubscribeRequest()
1975
+ model = models.DescribeRegionConfRequest()
1144
1976
  model.from_json_string(json.dumps(args))
1145
1977
  start_time = time.time()
1146
1978
  while True:
1147
- rsp = client.IsolateSubscribe(model)
1979
+ rsp = client.DescribeRegionConf(model)
1148
1980
  result = rsp.to_json_string()
1149
1981
  try:
1150
1982
  json_obj = json.loads(result)
@@ -1163,7 +1995,7 @@ def doIsolateSubscribe(args, parsed_globals):
1163
1995
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
1996
 
1165
1997
 
1166
- def doResizeSyncJob(args, parsed_globals):
1998
+ def doPauseSyncJob(args, parsed_globals):
1167
1999
  g_param = parse_global_arg(parsed_globals)
1168
2000
 
1169
2001
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1192,11 +2024,11 @@ def doResizeSyncJob(args, parsed_globals):
1192
2024
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1193
2025
  client._sdkVersion += ("_CLI_" + __version__)
1194
2026
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1195
- model = models.ResizeSyncJobRequest()
2027
+ model = models.PauseSyncJobRequest()
1196
2028
  model.from_json_string(json.dumps(args))
1197
2029
  start_time = time.time()
1198
2030
  while True:
1199
- rsp = client.ResizeSyncJob(model)
2031
+ rsp = client.PauseSyncJob(model)
1200
2032
  result = rsp.to_json_string()
1201
2033
  try:
1202
2034
  json_obj = json.loads(result)
@@ -1215,7 +2047,7 @@ def doResizeSyncJob(args, parsed_globals):
1215
2047
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1216
2048
 
1217
2049
 
1218
- def doModifySubscribeAutoRenewFlag(args, parsed_globals):
2050
+ def doStartModifySyncJob(args, parsed_globals):
1219
2051
  g_param = parse_global_arg(parsed_globals)
1220
2052
 
1221
2053
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1244,11 +2076,11 @@ def doModifySubscribeAutoRenewFlag(args, parsed_globals):
1244
2076
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1245
2077
  client._sdkVersion += ("_CLI_" + __version__)
1246
2078
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1247
- model = models.ModifySubscribeAutoRenewFlagRequest()
2079
+ model = models.StartModifySyncJobRequest()
1248
2080
  model.from_json_string(json.dumps(args))
1249
2081
  start_time = time.time()
1250
2082
  while True:
1251
- rsp = client.ModifySubscribeAutoRenewFlag(model)
2083
+ rsp = client.StartModifySyncJob(model)
1252
2084
  result = rsp.to_json_string()
1253
2085
  try:
1254
2086
  json_obj = json.loads(result)
@@ -1267,7 +2099,7 @@ def doModifySubscribeAutoRenewFlag(args, parsed_globals):
1267
2099
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1268
2100
 
1269
2101
 
1270
- def doModifySyncJobConfig(args, parsed_globals):
2102
+ def doDescribeSubscribes(args, parsed_globals):
1271
2103
  g_param = parse_global_arg(parsed_globals)
1272
2104
 
1273
2105
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1296,11 +2128,11 @@ def doModifySyncJobConfig(args, parsed_globals):
1296
2128
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1297
2129
  client._sdkVersion += ("_CLI_" + __version__)
1298
2130
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1299
- model = models.ModifySyncJobConfigRequest()
2131
+ model = models.DescribeSubscribesRequest()
1300
2132
  model.from_json_string(json.dumps(args))
1301
2133
  start_time = time.time()
1302
2134
  while True:
1303
- rsp = client.ModifySyncJobConfig(model)
2135
+ rsp = client.DescribeSubscribes(model)
1304
2136
  result = rsp.to_json_string()
1305
2137
  try:
1306
2138
  json_obj = json.loads(result)
@@ -1319,7 +2151,7 @@ def doModifySyncJobConfig(args, parsed_globals):
1319
2151
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1320
2152
 
1321
2153
 
1322
- def doResumeMigrateJob(args, parsed_globals):
2154
+ def doStartCompare(args, parsed_globals):
1323
2155
  g_param = parse_global_arg(parsed_globals)
1324
2156
 
1325
2157
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1348,11 +2180,11 @@ def doResumeMigrateJob(args, parsed_globals):
1348
2180
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1349
2181
  client._sdkVersion += ("_CLI_" + __version__)
1350
2182
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1351
- model = models.ResumeMigrateJobRequest()
2183
+ model = models.StartCompareRequest()
1352
2184
  model.from_json_string(json.dumps(args))
1353
2185
  start_time = time.time()
1354
2186
  while True:
1355
- rsp = client.ResumeMigrateJob(model)
2187
+ rsp = client.StartCompare(model)
1356
2188
  result = rsp.to_json_string()
1357
2189
  try:
1358
2190
  json_obj = json.loads(result)
@@ -1371,7 +2203,7 @@ def doResumeMigrateJob(args, parsed_globals):
1371
2203
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1372
2204
 
1373
2205
 
1374
- def doStopMigrateJob(args, parsed_globals):
2206
+ def doDescribeSubscribeCheckJob(args, parsed_globals):
1375
2207
  g_param = parse_global_arg(parsed_globals)
1376
2208
 
1377
2209
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1400,11 +2232,11 @@ def doStopMigrateJob(args, parsed_globals):
1400
2232
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1401
2233
  client._sdkVersion += ("_CLI_" + __version__)
1402
2234
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1403
- model = models.StopMigrateJobRequest()
2235
+ model = models.DescribeSubscribeCheckJobRequest()
1404
2236
  model.from_json_string(json.dumps(args))
1405
2237
  start_time = time.time()
1406
2238
  while True:
1407
- rsp = client.StopMigrateJob(model)
2239
+ rsp = client.DescribeSubscribeCheckJob(model)
1408
2240
  result = rsp.to_json_string()
1409
2241
  try:
1410
2242
  json_obj = json.loads(result)
@@ -1423,7 +2255,7 @@ def doStopMigrateJob(args, parsed_globals):
1423
2255
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1424
2256
 
1425
2257
 
1426
- def doDescribeRegionConf(args, parsed_globals):
2258
+ def doContinueSyncJob(args, parsed_globals):
1427
2259
  g_param = parse_global_arg(parsed_globals)
1428
2260
 
1429
2261
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1452,11 +2284,11 @@ def doDescribeRegionConf(args, parsed_globals):
1452
2284
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1453
2285
  client._sdkVersion += ("_CLI_" + __version__)
1454
2286
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1455
- model = models.DescribeRegionConfRequest()
2287
+ model = models.ContinueSyncJobRequest()
1456
2288
  model.from_json_string(json.dumps(args))
1457
2289
  start_time = time.time()
1458
2290
  while True:
1459
- rsp = client.DescribeRegionConf(model)
2291
+ rsp = client.ContinueSyncJob(model)
1460
2292
  result = rsp.to_json_string()
1461
2293
  try:
1462
2294
  json_obj = json.loads(result)
@@ -1475,7 +2307,7 @@ def doDescribeRegionConf(args, parsed_globals):
1475
2307
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1476
2308
 
1477
2309
 
1478
- def doPauseSyncJob(args, parsed_globals):
2310
+ def doStopSyncJob(args, parsed_globals):
1479
2311
  g_param = parse_global_arg(parsed_globals)
1480
2312
 
1481
2313
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1504,11 +2336,11 @@ def doPauseSyncJob(args, parsed_globals):
1504
2336
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1505
2337
  client._sdkVersion += ("_CLI_" + __version__)
1506
2338
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1507
- model = models.PauseSyncJobRequest()
2339
+ model = models.StopSyncJobRequest()
1508
2340
  model.from_json_string(json.dumps(args))
1509
2341
  start_time = time.time()
1510
2342
  while True:
1511
- rsp = client.PauseSyncJob(model)
2343
+ rsp = client.StopSyncJob(model)
1512
2344
  result = rsp.to_json_string()
1513
2345
  try:
1514
2346
  json_obj = json.loads(result)
@@ -1527,7 +2359,7 @@ def doPauseSyncJob(args, parsed_globals):
1527
2359
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1528
2360
 
1529
2361
 
1530
- def doStartModifySyncJob(args, parsed_globals):
2362
+ def doModifyConsumerGroupDescription(args, parsed_globals):
1531
2363
  g_param = parse_global_arg(parsed_globals)
1532
2364
 
1533
2365
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1556,11 +2388,11 @@ def doStartModifySyncJob(args, parsed_globals):
1556
2388
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1557
2389
  client._sdkVersion += ("_CLI_" + __version__)
1558
2390
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1559
- model = models.StartModifySyncJobRequest()
2391
+ model = models.ModifyConsumerGroupDescriptionRequest()
1560
2392
  model.from_json_string(json.dumps(args))
1561
2393
  start_time = time.time()
1562
2394
  while True:
1563
- rsp = client.StartModifySyncJob(model)
2395
+ rsp = client.ModifyConsumerGroupDescription(model)
1564
2396
  result = rsp.to_json_string()
1565
2397
  try:
1566
2398
  json_obj = json.loads(result)
@@ -1579,7 +2411,7 @@ def doStartModifySyncJob(args, parsed_globals):
1579
2411
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1580
2412
 
1581
2413
 
1582
- def doDescribeSubscribes(args, parsed_globals):
2414
+ def doDescribeMigrateDBInstances(args, parsed_globals):
1583
2415
  g_param = parse_global_arg(parsed_globals)
1584
2416
 
1585
2417
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1608,11 +2440,11 @@ def doDescribeSubscribes(args, parsed_globals):
1608
2440
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1609
2441
  client._sdkVersion += ("_CLI_" + __version__)
1610
2442
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1611
- model = models.DescribeSubscribesRequest()
2443
+ model = models.DescribeMigrateDBInstancesRequest()
1612
2444
  model.from_json_string(json.dumps(args))
1613
2445
  start_time = time.time()
1614
2446
  while True:
1615
- rsp = client.DescribeSubscribes(model)
2447
+ rsp = client.DescribeMigrateDBInstances(model)
1616
2448
  result = rsp.to_json_string()
1617
2449
  try:
1618
2450
  json_obj = json.loads(result)
@@ -1631,7 +2463,7 @@ def doDescribeSubscribes(args, parsed_globals):
1631
2463
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1632
2464
 
1633
2465
 
1634
- def doStartCompare(args, parsed_globals):
2466
+ def doSkipCheckItem(args, parsed_globals):
1635
2467
  g_param = parse_global_arg(parsed_globals)
1636
2468
 
1637
2469
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1660,11 +2492,11 @@ def doStartCompare(args, parsed_globals):
1660
2492
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1661
2493
  client._sdkVersion += ("_CLI_" + __version__)
1662
2494
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1663
- model = models.StartCompareRequest()
2495
+ model = models.SkipCheckItemRequest()
1664
2496
  model.from_json_string(json.dumps(args))
1665
2497
  start_time = time.time()
1666
2498
  while True:
1667
- rsp = client.StartCompare(model)
2499
+ rsp = client.SkipCheckItem(model)
1668
2500
  result = rsp.to_json_string()
1669
2501
  try:
1670
2502
  json_obj = json.loads(result)
@@ -1683,7 +2515,7 @@ def doStartCompare(args, parsed_globals):
1683
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1684
2516
 
1685
2517
 
1686
- def doModifySubscribeName(args, parsed_globals):
2518
+ def doDescribeSubscribeConf(args, parsed_globals):
1687
2519
  g_param = parse_global_arg(parsed_globals)
1688
2520
 
1689
2521
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1712,11 +2544,11 @@ def doModifySubscribeName(args, parsed_globals):
1712
2544
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1713
2545
  client._sdkVersion += ("_CLI_" + __version__)
1714
2546
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1715
- model = models.ModifySubscribeNameRequest()
2547
+ model = models.DescribeSubscribeConfRequest()
1716
2548
  model.from_json_string(json.dumps(args))
1717
2549
  start_time = time.time()
1718
2550
  while True:
1719
- rsp = client.ModifySubscribeName(model)
2551
+ rsp = client.DescribeSubscribeConf(model)
1720
2552
  result = rsp.to_json_string()
1721
2553
  try:
1722
2554
  json_obj = json.loads(result)
@@ -1735,7 +2567,7 @@ def doModifySubscribeName(args, parsed_globals):
1735
2567
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1736
2568
 
1737
2569
 
1738
- def doContinueSyncJob(args, parsed_globals):
2570
+ def doModifyConsumerGroupPassword(args, parsed_globals):
1739
2571
  g_param = parse_global_arg(parsed_globals)
1740
2572
 
1741
2573
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1764,11 +2596,11 @@ def doContinueSyncJob(args, parsed_globals):
1764
2596
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1765
2597
  client._sdkVersion += ("_CLI_" + __version__)
1766
2598
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1767
- model = models.ContinueSyncJobRequest()
2599
+ model = models.ModifyConsumerGroupPasswordRequest()
1768
2600
  model.from_json_string(json.dumps(args))
1769
2601
  start_time = time.time()
1770
2602
  while True:
1771
- rsp = client.ContinueSyncJob(model)
2603
+ rsp = client.ModifyConsumerGroupPassword(model)
1772
2604
  result = rsp.to_json_string()
1773
2605
  try:
1774
2606
  json_obj = json.loads(result)
@@ -1787,7 +2619,7 @@ def doContinueSyncJob(args, parsed_globals):
1787
2619
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1788
2620
 
1789
2621
 
1790
- def doStopSyncJob(args, parsed_globals):
2622
+ def doCreateMigrateJob(args, parsed_globals):
1791
2623
  g_param = parse_global_arg(parsed_globals)
1792
2624
 
1793
2625
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1816,11 +2648,11 @@ def doStopSyncJob(args, parsed_globals):
1816
2648
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1817
2649
  client._sdkVersion += ("_CLI_" + __version__)
1818
2650
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1819
- model = models.StopSyncJobRequest()
2651
+ model = models.CreateMigrateJobRequest()
1820
2652
  model.from_json_string(json.dumps(args))
1821
2653
  start_time = time.time()
1822
2654
  while True:
1823
- rsp = client.StopSyncJob(model)
2655
+ rsp = client.CreateMigrateJob(model)
1824
2656
  result = rsp.to_json_string()
1825
2657
  try:
1826
2658
  json_obj = json.loads(result)
@@ -1839,7 +2671,7 @@ def doStopSyncJob(args, parsed_globals):
1839
2671
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1840
2672
 
1841
2673
 
1842
- def doActivateSubscribe(args, parsed_globals):
2674
+ def doModifySubscribeVipVport(args, parsed_globals):
1843
2675
  g_param = parse_global_arg(parsed_globals)
1844
2676
 
1845
2677
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1868,11 +2700,11 @@ def doActivateSubscribe(args, parsed_globals):
1868
2700
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1869
2701
  client._sdkVersion += ("_CLI_" + __version__)
1870
2702
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1871
- model = models.ActivateSubscribeRequest()
2703
+ model = models.ModifySubscribeVipVportRequest()
1872
2704
  model.from_json_string(json.dumps(args))
1873
2705
  start_time = time.time()
1874
2706
  while True:
1875
- rsp = client.ActivateSubscribe(model)
2707
+ rsp = client.ModifySubscribeVipVport(model)
1876
2708
  result = rsp.to_json_string()
1877
2709
  try:
1878
2710
  json_obj = json.loads(result)
@@ -1891,7 +2723,7 @@ def doActivateSubscribe(args, parsed_globals):
1891
2723
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1892
2724
 
1893
2725
 
1894
- def doDescribeMigrateDBInstances(args, parsed_globals):
2726
+ def doCreateSubscribeCheckJob(args, parsed_globals):
1895
2727
  g_param = parse_global_arg(parsed_globals)
1896
2728
 
1897
2729
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1920,11 +2752,11 @@ def doDescribeMigrateDBInstances(args, parsed_globals):
1920
2752
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1921
2753
  client._sdkVersion += ("_CLI_" + __version__)
1922
2754
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1923
- model = models.DescribeMigrateDBInstancesRequest()
2755
+ model = models.CreateSubscribeCheckJobRequest()
1924
2756
  model.from_json_string(json.dumps(args))
1925
2757
  start_time = time.time()
1926
2758
  while True:
1927
- rsp = client.DescribeMigrateDBInstances(model)
2759
+ rsp = client.CreateSubscribeCheckJob(model)
1928
2760
  result = rsp.to_json_string()
1929
2761
  try:
1930
2762
  json_obj = json.loads(result)
@@ -1943,7 +2775,7 @@ def doDescribeMigrateDBInstances(args, parsed_globals):
1943
2775
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1944
2776
 
1945
2777
 
1946
- def doSkipCheckItem(args, parsed_globals):
2778
+ def doCreateMigrateCheckJob(args, parsed_globals):
1947
2779
  g_param = parse_global_arg(parsed_globals)
1948
2780
 
1949
2781
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1972,11 +2804,11 @@ def doSkipCheckItem(args, parsed_globals):
1972
2804
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
1973
2805
  client._sdkVersion += ("_CLI_" + __version__)
1974
2806
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1975
- model = models.SkipCheckItemRequest()
2807
+ model = models.CreateMigrateCheckJobRequest()
1976
2808
  model.from_json_string(json.dumps(args))
1977
2809
  start_time = time.time()
1978
2810
  while True:
1979
- rsp = client.SkipCheckItem(model)
2811
+ rsp = client.CreateMigrateCheckJob(model)
1980
2812
  result = rsp.to_json_string()
1981
2813
  try:
1982
2814
  json_obj = json.loads(result)
@@ -1995,7 +2827,7 @@ def doSkipCheckItem(args, parsed_globals):
1995
2827
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1996
2828
 
1997
2829
 
1998
- def doCreateMigrateJob(args, parsed_globals):
2830
+ def doIsolateMigrateJob(args, parsed_globals):
1999
2831
  g_param = parse_global_arg(parsed_globals)
2000
2832
 
2001
2833
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2024,11 +2856,11 @@ def doCreateMigrateJob(args, parsed_globals):
2024
2856
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2025
2857
  client._sdkVersion += ("_CLI_" + __version__)
2026
2858
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2027
- model = models.CreateMigrateJobRequest()
2859
+ model = models.IsolateMigrateJobRequest()
2028
2860
  model.from_json_string(json.dumps(args))
2029
2861
  start_time = time.time()
2030
2862
  while True:
2031
- rsp = client.CreateMigrateJob(model)
2863
+ rsp = client.IsolateMigrateJob(model)
2032
2864
  result = rsp.to_json_string()
2033
2865
  try:
2034
2866
  json_obj = json.loads(result)
@@ -2047,7 +2879,7 @@ def doCreateMigrateJob(args, parsed_globals):
2047
2879
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2048
2880
 
2049
2881
 
2050
- def doModifySubscribeVipVport(args, parsed_globals):
2882
+ def doDescribeCheckSyncJobResult(args, parsed_globals):
2051
2883
  g_param = parse_global_arg(parsed_globals)
2052
2884
 
2053
2885
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2076,11 +2908,11 @@ def doModifySubscribeVipVport(args, parsed_globals):
2076
2908
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2077
2909
  client._sdkVersion += ("_CLI_" + __version__)
2078
2910
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2079
- model = models.ModifySubscribeVipVportRequest()
2911
+ model = models.DescribeCheckSyncJobResultRequest()
2080
2912
  model.from_json_string(json.dumps(args))
2081
2913
  start_time = time.time()
2082
2914
  while True:
2083
- rsp = client.ModifySubscribeVipVport(model)
2915
+ rsp = client.DescribeCheckSyncJobResult(model)
2084
2916
  result = rsp.to_json_string()
2085
2917
  try:
2086
2918
  json_obj = json.loads(result)
@@ -2099,7 +2931,7 @@ def doModifySubscribeVipVport(args, parsed_globals):
2099
2931
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2100
2932
 
2101
2933
 
2102
- def doCreateMigrateCheckJob(args, parsed_globals):
2934
+ def doDescribeCompareTasks(args, parsed_globals):
2103
2935
  g_param = parse_global_arg(parsed_globals)
2104
2936
 
2105
2937
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2128,11 +2960,11 @@ def doCreateMigrateCheckJob(args, parsed_globals):
2128
2960
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2129
2961
  client._sdkVersion += ("_CLI_" + __version__)
2130
2962
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2131
- model = models.CreateMigrateCheckJobRequest()
2963
+ model = models.DescribeCompareTasksRequest()
2132
2964
  model.from_json_string(json.dumps(args))
2133
2965
  start_time = time.time()
2134
2966
  while True:
2135
- rsp = client.CreateMigrateCheckJob(model)
2967
+ rsp = client.DescribeCompareTasks(model)
2136
2968
  result = rsp.to_json_string()
2137
2969
  try:
2138
2970
  json_obj = json.loads(result)
@@ -2151,7 +2983,7 @@ def doCreateMigrateCheckJob(args, parsed_globals):
2151
2983
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2152
2984
 
2153
2985
 
2154
- def doIsolateMigrateJob(args, parsed_globals):
2986
+ def doSkipSyncCheckItem(args, parsed_globals):
2155
2987
  g_param = parse_global_arg(parsed_globals)
2156
2988
 
2157
2989
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2180,11 +3012,11 @@ def doIsolateMigrateJob(args, parsed_globals):
2180
3012
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2181
3013
  client._sdkVersion += ("_CLI_" + __version__)
2182
3014
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2183
- model = models.IsolateMigrateJobRequest()
3015
+ model = models.SkipSyncCheckItemRequest()
2184
3016
  model.from_json_string(json.dumps(args))
2185
3017
  start_time = time.time()
2186
3018
  while True:
2187
- rsp = client.IsolateMigrateJob(model)
3019
+ rsp = client.SkipSyncCheckItem(model)
2188
3020
  result = rsp.to_json_string()
2189
3021
  try:
2190
3022
  json_obj = json.loads(result)
@@ -2203,7 +3035,7 @@ def doIsolateMigrateJob(args, parsed_globals):
2203
3035
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2204
3036
 
2205
3037
 
2206
- def doDescribeCheckSyncJobResult(args, parsed_globals):
3038
+ def doDescribeSubscribeDetail(args, parsed_globals):
2207
3039
  g_param = parse_global_arg(parsed_globals)
2208
3040
 
2209
3041
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2232,11 +3064,11 @@ def doDescribeCheckSyncJobResult(args, parsed_globals):
2232
3064
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2233
3065
  client._sdkVersion += ("_CLI_" + __version__)
2234
3066
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2235
- model = models.DescribeCheckSyncJobResultRequest()
3067
+ model = models.DescribeSubscribeDetailRequest()
2236
3068
  model.from_json_string(json.dumps(args))
2237
3069
  start_time = time.time()
2238
3070
  while True:
2239
- rsp = client.DescribeCheckSyncJobResult(model)
3071
+ rsp = client.DescribeSubscribeDetail(model)
2240
3072
  result = rsp.to_json_string()
2241
3073
  try:
2242
3074
  json_obj = json.loads(result)
@@ -2255,7 +3087,7 @@ def doDescribeCheckSyncJobResult(args, parsed_globals):
2255
3087
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2256
3088
 
2257
3089
 
2258
- def doDescribeCompareTasks(args, parsed_globals):
3090
+ def doDeleteConsumerGroup(args, parsed_globals):
2259
3091
  g_param = parse_global_arg(parsed_globals)
2260
3092
 
2261
3093
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2284,11 +3116,11 @@ def doDescribeCompareTasks(args, parsed_globals):
2284
3116
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2285
3117
  client._sdkVersion += ("_CLI_" + __version__)
2286
3118
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2287
- model = models.DescribeCompareTasksRequest()
3119
+ model = models.DeleteConsumerGroupRequest()
2288
3120
  model.from_json_string(json.dumps(args))
2289
3121
  start_time = time.time()
2290
3122
  while True:
2291
- rsp = client.DescribeCompareTasks(model)
3123
+ rsp = client.DeleteConsumerGroup(model)
2292
3124
  result = rsp.to_json_string()
2293
3125
  try:
2294
3126
  json_obj = json.loads(result)
@@ -2307,7 +3139,7 @@ def doDescribeCompareTasks(args, parsed_globals):
2307
3139
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2308
3140
 
2309
3141
 
2310
- def doSkipSyncCheckItem(args, parsed_globals):
3142
+ def doDescribeMigrationJobs(args, parsed_globals):
2311
3143
  g_param = parse_global_arg(parsed_globals)
2312
3144
 
2313
3145
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2336,11 +3168,11 @@ def doSkipSyncCheckItem(args, parsed_globals):
2336
3168
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2337
3169
  client._sdkVersion += ("_CLI_" + __version__)
2338
3170
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2339
- model = models.SkipSyncCheckItemRequest()
3171
+ model = models.DescribeMigrationJobsRequest()
2340
3172
  model.from_json_string(json.dumps(args))
2341
3173
  start_time = time.time()
2342
3174
  while True:
2343
- rsp = client.SkipSyncCheckItem(model)
3175
+ rsp = client.DescribeMigrationJobs(model)
2344
3176
  result = rsp.to_json_string()
2345
3177
  try:
2346
3178
  json_obj = json.loads(result)
@@ -2359,7 +3191,7 @@ def doSkipSyncCheckItem(args, parsed_globals):
2359
3191
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2360
3192
 
2361
3193
 
2362
- def doDescribeMigrateJobs(args, parsed_globals):
3194
+ def doRecoverMigrateJob(args, parsed_globals):
2363
3195
  g_param = parse_global_arg(parsed_globals)
2364
3196
 
2365
3197
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2388,11 +3220,11 @@ def doDescribeMigrateJobs(args, parsed_globals):
2388
3220
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2389
3221
  client._sdkVersion += ("_CLI_" + __version__)
2390
3222
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2391
- model = models.DescribeMigrateJobsRequest()
3223
+ model = models.RecoverMigrateJobRequest()
2392
3224
  model.from_json_string(json.dumps(args))
2393
3225
  start_time = time.time()
2394
3226
  while True:
2395
- rsp = client.DescribeMigrateJobs(model)
3227
+ rsp = client.RecoverMigrateJob(model)
2396
3228
  result = rsp.to_json_string()
2397
3229
  try:
2398
3230
  json_obj = json.loads(result)
@@ -2411,7 +3243,7 @@ def doDescribeMigrateJobs(args, parsed_globals):
2411
3243
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2412
3244
 
2413
3245
 
2414
- def doDescribeMigrationJobs(args, parsed_globals):
3246
+ def doDescribeMigrateJobs(args, parsed_globals):
2415
3247
  g_param = parse_global_arg(parsed_globals)
2416
3248
 
2417
3249
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2440,11 +3272,11 @@ def doDescribeMigrationJobs(args, parsed_globals):
2440
3272
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2441
3273
  client._sdkVersion += ("_CLI_" + __version__)
2442
3274
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2443
- model = models.DescribeMigrationJobsRequest()
3275
+ model = models.DescribeMigrateJobsRequest()
2444
3276
  model.from_json_string(json.dumps(args))
2445
3277
  start_time = time.time()
2446
3278
  while True:
2447
- rsp = client.DescribeMigrationJobs(model)
3279
+ rsp = client.DescribeMigrateJobs(model)
2448
3280
  result = rsp.to_json_string()
2449
3281
  try:
2450
3282
  json_obj = json.loads(result)
@@ -2463,7 +3295,7 @@ def doDescribeMigrationJobs(args, parsed_globals):
2463
3295
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2464
3296
 
2465
3297
 
2466
- def doRecoverMigrateJob(args, parsed_globals):
3298
+ def doCreateSubscribe(args, parsed_globals):
2467
3299
  g_param = parse_global_arg(parsed_globals)
2468
3300
 
2469
3301
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2492,11 +3324,11 @@ def doRecoverMigrateJob(args, parsed_globals):
2492
3324
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2493
3325
  client._sdkVersion += ("_CLI_" + __version__)
2494
3326
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2495
- model = models.RecoverMigrateJobRequest()
3327
+ model = models.CreateSubscribeRequest()
2496
3328
  model.from_json_string(json.dumps(args))
2497
3329
  start_time = time.time()
2498
3330
  while True:
2499
- rsp = client.RecoverMigrateJob(model)
3331
+ rsp = client.CreateSubscribe(model)
2500
3332
  result = rsp.to_json_string()
2501
3333
  try:
2502
3334
  json_obj = json.loads(result)
@@ -2515,7 +3347,7 @@ def doRecoverMigrateJob(args, parsed_globals):
2515
3347
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
3348
 
2517
3349
 
2518
- def doCreateSubscribe(args, parsed_globals):
3350
+ def doRecoverSyncJob(args, parsed_globals):
2519
3351
  g_param = parse_global_arg(parsed_globals)
2520
3352
 
2521
3353
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2544,11 +3376,11 @@ def doCreateSubscribe(args, parsed_globals):
2544
3376
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2545
3377
  client._sdkVersion += ("_CLI_" + __version__)
2546
3378
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
- model = models.CreateSubscribeRequest()
3379
+ model = models.RecoverSyncJobRequest()
2548
3380
  model.from_json_string(json.dumps(args))
2549
3381
  start_time = time.time()
2550
3382
  while True:
2551
- rsp = client.CreateSubscribe(model)
3383
+ rsp = client.RecoverSyncJob(model)
2552
3384
  result = rsp.to_json_string()
2553
3385
  try:
2554
3386
  json_obj = json.loads(result)
@@ -2567,7 +3399,7 @@ def doCreateSubscribe(args, parsed_globals):
2567
3399
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2568
3400
 
2569
3401
 
2570
- def doRecoverSyncJob(args, parsed_globals):
3402
+ def doResetSubscribe(args, parsed_globals):
2571
3403
  g_param = parse_global_arg(parsed_globals)
2572
3404
 
2573
3405
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2596,11 +3428,11 @@ def doRecoverSyncJob(args, parsed_globals):
2596
3428
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2597
3429
  client._sdkVersion += ("_CLI_" + __version__)
2598
3430
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2599
- model = models.RecoverSyncJobRequest()
3431
+ model = models.ResetSubscribeRequest()
2600
3432
  model.from_json_string(json.dumps(args))
2601
3433
  start_time = time.time()
2602
3434
  while True:
2603
- rsp = client.RecoverSyncJob(model)
3435
+ rsp = client.ResetSubscribe(model)
2604
3436
  result = rsp.to_json_string()
2605
3437
  try:
2606
3438
  json_obj = json.loads(result)
@@ -2619,7 +3451,7 @@ def doRecoverSyncJob(args, parsed_globals):
2619
3451
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2620
3452
 
2621
3453
 
2622
- def doResetSubscribe(args, parsed_globals):
3454
+ def doActivateSubscribe(args, parsed_globals):
2623
3455
  g_param = parse_global_arg(parsed_globals)
2624
3456
 
2625
3457
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2648,11 +3480,11 @@ def doResetSubscribe(args, parsed_globals):
2648
3480
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2649
3481
  client._sdkVersion += ("_CLI_" + __version__)
2650
3482
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2651
- model = models.ResetSubscribeRequest()
3483
+ model = models.ActivateSubscribeRequest()
2652
3484
  model.from_json_string(json.dumps(args))
2653
3485
  start_time = time.time()
2654
3486
  while True:
2655
- rsp = client.ResetSubscribe(model)
3487
+ rsp = client.ActivateSubscribe(model)
2656
3488
  result = rsp.to_json_string()
2657
3489
  try:
2658
3490
  json_obj = json.loads(result)
@@ -2671,7 +3503,7 @@ def doResetSubscribe(args, parsed_globals):
2671
3503
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2672
3504
 
2673
3505
 
2674
- def doCreateCompareTask(args, parsed_globals):
3506
+ def doModifyMigrateJobSpec(args, parsed_globals):
2675
3507
  g_param = parse_global_arg(parsed_globals)
2676
3508
 
2677
3509
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2700,11 +3532,11 @@ def doCreateCompareTask(args, parsed_globals):
2700
3532
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2701
3533
  client._sdkVersion += ("_CLI_" + __version__)
2702
3534
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2703
- model = models.CreateCompareTaskRequest()
3535
+ model = models.ModifyMigrateJobSpecRequest()
2704
3536
  model.from_json_string(json.dumps(args))
2705
3537
  start_time = time.time()
2706
3538
  while True:
2707
- rsp = client.CreateCompareTask(model)
3539
+ rsp = client.ModifyMigrateJobSpec(model)
2708
3540
  result = rsp.to_json_string()
2709
3541
  try:
2710
3542
  json_obj = json.loads(result)
@@ -2775,7 +3607,7 @@ def doDescribeModifyCheckSyncJobResult(args, parsed_globals):
2775
3607
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2776
3608
 
2777
3609
 
2778
- def doModifyMigrateJob(args, parsed_globals):
3610
+ def doModifySubscribeName(args, parsed_globals):
2779
3611
  g_param = parse_global_arg(parsed_globals)
2780
3612
 
2781
3613
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2804,11 +3636,11 @@ def doModifyMigrateJob(args, parsed_globals):
2804
3636
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2805
3637
  client._sdkVersion += ("_CLI_" + __version__)
2806
3638
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2807
- model = models.ModifyMigrateJobRequest()
3639
+ model = models.ModifySubscribeNameRequest()
2808
3640
  model.from_json_string(json.dumps(args))
2809
3641
  start_time = time.time()
2810
3642
  while True:
2811
- rsp = client.ModifyMigrateJob(model)
3643
+ rsp = client.ModifySubscribeName(model)
2812
3644
  result = rsp.to_json_string()
2813
3645
  try:
2814
3646
  json_obj = json.loads(result)
@@ -2827,7 +3659,7 @@ def doModifyMigrateJob(args, parsed_globals):
2827
3659
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2828
3660
 
2829
3661
 
2830
- def doDestroyMigrateJob(args, parsed_globals):
3662
+ def doModifyMigrateJob(args, parsed_globals):
2831
3663
  g_param = parse_global_arg(parsed_globals)
2832
3664
 
2833
3665
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2856,11 +3688,11 @@ def doDestroyMigrateJob(args, parsed_globals):
2856
3688
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2857
3689
  client._sdkVersion += ("_CLI_" + __version__)
2858
3690
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2859
- model = models.DestroyMigrateJobRequest()
3691
+ model = models.ModifyMigrateJobRequest()
2860
3692
  model.from_json_string(json.dumps(args))
2861
3693
  start_time = time.time()
2862
3694
  while True:
2863
- rsp = client.DestroyMigrateJob(model)
3695
+ rsp = client.ModifyMigrateJob(model)
2864
3696
  result = rsp.to_json_string()
2865
3697
  try:
2866
3698
  json_obj = json.loads(result)
@@ -2879,7 +3711,7 @@ def doDestroyMigrateJob(args, parsed_globals):
2879
3711
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2880
3712
 
2881
3713
 
2882
- def doOfflineIsolatedSubscribe(args, parsed_globals):
3714
+ def doCreateCompareTask(args, parsed_globals):
2883
3715
  g_param = parse_global_arg(parsed_globals)
2884
3716
 
2885
3717
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2908,11 +3740,11 @@ def doOfflineIsolatedSubscribe(args, parsed_globals):
2908
3740
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2909
3741
  client._sdkVersion += ("_CLI_" + __version__)
2910
3742
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2911
- model = models.OfflineIsolatedSubscribeRequest()
3743
+ model = models.CreateCompareTaskRequest()
2912
3744
  model.from_json_string(json.dumps(args))
2913
3745
  start_time = time.time()
2914
3746
  while True:
2915
- rsp = client.OfflineIsolatedSubscribe(model)
3747
+ rsp = client.CreateCompareTask(model)
2916
3748
  result = rsp.to_json_string()
2917
3749
  try:
2918
3750
  json_obj = json.loads(result)
@@ -2931,7 +3763,7 @@ def doOfflineIsolatedSubscribe(args, parsed_globals):
2931
3763
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2932
3764
 
2933
3765
 
2934
- def doDescribeMigrationDetail(args, parsed_globals):
3766
+ def doOfflineIsolatedSubscribe(args, parsed_globals):
2935
3767
  g_param = parse_global_arg(parsed_globals)
2936
3768
 
2937
3769
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2960,11 +3792,11 @@ def doDescribeMigrationDetail(args, parsed_globals):
2960
3792
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
2961
3793
  client._sdkVersion += ("_CLI_" + __version__)
2962
3794
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2963
- model = models.DescribeMigrationDetailRequest()
3795
+ model = models.OfflineIsolatedSubscribeRequest()
2964
3796
  model.from_json_string(json.dumps(args))
2965
3797
  start_time = time.time()
2966
3798
  while True:
2967
- rsp = client.DescribeMigrationDetail(model)
3799
+ rsp = client.OfflineIsolatedSubscribe(model)
2968
3800
  result = rsp.to_json_string()
2969
3801
  try:
2970
3802
  json_obj = json.loads(result)
@@ -2983,7 +3815,7 @@ def doDescribeMigrationDetail(args, parsed_globals):
2983
3815
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
3816
 
2985
3817
 
2986
- def doDescribeSubscribeConf(args, parsed_globals):
3818
+ def doDescribeMigrationDetail(args, parsed_globals):
2987
3819
  g_param = parse_global_arg(parsed_globals)
2988
3820
 
2989
3821
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3012,11 +3844,11 @@ def doDescribeSubscribeConf(args, parsed_globals):
3012
3844
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3013
3845
  client._sdkVersion += ("_CLI_" + __version__)
3014
3846
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3015
- model = models.DescribeSubscribeConfRequest()
3847
+ model = models.DescribeMigrationDetailRequest()
3016
3848
  model.from_json_string(json.dumps(args))
3017
3849
  start_time = time.time()
3018
3850
  while True:
3019
- rsp = client.DescribeSubscribeConf(model)
3851
+ rsp = client.DescribeMigrationDetail(model)
3020
3852
  result = rsp.to_json_string()
3021
3853
  try:
3022
3854
  json_obj = json.loads(result)
@@ -3035,7 +3867,7 @@ def doDescribeSubscribeConf(args, parsed_globals):
3035
3867
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3036
3868
 
3037
3869
 
3038
- def doModifySyncRateLimit(args, parsed_globals):
3870
+ def doDescribeOffsetByTime(args, parsed_globals):
3039
3871
  g_param = parse_global_arg(parsed_globals)
3040
3872
 
3041
3873
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3064,11 +3896,11 @@ def doModifySyncRateLimit(args, parsed_globals):
3064
3896
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3065
3897
  client._sdkVersion += ("_CLI_" + __version__)
3066
3898
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3067
- model = models.ModifySyncRateLimitRequest()
3899
+ model = models.DescribeOffsetByTimeRequest()
3068
3900
  model.from_json_string(json.dumps(args))
3069
3901
  start_time = time.time()
3070
3902
  while True:
3071
- rsp = client.ModifySyncRateLimit(model)
3903
+ rsp = client.DescribeOffsetByTime(model)
3072
3904
  result = rsp.to_json_string()
3073
3905
  try:
3074
3906
  json_obj = json.loads(result)
@@ -3087,7 +3919,7 @@ def doModifySyncRateLimit(args, parsed_globals):
3087
3919
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3088
3920
 
3089
3921
 
3090
- def doResumeSyncJob(args, parsed_globals):
3922
+ def doModifySyncRateLimit(args, parsed_globals):
3091
3923
  g_param = parse_global_arg(parsed_globals)
3092
3924
 
3093
3925
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3116,11 +3948,11 @@ def doResumeSyncJob(args, parsed_globals):
3116
3948
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3117
3949
  client._sdkVersion += ("_CLI_" + __version__)
3118
3950
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3119
- model = models.ResumeSyncJobRequest()
3951
+ model = models.ModifySyncRateLimitRequest()
3120
3952
  model.from_json_string(json.dumps(args))
3121
3953
  start_time = time.time()
3122
3954
  while True:
3123
- rsp = client.ResumeSyncJob(model)
3955
+ rsp = client.ModifySyncRateLimit(model)
3124
3956
  result = rsp.to_json_string()
3125
3957
  try:
3126
3958
  json_obj = json.loads(result)
@@ -3139,7 +3971,7 @@ def doResumeSyncJob(args, parsed_globals):
3139
3971
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3140
3972
 
3141
3973
 
3142
- def doDescribeMigrationCheckJob(args, parsed_globals):
3974
+ def doResumeSyncJob(args, parsed_globals):
3143
3975
  g_param = parse_global_arg(parsed_globals)
3144
3976
 
3145
3977
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3168,11 +4000,11 @@ def doDescribeMigrationCheckJob(args, parsed_globals):
3168
4000
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3169
4001
  client._sdkVersion += ("_CLI_" + __version__)
3170
4002
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3171
- model = models.DescribeMigrationCheckJobRequest()
4003
+ model = models.ResumeSyncJobRequest()
3172
4004
  model.from_json_string(json.dumps(args))
3173
4005
  start_time = time.time()
3174
4006
  while True:
3175
- rsp = client.DescribeMigrationCheckJob(model)
4007
+ rsp = client.ResumeSyncJob(model)
3176
4008
  result = rsp.to_json_string()
3177
4009
  try:
3178
4010
  json_obj = json.loads(result)
@@ -3191,7 +4023,7 @@ def doDescribeMigrationCheckJob(args, parsed_globals):
3191
4023
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3192
4024
 
3193
4025
 
3194
- def doStartMigrateJob(args, parsed_globals):
4026
+ def doDescribeMigrationCheckJob(args, parsed_globals):
3195
4027
  g_param = parse_global_arg(parsed_globals)
3196
4028
 
3197
4029
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3220,11 +4052,11 @@ def doStartMigrateJob(args, parsed_globals):
3220
4052
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3221
4053
  client._sdkVersion += ("_CLI_" + __version__)
3222
4054
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3223
- model = models.StartMigrateJobRequest()
4055
+ model = models.DescribeMigrationCheckJobRequest()
3224
4056
  model.from_json_string(json.dumps(args))
3225
4057
  start_time = time.time()
3226
4058
  while True:
3227
- rsp = client.StartMigrateJob(model)
4059
+ rsp = client.DescribeMigrationCheckJob(model)
3228
4060
  result = rsp.to_json_string()
3229
4061
  try:
3230
4062
  json_obj = json.loads(result)
@@ -3243,7 +4075,7 @@ def doStartMigrateJob(args, parsed_globals):
3243
4075
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3244
4076
 
3245
4077
 
3246
- def doModifyMigrateJobSpec(args, parsed_globals):
4078
+ def doStartMigrateJob(args, parsed_globals):
3247
4079
  g_param = parse_global_arg(parsed_globals)
3248
4080
 
3249
4081
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3272,11 +4104,11 @@ def doModifyMigrateJobSpec(args, parsed_globals):
3272
4104
  client = mod.DtsClient(cred, g_param[OptionsDefine.Region], profile)
3273
4105
  client._sdkVersion += ("_CLI_" + __version__)
3274
4106
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3275
- model = models.ModifyMigrateJobSpecRequest()
4107
+ model = models.StartMigrateJobRequest()
3276
4108
  model.from_json_string(json.dumps(args))
3277
4109
  start_time = time.time()
3278
4110
  while True:
3279
- rsp = client.ModifyMigrateJobSpec(model)
4111
+ rsp = client.StartMigrateJob(model)
3280
4112
  result = rsp.to_json_string()
3281
4113
  try:
3282
4114
  json_obj = json.loads(result)
@@ -3568,18 +4400,27 @@ MODELS_MAP = {
3568
4400
  }
3569
4401
 
3570
4402
  ACTION_MAP = {
4403
+ "ResumeSubscribe": doResumeSubscribe,
4404
+ "DestroyIsolatedSubscribe": doDestroyIsolatedSubscribe,
3571
4405
  "ModifySubscribeConsumeTime": doModifySubscribeConsumeTime,
3572
4406
  "CreateModifyCheckSyncJob": doCreateModifyCheckSyncJob,
3573
4407
  "ModifyMigrationJob": doModifyMigrationJob,
3574
4408
  "DescribeSyncJobs": doDescribeSyncJobs,
3575
4409
  "ModifyMigrateRuntimeAttribute": doModifyMigrateRuntimeAttribute,
3576
4410
  "CreateMigrationService": doCreateMigrationService,
4411
+ "DescribeSubscribeJobs": doDescribeSubscribeJobs,
3577
4412
  "ModifyMigrateRateLimit": doModifyMigrateRateLimit,
3578
4413
  "DeleteMigrateJob": doDeleteMigrateJob,
4414
+ "DescribeSubscribeReturnable": doDescribeSubscribeReturnable,
3579
4415
  "IsolateSyncJob": doIsolateSyncJob,
3580
4416
  "StopCompare": doStopCompare,
3581
4417
  "CreateSyncJob": doCreateSyncJob,
4418
+ "ConfigureSubscribeJob": doConfigureSubscribeJob,
4419
+ "DescribeConsumerGroups": doDescribeConsumerGroups,
4420
+ "CreateConsumerGroup": doCreateConsumerGroup,
4421
+ "ResetConsumerGroupOffset": doResetConsumerGroupOffset,
3582
4422
  "DeleteCompareTask": doDeleteCompareTask,
4423
+ "StartSubscribe": doStartSubscribe,
3583
4424
  "StartSyncJob": doStartSyncJob,
3584
4425
  "CreateCheckSyncJob": doCreateCheckSyncJob,
3585
4426
  "DescribeCompareReport": doDescribeCompareReport,
@@ -3590,6 +4431,7 @@ ACTION_MAP = {
3590
4431
  "ModifySubscribeObjects": doModifySubscribeObjects,
3591
4432
  "ConfigureSyncJob": doConfigureSyncJob,
3592
4433
  "IsolateSubscribe": doIsolateSubscribe,
4434
+ "DestroyMigrateJob": doDestroyMigrateJob,
3593
4435
  "ResizeSyncJob": doResizeSyncJob,
3594
4436
  "ModifySubscribeAutoRenewFlag": doModifySubscribeAutoRenewFlag,
3595
4437
  "ModifySyncJobConfig": doModifySyncJobConfig,
@@ -3600,37 +4442,43 @@ ACTION_MAP = {
3600
4442
  "StartModifySyncJob": doStartModifySyncJob,
3601
4443
  "DescribeSubscribes": doDescribeSubscribes,
3602
4444
  "StartCompare": doStartCompare,
3603
- "ModifySubscribeName": doModifySubscribeName,
4445
+ "DescribeSubscribeCheckJob": doDescribeSubscribeCheckJob,
3604
4446
  "ContinueSyncJob": doContinueSyncJob,
3605
4447
  "StopSyncJob": doStopSyncJob,
3606
- "ActivateSubscribe": doActivateSubscribe,
4448
+ "ModifyConsumerGroupDescription": doModifyConsumerGroupDescription,
3607
4449
  "DescribeMigrateDBInstances": doDescribeMigrateDBInstances,
3608
4450
  "SkipCheckItem": doSkipCheckItem,
4451
+ "DescribeSubscribeConf": doDescribeSubscribeConf,
4452
+ "ModifyConsumerGroupPassword": doModifyConsumerGroupPassword,
3609
4453
  "CreateMigrateJob": doCreateMigrateJob,
3610
4454
  "ModifySubscribeVipVport": doModifySubscribeVipVport,
4455
+ "CreateSubscribeCheckJob": doCreateSubscribeCheckJob,
3611
4456
  "CreateMigrateCheckJob": doCreateMigrateCheckJob,
3612
4457
  "IsolateMigrateJob": doIsolateMigrateJob,
3613
4458
  "DescribeCheckSyncJobResult": doDescribeCheckSyncJobResult,
3614
4459
  "DescribeCompareTasks": doDescribeCompareTasks,
3615
4460
  "SkipSyncCheckItem": doSkipSyncCheckItem,
3616
- "DescribeMigrateJobs": doDescribeMigrateJobs,
4461
+ "DescribeSubscribeDetail": doDescribeSubscribeDetail,
4462
+ "DeleteConsumerGroup": doDeleteConsumerGroup,
3617
4463
  "DescribeMigrationJobs": doDescribeMigrationJobs,
3618
4464
  "RecoverMigrateJob": doRecoverMigrateJob,
4465
+ "DescribeMigrateJobs": doDescribeMigrateJobs,
3619
4466
  "CreateSubscribe": doCreateSubscribe,
3620
4467
  "RecoverSyncJob": doRecoverSyncJob,
3621
4468
  "ResetSubscribe": doResetSubscribe,
3622
- "CreateCompareTask": doCreateCompareTask,
4469
+ "ActivateSubscribe": doActivateSubscribe,
4470
+ "ModifyMigrateJobSpec": doModifyMigrateJobSpec,
3623
4471
  "DescribeModifyCheckSyncJobResult": doDescribeModifyCheckSyncJobResult,
4472
+ "ModifySubscribeName": doModifySubscribeName,
3624
4473
  "ModifyMigrateJob": doModifyMigrateJob,
3625
- "DestroyMigrateJob": doDestroyMigrateJob,
4474
+ "CreateCompareTask": doCreateCompareTask,
3626
4475
  "OfflineIsolatedSubscribe": doOfflineIsolatedSubscribe,
3627
4476
  "DescribeMigrationDetail": doDescribeMigrationDetail,
3628
- "DescribeSubscribeConf": doDescribeSubscribeConf,
4477
+ "DescribeOffsetByTime": doDescribeOffsetByTime,
3629
4478
  "ModifySyncRateLimit": doModifySyncRateLimit,
3630
4479
  "ResumeSyncJob": doResumeSyncJob,
3631
4480
  "DescribeMigrationCheckJob": doDescribeMigrationCheckJob,
3632
4481
  "StartMigrateJob": doStartMigrateJob,
3633
- "ModifyMigrateJobSpec": doModifyMigrateJobSpec,
3634
4482
  "DescribeAsyncRequestInfo": doDescribeAsyncRequestInfo,
3635
4483
  "DestroySyncJob": doDestroySyncJob,
3636
4484
  "ModifyCompareTaskName": doModifyCompareTaskName,