tccli 3.0.1171.1__py2.py3-none-any.whl → 3.0.1172.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ from tencentcloud.organization.v20181225 import models as models_v20181225
19
19
  from jmespath import search
20
20
  import time
21
21
 
22
- def doDescribeOrganizationMembers(args, parsed_globals):
22
+ def doQuitOrganization(args, parsed_globals):
23
23
  g_param = parse_global_arg(parsed_globals)
24
24
 
25
25
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -48,11 +48,11 @@ def doDescribeOrganizationMembers(args, parsed_globals):
48
48
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
49
49
  client._sdkVersion += ("_CLI_" + __version__)
50
50
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
51
- model = models.DescribeOrganizationMembersRequest()
51
+ model = models.QuitOrganizationRequest()
52
52
  model.from_json_string(json.dumps(args))
53
53
  start_time = time.time()
54
54
  while True:
55
- rsp = client.DescribeOrganizationMembers(model)
55
+ rsp = client.QuitOrganization(model)
56
56
  result = rsp.to_json_string()
57
57
  try:
58
58
  json_obj = json.loads(result)
@@ -71,7 +71,7 @@ def doDescribeOrganizationMembers(args, parsed_globals):
71
71
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
72
72
 
73
73
 
74
- def doQuitOrganization(args, parsed_globals):
74
+ def doListOrganizationNodes(args, parsed_globals):
75
75
  g_param = parse_global_arg(parsed_globals)
76
76
 
77
77
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -100,11 +100,11 @@ def doQuitOrganization(args, parsed_globals):
100
100
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
101
101
  client._sdkVersion += ("_CLI_" + __version__)
102
102
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
103
- model = models.QuitOrganizationRequest()
103
+ model = models.ListOrganizationNodesRequest()
104
104
  model.from_json_string(json.dumps(args))
105
105
  start_time = time.time()
106
106
  while True:
107
- rsp = client.QuitOrganization(model)
107
+ rsp = client.ListOrganizationNodes(model)
108
108
  result = rsp.to_json_string()
109
109
  try:
110
110
  json_obj = json.loads(result)
@@ -123,7 +123,7 @@ def doQuitOrganization(args, parsed_globals):
123
123
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
124
124
 
125
125
 
126
- def doDisablePolicyType(args, parsed_globals):
126
+ def doDescribeOrganizationMemberAuthAccounts(args, parsed_globals):
127
127
  g_param = parse_global_arg(parsed_globals)
128
128
 
129
129
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -152,11 +152,11 @@ def doDisablePolicyType(args, parsed_globals):
152
152
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
153
153
  client._sdkVersion += ("_CLI_" + __version__)
154
154
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
155
- model = models.DisablePolicyTypeRequest()
155
+ model = models.DescribeOrganizationMemberAuthAccountsRequest()
156
156
  model.from_json_string(json.dumps(args))
157
157
  start_time = time.time()
158
158
  while True:
159
- rsp = client.DisablePolicyType(model)
159
+ rsp = client.DescribeOrganizationMemberAuthAccounts(model)
160
160
  result = rsp.to_json_string()
161
161
  try:
162
162
  json_obj = json.loads(result)
@@ -175,7 +175,7 @@ def doDisablePolicyType(args, parsed_globals):
175
175
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
176
176
 
177
177
 
178
- def doDescribeOrganizationMemberAuthAccounts(args, parsed_globals):
178
+ def doListGroupMembers(args, parsed_globals):
179
179
  g_param = parse_global_arg(parsed_globals)
180
180
 
181
181
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -204,11 +204,11 @@ def doDescribeOrganizationMemberAuthAccounts(args, parsed_globals):
204
204
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
205
205
  client._sdkVersion += ("_CLI_" + __version__)
206
206
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
207
- model = models.DescribeOrganizationMemberAuthAccountsRequest()
207
+ model = models.ListGroupMembersRequest()
208
208
  model.from_json_string(json.dumps(args))
209
209
  start_time = time.time()
210
210
  while True:
211
- rsp = client.DescribeOrganizationMemberAuthAccounts(model)
211
+ rsp = client.ListGroupMembers(model)
212
212
  result = rsp.to_json_string()
213
213
  try:
214
214
  json_obj = json.loads(result)
@@ -227,7 +227,7 @@ def doDescribeOrganizationMemberAuthAccounts(args, parsed_globals):
227
227
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
228
228
 
229
229
 
230
- def doGetOrganization(args, parsed_globals):
230
+ def doListOrganizationIdentity(args, parsed_globals):
231
231
  g_param = parse_global_arg(parsed_globals)
232
232
 
233
233
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -256,11 +256,11 @@ def doGetOrganization(args, parsed_globals):
256
256
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
257
257
  client._sdkVersion += ("_CLI_" + __version__)
258
258
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
259
- model = models.GetOrganizationRequest()
259
+ model = models.ListOrganizationIdentityRequest()
260
260
  model.from_json_string(json.dumps(args))
261
261
  start_time = time.time()
262
262
  while True:
263
- rsp = client.GetOrganization(model)
263
+ rsp = client.ListOrganizationIdentity(model)
264
264
  result = rsp.to_json_string()
265
265
  try:
266
266
  json_obj = json.loads(result)
@@ -279,7 +279,7 @@ def doGetOrganization(args, parsed_globals):
279
279
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
280
280
 
281
281
 
282
- def doUpdateShareUnit(args, parsed_globals):
282
+ def doAddOrganizationNode(args, parsed_globals):
283
283
  g_param = parse_global_arg(parsed_globals)
284
284
 
285
285
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -308,11 +308,11 @@ def doUpdateShareUnit(args, parsed_globals):
308
308
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
309
309
  client._sdkVersion += ("_CLI_" + __version__)
310
310
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
311
- model = models.UpdateShareUnitRequest()
311
+ model = models.AddOrganizationNodeRequest()
312
312
  model.from_json_string(json.dumps(args))
313
313
  start_time = time.time()
314
314
  while True:
315
- rsp = client.UpdateShareUnit(model)
315
+ rsp = client.AddOrganizationNode(model)
316
316
  result = rsp.to_json_string()
317
317
  try:
318
318
  json_obj = json.loads(result)
@@ -331,7 +331,7 @@ def doUpdateShareUnit(args, parsed_globals):
331
331
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
332
332
 
333
333
 
334
- def doUpdateOrganizationMember(args, parsed_globals):
334
+ def doUpdateOrganizationMemberEmailBind(args, parsed_globals):
335
335
  g_param = parse_global_arg(parsed_globals)
336
336
 
337
337
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -360,11 +360,11 @@ def doUpdateOrganizationMember(args, parsed_globals):
360
360
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
361
361
  client._sdkVersion += ("_CLI_" + __version__)
362
362
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
363
- model = models.UpdateOrganizationMemberRequest()
363
+ model = models.UpdateOrganizationMemberEmailBindRequest()
364
364
  model.from_json_string(json.dumps(args))
365
365
  start_time = time.time()
366
366
  while True:
367
- rsp = client.UpdateOrganizationMember(model)
367
+ rsp = client.UpdateOrganizationMemberEmailBind(model)
368
368
  result = rsp.to_json_string()
369
369
  try:
370
370
  json_obj = json.loads(result)
@@ -383,7 +383,7 @@ def doUpdateOrganizationMember(args, parsed_globals):
383
383
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
384
384
 
385
385
 
386
- def doListPoliciesForTarget(args, parsed_globals):
386
+ def doRemovePermissionPolicyFromRoleConfiguration(args, parsed_globals):
387
387
  g_param = parse_global_arg(parsed_globals)
388
388
 
389
389
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -412,11 +412,11 @@ def doListPoliciesForTarget(args, parsed_globals):
412
412
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
413
413
  client._sdkVersion += ("_CLI_" + __version__)
414
414
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
415
- model = models.ListPoliciesForTargetRequest()
415
+ model = models.RemovePermissionPolicyFromRoleConfigurationRequest()
416
416
  model.from_json_string(json.dumps(args))
417
417
  start_time = time.time()
418
418
  while True:
419
- rsp = client.ListPoliciesForTarget(model)
419
+ rsp = client.RemovePermissionPolicyFromRoleConfiguration(model)
420
420
  result = rsp.to_json_string()
421
421
  try:
422
422
  json_obj = json.loads(result)
@@ -435,7 +435,7 @@ def doListPoliciesForTarget(args, parsed_globals):
435
435
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
436
436
 
437
437
 
438
- def doAcceptJoinShareUnitInvitation(args, parsed_globals):
438
+ def doUpdateUser(args, parsed_globals):
439
439
  g_param = parse_global_arg(parsed_globals)
440
440
 
441
441
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -464,11 +464,11 @@ def doAcceptJoinShareUnitInvitation(args, parsed_globals):
464
464
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
465
465
  client._sdkVersion += ("_CLI_" + __version__)
466
466
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
467
- model = models.AcceptJoinShareUnitInvitationRequest()
467
+ model = models.UpdateUserRequest()
468
468
  model.from_json_string(json.dumps(args))
469
469
  start_time = time.time()
470
470
  while True:
471
- rsp = client.AcceptJoinShareUnitInvitation(model)
471
+ rsp = client.UpdateUser(model)
472
472
  result = rsp.to_json_string()
473
473
  try:
474
474
  json_obj = json.loads(result)
@@ -487,7 +487,7 @@ def doAcceptJoinShareUnitInvitation(args, parsed_globals):
487
487
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
488
488
 
489
489
 
490
- def doDeleteOrganizationMembersPolicy(args, parsed_globals):
490
+ def doCreateOrgServiceAssign(args, parsed_globals):
491
491
  g_param = parse_global_arg(parsed_globals)
492
492
 
493
493
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -516,11 +516,11 @@ def doDeleteOrganizationMembersPolicy(args, parsed_globals):
516
516
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
517
517
  client._sdkVersion += ("_CLI_" + __version__)
518
518
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
519
- model = models.DeleteOrganizationMembersPolicyRequest()
519
+ model = models.CreateOrgServiceAssignRequest()
520
520
  model.from_json_string(json.dumps(args))
521
521
  start_time = time.time()
522
522
  while True:
523
- rsp = client.DeleteOrganizationMembersPolicy(model)
523
+ rsp = client.CreateOrgServiceAssign(model)
524
524
  result = rsp.to_json_string()
525
525
  try:
526
526
  json_obj = json.loads(result)
@@ -539,7 +539,7 @@ def doDeleteOrganizationMembersPolicy(args, parsed_globals):
539
539
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
540
540
 
541
541
 
542
- def doListOrganizationIdentity(args, parsed_globals):
542
+ def doDescribeEffectivePolicy(args, parsed_globals):
543
543
  g_param = parse_global_arg(parsed_globals)
544
544
 
545
545
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -568,11 +568,11 @@ def doListOrganizationIdentity(args, parsed_globals):
568
568
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
569
569
  client._sdkVersion += ("_CLI_" + __version__)
570
570
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
571
- model = models.ListOrganizationIdentityRequest()
571
+ model = models.DescribeEffectivePolicyRequest()
572
572
  model.from_json_string(json.dumps(args))
573
573
  start_time = time.time()
574
574
  while True:
575
- rsp = client.ListOrganizationIdentity(model)
575
+ rsp = client.DescribeEffectivePolicy(model)
576
576
  result = rsp.to_json_string()
577
577
  try:
578
578
  json_obj = json.loads(result)
@@ -591,7 +591,7 @@ def doListOrganizationIdentity(args, parsed_globals):
591
591
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
592
592
 
593
593
 
594
- def doAddOrganizationNode(args, parsed_globals):
594
+ def doGetUser(args, parsed_globals):
595
595
  g_param = parse_global_arg(parsed_globals)
596
596
 
597
597
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -620,11 +620,11 @@ def doAddOrganizationNode(args, parsed_globals):
620
620
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
621
621
  client._sdkVersion += ("_CLI_" + __version__)
622
622
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
623
- model = models.AddOrganizationNodeRequest()
623
+ model = models.GetUserRequest()
624
624
  model.from_json_string(json.dumps(args))
625
625
  start_time = time.time()
626
626
  while True:
627
- rsp = client.AddOrganizationNode(model)
627
+ rsp = client.GetUser(model)
628
628
  result = rsp.to_json_string()
629
629
  try:
630
630
  json_obj = json.loads(result)
@@ -643,7 +643,7 @@ def doAddOrganizationNode(args, parsed_globals):
643
643
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
644
644
 
645
645
 
646
- def doUpdateOrganizationMemberEmailBind(args, parsed_globals):
646
+ def doSendOrganizationInvitation(args, parsed_globals):
647
647
  g_param = parse_global_arg(parsed_globals)
648
648
 
649
649
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -672,11 +672,11 @@ def doUpdateOrganizationMemberEmailBind(args, parsed_globals):
672
672
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
673
673
  client._sdkVersion += ("_CLI_" + __version__)
674
674
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
675
- model = models.UpdateOrganizationMemberEmailBindRequest()
675
+ model = models.SendOrganizationInvitationRequest()
676
676
  model.from_json_string(json.dumps(args))
677
677
  start_time = time.time()
678
678
  while True:
679
- rsp = client.UpdateOrganizationMemberEmailBind(model)
679
+ rsp = client.SendOrganizationInvitation(model)
680
680
  result = rsp.to_json_string()
681
681
  try:
682
682
  json_obj = json.loads(result)
@@ -695,7 +695,7 @@ def doUpdateOrganizationMemberEmailBind(args, parsed_globals):
695
695
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
696
696
 
697
697
 
698
- def doDescribeShareUnitMembers(args, parsed_globals):
698
+ def doCreateOrganizationMemberAuthIdentity(args, parsed_globals):
699
699
  g_param = parse_global_arg(parsed_globals)
700
700
 
701
701
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -724,11 +724,11 @@ def doDescribeShareUnitMembers(args, parsed_globals):
724
724
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
725
725
  client._sdkVersion += ("_CLI_" + __version__)
726
726
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
727
- model = models.DescribeShareUnitMembersRequest()
727
+ model = models.CreateOrganizationMemberAuthIdentityRequest()
728
728
  model.from_json_string(json.dumps(args))
729
729
  start_time = time.time()
730
730
  while True:
731
- rsp = client.DescribeShareUnitMembers(model)
731
+ rsp = client.CreateOrganizationMemberAuthIdentity(model)
732
732
  result = rsp.to_json_string()
733
733
  try:
734
734
  json_obj = json.loads(result)
@@ -747,7 +747,7 @@ def doDescribeShareUnitMembers(args, parsed_globals):
747
747
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
748
748
 
749
749
 
750
- def doDescribeOrganizationMemberAuthIdentities(args, parsed_globals):
750
+ def doOpenIdentityCenter(args, parsed_globals):
751
751
  g_param = parse_global_arg(parsed_globals)
752
752
 
753
753
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -776,11 +776,11 @@ def doDescribeOrganizationMemberAuthIdentities(args, parsed_globals):
776
776
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
777
777
  client._sdkVersion += ("_CLI_" + __version__)
778
778
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
779
- model = models.DescribeOrganizationMemberAuthIdentitiesRequest()
779
+ model = models.OpenIdentityCenterRequest()
780
780
  model.from_json_string(json.dumps(args))
781
781
  start_time = time.time()
782
782
  while True:
783
- rsp = client.DescribeOrganizationMemberAuthIdentities(model)
783
+ rsp = client.OpenIdentityCenter(model)
784
784
  result = rsp.to_json_string()
785
785
  try:
786
786
  json_obj = json.loads(result)
@@ -799,7 +799,7 @@ def doDescribeOrganizationMemberAuthIdentities(args, parsed_globals):
799
799
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
800
800
 
801
801
 
802
- def doDescribePolicy(args, parsed_globals):
802
+ def doDeleteUser(args, parsed_globals):
803
803
  g_param = parse_global_arg(parsed_globals)
804
804
 
805
805
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -828,11 +828,11 @@ def doDescribePolicy(args, parsed_globals):
828
828
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
829
829
  client._sdkVersion += ("_CLI_" + __version__)
830
830
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
831
- model = models.DescribePolicyRequest()
831
+ model = models.DeleteUserRequest()
832
832
  model.from_json_string(json.dumps(args))
833
833
  start_time = time.time()
834
834
  while True:
835
- rsp = client.DescribePolicy(model)
835
+ rsp = client.DeleteUser(model)
836
836
  result = rsp.to_json_string()
837
837
  try:
838
838
  json_obj = json.loads(result)
@@ -851,7 +851,7 @@ def doDescribePolicy(args, parsed_globals):
851
851
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
852
852
 
853
853
 
854
- def doUpdateOrganizationNode(args, parsed_globals):
854
+ def doGetRoleConfiguration(args, parsed_globals):
855
855
  g_param = parse_global_arg(parsed_globals)
856
856
 
857
857
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -880,11 +880,11 @@ def doUpdateOrganizationNode(args, parsed_globals):
880
880
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
881
881
  client._sdkVersion += ("_CLI_" + __version__)
882
882
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
883
- model = models.UpdateOrganizationNodeRequest()
883
+ model = models.GetRoleConfigurationRequest()
884
884
  model.from_json_string(json.dumps(args))
885
885
  start_time = time.time()
886
886
  while True:
887
- rsp = client.UpdateOrganizationNode(model)
887
+ rsp = client.GetRoleConfiguration(model)
888
888
  result = rsp.to_json_string()
889
889
  try:
890
890
  json_obj = json.loads(result)
@@ -903,7 +903,7 @@ def doUpdateOrganizationNode(args, parsed_globals):
903
903
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
904
904
 
905
905
 
906
- def doCreateOrganizationMemberAuthIdentity(args, parsed_globals):
906
+ def doDescribeShareUnitResources(args, parsed_globals):
907
907
  g_param = parse_global_arg(parsed_globals)
908
908
 
909
909
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -932,11 +932,11 @@ def doCreateOrganizationMemberAuthIdentity(args, parsed_globals):
932
932
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
933
933
  client._sdkVersion += ("_CLI_" + __version__)
934
934
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
935
- model = models.CreateOrganizationMemberAuthIdentityRequest()
935
+ model = models.DescribeShareUnitResourcesRequest()
936
936
  model.from_json_string(json.dumps(args))
937
937
  start_time = time.time()
938
938
  while True:
939
- rsp = client.CreateOrganizationMemberAuthIdentity(model)
939
+ rsp = client.DescribeShareUnitResources(model)
940
940
  result = rsp.to_json_string()
941
941
  try:
942
942
  json_obj = json.loads(result)
@@ -955,7 +955,7 @@ def doCreateOrganizationMemberAuthIdentity(args, parsed_globals):
955
955
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
956
956
 
957
957
 
958
- def doDeleteOrganizationMembers(args, parsed_globals):
958
+ def doDenyOrganizationInvitation(args, parsed_globals):
959
959
  g_param = parse_global_arg(parsed_globals)
960
960
 
961
961
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -984,11 +984,11 @@ def doDeleteOrganizationMembers(args, parsed_globals):
984
984
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
985
985
  client._sdkVersion += ("_CLI_" + __version__)
986
986
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
987
- model = models.DeleteOrganizationMembersRequest()
987
+ model = models.DenyOrganizationInvitationRequest()
988
988
  model.from_json_string(json.dumps(args))
989
989
  start_time = time.time()
990
990
  while True:
991
- rsp = client.DeleteOrganizationMembers(model)
991
+ rsp = client.DenyOrganizationInvitation(model)
992
992
  result = rsp.to_json_string()
993
993
  try:
994
994
  json_obj = json.loads(result)
@@ -1007,7 +1007,7 @@ def doDeleteOrganizationMembers(args, parsed_globals):
1007
1007
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1008
1008
 
1009
1009
 
1010
- def doUpdateOrganizationIdentity(args, parsed_globals):
1010
+ def doDescribeOrganizationMemberEmailBind(args, parsed_globals):
1011
1011
  g_param = parse_global_arg(parsed_globals)
1012
1012
 
1013
1013
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1036,11 +1036,11 @@ def doUpdateOrganizationIdentity(args, parsed_globals):
1036
1036
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1037
1037
  client._sdkVersion += ("_CLI_" + __version__)
1038
1038
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1039
- model = models.UpdateOrganizationIdentityRequest()
1039
+ model = models.DescribeOrganizationMemberEmailBindRequest()
1040
1040
  model.from_json_string(json.dumps(args))
1041
1041
  start_time = time.time()
1042
1042
  while True:
1043
- rsp = client.UpdateOrganizationIdentity(model)
1043
+ rsp = client.DescribeOrganizationMemberEmailBind(model)
1044
1044
  result = rsp.to_json_string()
1045
1045
  try:
1046
1046
  json_obj = json.loads(result)
@@ -1059,7 +1059,7 @@ def doUpdateOrganizationIdentity(args, parsed_globals):
1059
1059
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1060
1060
 
1061
1061
 
1062
- def doDescribeOrganizationFinancialByMonth(args, parsed_globals):
1062
+ def doDeleteShareUnitResources(args, parsed_globals):
1063
1063
  g_param = parse_global_arg(parsed_globals)
1064
1064
 
1065
1065
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1088,11 +1088,11 @@ def doDescribeOrganizationFinancialByMonth(args, parsed_globals):
1088
1088
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1089
1089
  client._sdkVersion += ("_CLI_" + __version__)
1090
1090
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1091
- model = models.DescribeOrganizationFinancialByMonthRequest()
1091
+ model = models.DeleteShareUnitResourcesRequest()
1092
1092
  model.from_json_string(json.dumps(args))
1093
1093
  start_time = time.time()
1094
1094
  while True:
1095
- rsp = client.DescribeOrganizationFinancialByMonth(model)
1095
+ rsp = client.DeleteShareUnitResources(model)
1096
1096
  result = rsp.to_json_string()
1097
1097
  try:
1098
1098
  json_obj = json.loads(result)
@@ -1111,7 +1111,7 @@ def doDescribeOrganizationFinancialByMonth(args, parsed_globals):
1111
1111
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1112
1112
 
1113
1113
 
1114
- def doDeleteAccount(args, parsed_globals):
1114
+ def doAcceptOrganizationInvitation(args, parsed_globals):
1115
1115
  g_param = parse_global_arg(parsed_globals)
1116
1116
 
1117
1117
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1140,11 +1140,11 @@ def doDeleteAccount(args, parsed_globals):
1140
1140
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1141
1141
  client._sdkVersion += ("_CLI_" + __version__)
1142
1142
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1143
- model = models.DeleteAccountRequest()
1143
+ model = models.AcceptOrganizationInvitationRequest()
1144
1144
  model.from_json_string(json.dumps(args))
1145
1145
  start_time = time.time()
1146
1146
  while True:
1147
- rsp = client.DeleteAccount(model)
1147
+ rsp = client.AcceptOrganizationInvitation(model)
1148
1148
  result = rsp.to_json_string()
1149
1149
  try:
1150
1150
  json_obj = json.loads(result)
@@ -1163,7 +1163,7 @@ def doDeleteAccount(args, parsed_globals):
1163
1163
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1164
1164
 
1165
1165
 
1166
- def doListOrgServiceAssignMember(args, parsed_globals):
1166
+ def doListTasks(args, parsed_globals):
1167
1167
  g_param = parse_global_arg(parsed_globals)
1168
1168
 
1169
1169
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1192,11 +1192,11 @@ def doListOrgServiceAssignMember(args, parsed_globals):
1192
1192
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1193
1193
  client._sdkVersion += ("_CLI_" + __version__)
1194
1194
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1195
- model = models.ListOrgServiceAssignMemberRequest()
1195
+ model = models.ListTasksRequest()
1196
1196
  model.from_json_string(json.dumps(args))
1197
1197
  start_time = time.time()
1198
1198
  while True:
1199
- rsp = client.ListOrgServiceAssignMember(model)
1199
+ rsp = client.ListTasks(model)
1200
1200
  result = rsp.to_json_string()
1201
1201
  try:
1202
1202
  json_obj = json.loads(result)
@@ -1215,7 +1215,7 @@ def doListOrgServiceAssignMember(args, parsed_globals):
1215
1215
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1216
1216
 
1217
1217
 
1218
- def doRejectJoinShareUnitInvitation(args, parsed_globals):
1218
+ def doRemoveUserFromGroup(args, parsed_globals):
1219
1219
  g_param = parse_global_arg(parsed_globals)
1220
1220
 
1221
1221
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1244,11 +1244,11 @@ def doRejectJoinShareUnitInvitation(args, parsed_globals):
1244
1244
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1245
1245
  client._sdkVersion += ("_CLI_" + __version__)
1246
1246
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1247
- model = models.RejectJoinShareUnitInvitationRequest()
1247
+ model = models.RemoveUserFromGroupRequest()
1248
1248
  model.from_json_string(json.dumps(args))
1249
1249
  start_time = time.time()
1250
1250
  while True:
1251
- rsp = client.RejectJoinShareUnitInvitation(model)
1251
+ rsp = client.RemoveUserFromGroup(model)
1252
1252
  result = rsp.to_json_string()
1253
1253
  try:
1254
1254
  json_obj = json.loads(result)
@@ -1267,7 +1267,7 @@ def doRejectJoinShareUnitInvitation(args, parsed_globals):
1267
1267
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1268
1268
 
1269
1269
 
1270
- def doDeleteOrganizationNodes(args, parsed_globals):
1270
+ def doDescribeOrganizationFinancialByProduct(args, parsed_globals):
1271
1271
  g_param = parse_global_arg(parsed_globals)
1272
1272
 
1273
1273
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1296,11 +1296,11 @@ def doDeleteOrganizationNodes(args, parsed_globals):
1296
1296
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1297
1297
  client._sdkVersion += ("_CLI_" + __version__)
1298
1298
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1299
- model = models.DeleteOrganizationNodesRequest()
1299
+ model = models.DescribeOrganizationFinancialByProductRequest()
1300
1300
  model.from_json_string(json.dumps(args))
1301
1301
  start_time = time.time()
1302
1302
  while True:
1303
- rsp = client.DeleteOrganizationNodes(model)
1303
+ rsp = client.DescribeOrganizationFinancialByProduct(model)
1304
1304
  result = rsp.to_json_string()
1305
1305
  try:
1306
1306
  json_obj = json.loads(result)
@@ -1319,7 +1319,7 @@ def doDeleteOrganizationNodes(args, parsed_globals):
1319
1319
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1320
1320
 
1321
1321
 
1322
- def doCreateOrgServiceAssign(args, parsed_globals):
1322
+ def doDescribeOrganizationNodes(args, parsed_globals):
1323
1323
  g_param = parse_global_arg(parsed_globals)
1324
1324
 
1325
1325
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1348,11 +1348,11 @@ def doCreateOrgServiceAssign(args, parsed_globals):
1348
1348
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1349
1349
  client._sdkVersion += ("_CLI_" + __version__)
1350
1350
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1351
- model = models.CreateOrgServiceAssignRequest()
1351
+ model = models.DescribeOrganizationNodesRequest()
1352
1352
  model.from_json_string(json.dumps(args))
1353
1353
  start_time = time.time()
1354
1354
  while True:
1355
- rsp = client.CreateOrgServiceAssign(model)
1355
+ rsp = client.DescribeOrganizationNodes(model)
1356
1356
  result = rsp.to_json_string()
1357
1357
  try:
1358
1358
  json_obj = json.loads(result)
@@ -1371,7 +1371,7 @@ def doCreateOrgServiceAssign(args, parsed_globals):
1371
1371
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1372
1372
 
1373
1373
 
1374
- def doDescribeEffectivePolicy(args, parsed_globals):
1374
+ def doCreateUser(args, parsed_globals):
1375
1375
  g_param = parse_global_arg(parsed_globals)
1376
1376
 
1377
1377
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1400,11 +1400,11 @@ def doDescribeEffectivePolicy(args, parsed_globals):
1400
1400
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1401
1401
  client._sdkVersion += ("_CLI_" + __version__)
1402
1402
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1403
- model = models.DescribeEffectivePolicyRequest()
1403
+ model = models.CreateUserRequest()
1404
1404
  model.from_json_string(json.dumps(args))
1405
1405
  start_time = time.time()
1406
1406
  while True:
1407
- rsp = client.DescribeEffectivePolicy(model)
1407
+ rsp = client.CreateUser(model)
1408
1408
  result = rsp.to_json_string()
1409
1409
  try:
1410
1410
  json_obj = json.loads(result)
@@ -1423,7 +1423,7 @@ def doDescribeEffectivePolicy(args, parsed_globals):
1423
1423
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1424
1424
 
1425
1425
 
1426
- def doDeleteShareUnitResources(args, parsed_globals):
1426
+ def doListExternalSAMLIdPCertificates(args, parsed_globals):
1427
1427
  g_param = parse_global_arg(parsed_globals)
1428
1428
 
1429
1429
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1452,11 +1452,11 @@ def doDeleteShareUnitResources(args, parsed_globals):
1452
1452
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1453
1453
  client._sdkVersion += ("_CLI_" + __version__)
1454
1454
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1455
- model = models.DeleteShareUnitResourcesRequest()
1455
+ model = models.ListExternalSAMLIdPCertificatesRequest()
1456
1456
  model.from_json_string(json.dumps(args))
1457
1457
  start_time = time.time()
1458
1458
  while True:
1459
- rsp = client.DeleteShareUnitResources(model)
1459
+ rsp = client.ListExternalSAMLIdPCertificates(model)
1460
1460
  result = rsp.to_json_string()
1461
1461
  try:
1462
1462
  json_obj = json.loads(result)
@@ -1475,7 +1475,7 @@ def doDeleteShareUnitResources(args, parsed_globals):
1475
1475
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1476
1476
 
1477
1477
 
1478
- def doDescribeShareUnits(args, parsed_globals):
1478
+ def doRemoveExternalSAMLIdPCertificate(args, parsed_globals):
1479
1479
  g_param = parse_global_arg(parsed_globals)
1480
1480
 
1481
1481
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1504,11 +1504,11 @@ def doDescribeShareUnits(args, parsed_globals):
1504
1504
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1505
1505
  client._sdkVersion += ("_CLI_" + __version__)
1506
1506
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1507
- model = models.DescribeShareUnitsRequest()
1507
+ model = models.RemoveExternalSAMLIdPCertificateRequest()
1508
1508
  model.from_json_string(json.dumps(args))
1509
1509
  start_time = time.time()
1510
1510
  while True:
1511
- rsp = client.DescribeShareUnits(model)
1511
+ rsp = client.RemoveExternalSAMLIdPCertificate(model)
1512
1512
  result = rsp.to_json_string()
1513
1513
  try:
1514
1514
  json_obj = json.loads(result)
@@ -1527,7 +1527,7 @@ def doDescribeShareUnits(args, parsed_globals):
1527
1527
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1528
1528
 
1529
1529
 
1530
- def doDescribeOrganizationMemberPolicies(args, parsed_globals):
1530
+ def doCheckAccountDelete(args, parsed_globals):
1531
1531
  g_param = parse_global_arg(parsed_globals)
1532
1532
 
1533
1533
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1556,11 +1556,11 @@ def doDescribeOrganizationMemberPolicies(args, parsed_globals):
1556
1556
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1557
1557
  client._sdkVersion += ("_CLI_" + __version__)
1558
1558
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1559
- model = models.DescribeOrganizationMemberPoliciesRequest()
1559
+ model = models.CheckAccountDeleteRequest()
1560
1560
  model.from_json_string(json.dumps(args))
1561
1561
  start_time = time.time()
1562
1562
  while True:
1563
- rsp = client.DescribeOrganizationMemberPolicies(model)
1563
+ rsp = client.CheckAccountDelete(model)
1564
1564
  result = rsp.to_json_string()
1565
1565
  try:
1566
1566
  json_obj = json.loads(result)
@@ -1579,7 +1579,7 @@ def doDescribeOrganizationMemberPolicies(args, parsed_globals):
1579
1579
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1580
1580
 
1581
1581
 
1582
- def doCancelOrganizationInvitation(args, parsed_globals):
1582
+ def doDescribeOrganizationMembers(args, parsed_globals):
1583
1583
  g_param = parse_global_arg(parsed_globals)
1584
1584
 
1585
1585
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1608,11 +1608,11 @@ def doCancelOrganizationInvitation(args, parsed_globals):
1608
1608
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1609
1609
  client._sdkVersion += ("_CLI_" + __version__)
1610
1610
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1611
- model = models.CancelOrganizationInvitationRequest()
1611
+ model = models.DescribeOrganizationMembersRequest()
1612
1612
  model.from_json_string(json.dumps(args))
1613
1613
  start_time = time.time()
1614
1614
  while True:
1615
- rsp = client.CancelOrganizationInvitation(model)
1615
+ rsp = client.DescribeOrganizationMembers(model)
1616
1616
  result = rsp.to_json_string()
1617
1617
  try:
1618
1618
  json_obj = json.loads(result)
@@ -1631,7 +1631,7 @@ def doCancelOrganizationInvitation(args, parsed_globals):
1631
1631
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1632
1632
 
1633
1633
 
1634
- def doDeleteOrganization(args, parsed_globals):
1634
+ def doCreateRoleAssignment(args, parsed_globals):
1635
1635
  g_param = parse_global_arg(parsed_globals)
1636
1636
 
1637
1637
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1660,11 +1660,11 @@ def doDeleteOrganization(args, parsed_globals):
1660
1660
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1661
1661
  client._sdkVersion += ("_CLI_" + __version__)
1662
1662
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1663
- model = models.DeleteOrganizationRequest()
1663
+ model = models.CreateRoleAssignmentRequest()
1664
1664
  model.from_json_string(json.dumps(args))
1665
1665
  start_time = time.time()
1666
1666
  while True:
1667
- rsp = client.DeleteOrganization(model)
1667
+ rsp = client.CreateRoleAssignment(model)
1668
1668
  result = rsp.to_json_string()
1669
1669
  try:
1670
1670
  json_obj = json.loads(result)
@@ -1683,7 +1683,7 @@ def doDeleteOrganization(args, parsed_globals):
1683
1683
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1684
1684
 
1685
1685
 
1686
- def doCancelOrganizationMemberAuthAccount(args, parsed_globals):
1686
+ def doCreateRoleConfiguration(args, parsed_globals):
1687
1687
  g_param = parse_global_arg(parsed_globals)
1688
1688
 
1689
1689
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1712,11 +1712,11 @@ def doCancelOrganizationMemberAuthAccount(args, parsed_globals):
1712
1712
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1713
1713
  client._sdkVersion += ("_CLI_" + __version__)
1714
1714
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1715
- model = models.CancelOrganizationMemberAuthAccountRequest()
1715
+ model = models.CreateRoleConfigurationRequest()
1716
1716
  model.from_json_string(json.dumps(args))
1717
1717
  start_time = time.time()
1718
1718
  while True:
1719
- rsp = client.CancelOrganizationMemberAuthAccount(model)
1719
+ rsp = client.CreateRoleConfiguration(model)
1720
1720
  result = rsp.to_json_string()
1721
1721
  try:
1722
1722
  json_obj = json.loads(result)
@@ -1735,7 +1735,7 @@ def doCancelOrganizationMemberAuthAccount(args, parsed_globals):
1735
1735
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1736
1736
 
1737
1737
 
1738
- def doSendOrganizationInvitation(args, parsed_globals):
1738
+ def doGetOrganization(args, parsed_globals):
1739
1739
  g_param = parse_global_arg(parsed_globals)
1740
1740
 
1741
1741
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1764,11 +1764,11 @@ def doSendOrganizationInvitation(args, parsed_globals):
1764
1764
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1765
1765
  client._sdkVersion += ("_CLI_" + __version__)
1766
1766
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1767
- model = models.SendOrganizationInvitationRequest()
1767
+ model = models.GetOrganizationRequest()
1768
1768
  model.from_json_string(json.dumps(args))
1769
1769
  start_time = time.time()
1770
1770
  while True:
1771
- rsp = client.SendOrganizationInvitation(model)
1771
+ rsp = client.GetOrganization(model)
1772
1772
  result = rsp.to_json_string()
1773
1773
  try:
1774
1774
  json_obj = json.loads(result)
@@ -1787,7 +1787,7 @@ def doSendOrganizationInvitation(args, parsed_globals):
1787
1787
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1788
1788
 
1789
1789
 
1790
- def doDescribeOrganizationFinancialByMember(args, parsed_globals):
1790
+ def doAcceptJoinShareUnitInvitation(args, parsed_globals):
1791
1791
  g_param = parse_global_arg(parsed_globals)
1792
1792
 
1793
1793
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1816,11 +1816,11 @@ def doDescribeOrganizationFinancialByMember(args, parsed_globals):
1816
1816
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1817
1817
  client._sdkVersion += ("_CLI_" + __version__)
1818
1818
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1819
- model = models.DescribeOrganizationFinancialByMemberRequest()
1819
+ model = models.AcceptJoinShareUnitInvitationRequest()
1820
1820
  model.from_json_string(json.dumps(args))
1821
1821
  start_time = time.time()
1822
1822
  while True:
1823
- rsp = client.DescribeOrganizationFinancialByMember(model)
1823
+ rsp = client.AcceptJoinShareUnitInvitation(model)
1824
1824
  result = rsp.to_json_string()
1825
1825
  try:
1826
1826
  json_obj = json.loads(result)
@@ -1839,7 +1839,7 @@ def doDescribeOrganizationFinancialByMember(args, parsed_globals):
1839
1839
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1840
1840
 
1841
1841
 
1842
- def doGetOrganizationMember(args, parsed_globals):
1842
+ def doListUsers(args, parsed_globals):
1843
1843
  g_param = parse_global_arg(parsed_globals)
1844
1844
 
1845
1845
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1868,11 +1868,11 @@ def doGetOrganizationMember(args, parsed_globals):
1868
1868
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1869
1869
  client._sdkVersion += ("_CLI_" + __version__)
1870
1870
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1871
- model = models.GetOrganizationMemberRequest()
1871
+ model = models.ListUsersRequest()
1872
1872
  model.from_json_string(json.dumps(args))
1873
1873
  start_time = time.time()
1874
1874
  while True:
1875
- rsp = client.GetOrganizationMember(model)
1875
+ rsp = client.ListUsers(model)
1876
1876
  result = rsp.to_json_string()
1877
1877
  try:
1878
1878
  json_obj = json.loads(result)
@@ -1891,7 +1891,7 @@ def doGetOrganizationMember(args, parsed_globals):
1891
1891
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1892
1892
 
1893
1893
 
1894
- def doAddShareUnitResources(args, parsed_globals):
1894
+ def doDescribePolicy(args, parsed_globals):
1895
1895
  g_param = parse_global_arg(parsed_globals)
1896
1896
 
1897
1897
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1920,11 +1920,11 @@ def doAddShareUnitResources(args, parsed_globals):
1920
1920
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1921
1921
  client._sdkVersion += ("_CLI_" + __version__)
1922
1922
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1923
- model = models.AddShareUnitResourcesRequest()
1923
+ model = models.DescribePolicyRequest()
1924
1924
  model.from_json_string(json.dumps(args))
1925
1925
  start_time = time.time()
1926
1926
  while True:
1927
- rsp = client.AddShareUnitResources(model)
1927
+ rsp = client.DescribePolicy(model)
1928
1928
  result = rsp.to_json_string()
1929
1929
  try:
1930
1930
  json_obj = json.loads(result)
@@ -1943,7 +1943,7 @@ def doAddShareUnitResources(args, parsed_globals):
1943
1943
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1944
1944
 
1945
1945
 
1946
- def doListNonCompliantResource(args, parsed_globals):
1946
+ def doGetExternalSAMLIdentityProvider(args, parsed_globals):
1947
1947
  g_param = parse_global_arg(parsed_globals)
1948
1948
 
1949
1949
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1972,11 +1972,11 @@ def doListNonCompliantResource(args, parsed_globals):
1972
1972
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
1973
1973
  client._sdkVersion += ("_CLI_" + __version__)
1974
1974
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1975
- model = models.ListNonCompliantResourceRequest()
1975
+ model = models.GetExternalSAMLIdentityProviderRequest()
1976
1976
  model.from_json_string(json.dumps(args))
1977
1977
  start_time = time.time()
1978
1978
  while True:
1979
- rsp = client.ListNonCompliantResource(model)
1979
+ rsp = client.GetExternalSAMLIdentityProvider(model)
1980
1980
  result = rsp.to_json_string()
1981
1981
  try:
1982
1982
  json_obj = json.loads(result)
@@ -1995,7 +1995,7 @@ def doListNonCompliantResource(args, parsed_globals):
1995
1995
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1996
1996
 
1997
1997
 
1998
- def doAttachPolicy(args, parsed_globals):
1998
+ def doClearExternalSAMLIdentityProvider(args, parsed_globals):
1999
1999
  g_param = parse_global_arg(parsed_globals)
2000
2000
 
2001
2001
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2024,11 +2024,11 @@ def doAttachPolicy(args, parsed_globals):
2024
2024
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2025
2025
  client._sdkVersion += ("_CLI_" + __version__)
2026
2026
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2027
- model = models.AttachPolicyRequest()
2027
+ model = models.ClearExternalSAMLIdentityProviderRequest()
2028
2028
  model.from_json_string(json.dumps(args))
2029
2029
  start_time = time.time()
2030
2030
  while True:
2031
- rsp = client.AttachPolicy(model)
2031
+ rsp = client.ClearExternalSAMLIdentityProvider(model)
2032
2032
  result = rsp.to_json_string()
2033
2033
  try:
2034
2034
  json_obj = json.loads(result)
@@ -2047,7 +2047,7 @@ def doAttachPolicy(args, parsed_globals):
2047
2047
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2048
2048
 
2049
2049
 
2050
- def doCreateOrganizationMembersPolicy(args, parsed_globals):
2050
+ def doUpdateOrganizationIdentity(args, parsed_globals):
2051
2051
  g_param = parse_global_arg(parsed_globals)
2052
2052
 
2053
2053
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2076,11 +2076,11 @@ def doCreateOrganizationMembersPolicy(args, parsed_globals):
2076
2076
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2077
2077
  client._sdkVersion += ("_CLI_" + __version__)
2078
2078
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2079
- model = models.CreateOrganizationMembersPolicyRequest()
2079
+ model = models.UpdateOrganizationIdentityRequest()
2080
2080
  model.from_json_string(json.dumps(args))
2081
2081
  start_time = time.time()
2082
2082
  while True:
2083
- rsp = client.CreateOrganizationMembersPolicy(model)
2083
+ rsp = client.UpdateOrganizationIdentity(model)
2084
2084
  result = rsp.to_json_string()
2085
2085
  try:
2086
2086
  json_obj = json.loads(result)
@@ -2099,7 +2099,7 @@ def doCreateOrganizationMembersPolicy(args, parsed_globals):
2099
2099
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2100
2100
 
2101
2101
 
2102
- def doDescribeShareAreas(args, parsed_globals):
2102
+ def doProvisionRoleConfiguration(args, parsed_globals):
2103
2103
  g_param = parse_global_arg(parsed_globals)
2104
2104
 
2105
2105
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2128,11 +2128,11 @@ def doDescribeShareAreas(args, parsed_globals):
2128
2128
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2129
2129
  client._sdkVersion += ("_CLI_" + __version__)
2130
2130
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2131
- model = models.DescribeShareAreasRequest()
2131
+ model = models.ProvisionRoleConfigurationRequest()
2132
2132
  model.from_json_string(json.dumps(args))
2133
2133
  start_time = time.time()
2134
2134
  while True:
2135
- rsp = client.DescribeShareAreas(model)
2135
+ rsp = client.ProvisionRoleConfiguration(model)
2136
2136
  result = rsp.to_json_string()
2137
2137
  try:
2138
2138
  json_obj = json.loads(result)
@@ -2151,7 +2151,7 @@ def doDescribeShareAreas(args, parsed_globals):
2151
2151
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2152
2152
 
2153
2153
 
2154
- def doDescribeOrganization(args, parsed_globals):
2154
+ def doCancelOrganizationMemberAuthAccount(args, parsed_globals):
2155
2155
  g_param = parse_global_arg(parsed_globals)
2156
2156
 
2157
2157
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2180,11 +2180,11 @@ def doDescribeOrganization(args, parsed_globals):
2180
2180
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2181
2181
  client._sdkVersion += ("_CLI_" + __version__)
2182
2182
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2183
- model = models.DescribeOrganizationRequest()
2183
+ model = models.CancelOrganizationMemberAuthAccountRequest()
2184
2184
  model.from_json_string(json.dumps(args))
2185
2185
  start_time = time.time()
2186
2186
  while True:
2187
- rsp = client.DescribeOrganization(model)
2187
+ rsp = client.CancelOrganizationMemberAuthAccount(model)
2188
2188
  result = rsp.to_json_string()
2189
2189
  try:
2190
2190
  json_obj = json.loads(result)
@@ -2203,7 +2203,7 @@ def doDescribeOrganization(args, parsed_globals):
2203
2203
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2204
2204
 
2205
2205
 
2206
- def doMoveOrganizationNodeMembers(args, parsed_globals):
2206
+ def doDescribeOrganizationFinancialByMember(args, parsed_globals):
2207
2207
  g_param = parse_global_arg(parsed_globals)
2208
2208
 
2209
2209
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2232,11 +2232,11 @@ def doMoveOrganizationNodeMembers(args, parsed_globals):
2232
2232
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2233
2233
  client._sdkVersion += ("_CLI_" + __version__)
2234
2234
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2235
- model = models.MoveOrganizationNodeMembersRequest()
2235
+ model = models.DescribeOrganizationFinancialByMemberRequest()
2236
2236
  model.from_json_string(json.dumps(args))
2237
2237
  start_time = time.time()
2238
2238
  while True:
2239
- rsp = client.MoveOrganizationNodeMembers(model)
2239
+ rsp = client.DescribeOrganizationFinancialByMember(model)
2240
2240
  result = rsp.to_json_string()
2241
2241
  try:
2242
2242
  json_obj = json.loads(result)
@@ -2255,7 +2255,7 @@ def doMoveOrganizationNodeMembers(args, parsed_globals):
2255
2255
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2256
2256
 
2257
2257
 
2258
- def doListOrganizationMembers(args, parsed_globals):
2258
+ def doGetGroup(args, parsed_globals):
2259
2259
  g_param = parse_global_arg(parsed_globals)
2260
2260
 
2261
2261
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2284,11 +2284,11 @@ def doListOrganizationMembers(args, parsed_globals):
2284
2284
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2285
2285
  client._sdkVersion += ("_CLI_" + __version__)
2286
2286
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2287
- model = models.ListOrganizationMembersRequest()
2287
+ model = models.GetGroupRequest()
2288
2288
  model.from_json_string(json.dumps(args))
2289
2289
  start_time = time.time()
2290
2290
  while True:
2291
- rsp = client.ListOrganizationMembers(model)
2291
+ rsp = client.GetGroup(model)
2292
2292
  result = rsp.to_json_string()
2293
2293
  try:
2294
2294
  json_obj = json.loads(result)
@@ -2307,7 +2307,7 @@ def doListOrganizationMembers(args, parsed_globals):
2307
2307
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2308
2308
 
2309
2309
 
2310
- def doDeleteOrganizationMemberFromNode(args, parsed_globals):
2310
+ def doDeleteRoleAssignment(args, parsed_globals):
2311
2311
  g_param = parse_global_arg(parsed_globals)
2312
2312
 
2313
2313
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2336,11 +2336,11 @@ def doDeleteOrganizationMemberFromNode(args, parsed_globals):
2336
2336
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2337
2337
  client._sdkVersion += ("_CLI_" + __version__)
2338
2338
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2339
- model = models.DeleteOrganizationMemberFromNodeRequest()
2339
+ model = models.DeleteRoleAssignmentRequest()
2340
2340
  model.from_json_string(json.dumps(args))
2341
2341
  start_time = time.time()
2342
2342
  while True:
2343
- rsp = client.DeleteOrganizationMemberFromNode(model)
2343
+ rsp = client.DeleteRoleAssignment(model)
2344
2344
  result = rsp.to_json_string()
2345
2345
  try:
2346
2346
  json_obj = json.loads(result)
@@ -2359,7 +2359,7 @@ def doDeleteOrganizationMemberFromNode(args, parsed_globals):
2359
2359
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2360
2360
 
2361
2361
 
2362
- def doDescribeShareUnitResources(args, parsed_globals):
2362
+ def doCreateOrganizationMembersPolicy(args, parsed_globals):
2363
2363
  g_param = parse_global_arg(parsed_globals)
2364
2364
 
2365
2365
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2388,11 +2388,11 @@ def doDescribeShareUnitResources(args, parsed_globals):
2388
2388
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2389
2389
  client._sdkVersion += ("_CLI_" + __version__)
2390
2390
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2391
- model = models.DescribeShareUnitResourcesRequest()
2391
+ model = models.CreateOrganizationMembersPolicyRequest()
2392
2392
  model.from_json_string(json.dumps(args))
2393
2393
  start_time = time.time()
2394
2394
  while True:
2395
- rsp = client.DescribeShareUnitResources(model)
2395
+ rsp = client.CreateOrganizationMembersPolicy(model)
2396
2396
  result = rsp.to_json_string()
2397
2397
  try:
2398
2398
  json_obj = json.loads(result)
@@ -2411,7 +2411,7 @@ def doDescribeShareUnitResources(args, parsed_globals):
2411
2411
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2412
2412
 
2413
2413
 
2414
- def doDetachPolicy(args, parsed_globals):
2414
+ def doMoveOrganizationNodeMembers(args, parsed_globals):
2415
2415
  g_param = parse_global_arg(parsed_globals)
2416
2416
 
2417
2417
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2440,11 +2440,11 @@ def doDetachPolicy(args, parsed_globals):
2440
2440
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2441
2441
  client._sdkVersion += ("_CLI_" + __version__)
2442
2442
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2443
- model = models.DetachPolicyRequest()
2443
+ model = models.MoveOrganizationNodeMembersRequest()
2444
2444
  model.from_json_string(json.dumps(args))
2445
2445
  start_time = time.time()
2446
2446
  while True:
2447
- rsp = client.DetachPolicy(model)
2447
+ rsp = client.MoveOrganizationNodeMembers(model)
2448
2448
  result = rsp.to_json_string()
2449
2449
  try:
2450
2450
  json_obj = json.loads(result)
@@ -2463,7 +2463,7 @@ def doDetachPolicy(args, parsed_globals):
2463
2463
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2464
2464
 
2465
2465
 
2466
- def doCreateOrganizationIdentity(args, parsed_globals):
2466
+ def doDeleteOrganizationMemberFromNode(args, parsed_globals):
2467
2467
  g_param = parse_global_arg(parsed_globals)
2468
2468
 
2469
2469
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2492,11 +2492,11 @@ def doCreateOrganizationIdentity(args, parsed_globals):
2492
2492
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2493
2493
  client._sdkVersion += ("_CLI_" + __version__)
2494
2494
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2495
- model = models.CreateOrganizationIdentityRequest()
2495
+ model = models.DeleteOrganizationMemberFromNodeRequest()
2496
2496
  model.from_json_string(json.dumps(args))
2497
2497
  start_time = time.time()
2498
2498
  while True:
2499
- rsp = client.CreateOrganizationIdentity(model)
2499
+ rsp = client.DeleteOrganizationMemberFromNode(model)
2500
2500
  result = rsp.to_json_string()
2501
2501
  try:
2502
2502
  json_obj = json.loads(result)
@@ -2515,7 +2515,7 @@ def doCreateOrganizationIdentity(args, parsed_globals):
2515
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
2516
 
2517
2517
 
2518
- def doDeleteOrgServiceAssign(args, parsed_globals):
2518
+ def doUpdateZone(args, parsed_globals):
2519
2519
  g_param = parse_global_arg(parsed_globals)
2520
2520
 
2521
2521
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2544,11 +2544,11 @@ def doDeleteOrgServiceAssign(args, parsed_globals):
2544
2544
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2545
2545
  client._sdkVersion += ("_CLI_" + __version__)
2546
2546
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
- model = models.DeleteOrgServiceAssignRequest()
2547
+ model = models.UpdateZoneRequest()
2548
2548
  model.from_json_string(json.dumps(args))
2549
2549
  start_time = time.time()
2550
2550
  while True:
2551
- rsp = client.DeleteOrgServiceAssign(model)
2551
+ rsp = client.UpdateZone(model)
2552
2552
  result = rsp.to_json_string()
2553
2553
  try:
2554
2554
  json_obj = json.loads(result)
@@ -2567,7 +2567,7 @@ def doDeleteOrgServiceAssign(args, parsed_globals):
2567
2567
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2568
2568
 
2569
2569
 
2570
- def doDeleteOrganizationIdentity(args, parsed_globals):
2570
+ def doCreateOrganizationIdentity(args, parsed_globals):
2571
2571
  g_param = parse_global_arg(parsed_globals)
2572
2572
 
2573
2573
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2596,11 +2596,11 @@ def doDeleteOrganizationIdentity(args, parsed_globals):
2596
2596
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2597
2597
  client._sdkVersion += ("_CLI_" + __version__)
2598
2598
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2599
- model = models.DeleteOrganizationIdentityRequest()
2599
+ model = models.CreateOrganizationIdentityRequest()
2600
2600
  model.from_json_string(json.dumps(args))
2601
2601
  start_time = time.time()
2602
2602
  while True:
2603
- rsp = client.DeleteOrganizationIdentity(model)
2603
+ rsp = client.CreateOrganizationIdentity(model)
2604
2604
  result = rsp.to_json_string()
2605
2605
  try:
2606
2606
  json_obj = json.loads(result)
@@ -2619,7 +2619,7 @@ def doDeleteOrganizationIdentity(args, parsed_globals):
2619
2619
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2620
2620
 
2621
2621
 
2622
- def doAcceptOrganizationInvitation(args, parsed_globals):
2622
+ def doAddOrganizationMemberEmail(args, parsed_globals):
2623
2623
  g_param = parse_global_arg(parsed_globals)
2624
2624
 
2625
2625
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2648,11 +2648,11 @@ def doAcceptOrganizationInvitation(args, parsed_globals):
2648
2648
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2649
2649
  client._sdkVersion += ("_CLI_" + __version__)
2650
2650
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2651
- model = models.AcceptOrganizationInvitationRequest()
2651
+ model = models.AddOrganizationMemberEmailRequest()
2652
2652
  model.from_json_string(json.dumps(args))
2653
2653
  start_time = time.time()
2654
2654
  while True:
2655
- rsp = client.AcceptOrganizationInvitation(model)
2655
+ rsp = client.AddOrganizationMemberEmail(model)
2656
2656
  result = rsp.to_json_string()
2657
2657
  try:
2658
2658
  json_obj = json.loads(result)
@@ -2671,7 +2671,7 @@ def doAcceptOrganizationInvitation(args, parsed_globals):
2671
2671
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2672
2672
 
2673
2673
 
2674
- def doDenyOrganizationInvitation(args, parsed_globals):
2674
+ def doListOrganizationInvitations(args, parsed_globals):
2675
2675
  g_param = parse_global_arg(parsed_globals)
2676
2676
 
2677
2677
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2700,11 +2700,11 @@ def doDenyOrganizationInvitation(args, parsed_globals):
2700
2700
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2701
2701
  client._sdkVersion += ("_CLI_" + __version__)
2702
2702
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2703
- model = models.DenyOrganizationInvitationRequest()
2703
+ model = models.ListOrganizationInvitationsRequest()
2704
2704
  model.from_json_string(json.dumps(args))
2705
2705
  start_time = time.time()
2706
2706
  while True:
2707
- rsp = client.DenyOrganizationInvitation(model)
2707
+ rsp = client.ListOrganizationInvitations(model)
2708
2708
  result = rsp.to_json_string()
2709
2709
  try:
2710
2710
  json_obj = json.loads(result)
@@ -2723,7 +2723,7 @@ def doDenyOrganizationInvitation(args, parsed_globals):
2723
2723
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2724
2724
 
2725
2725
 
2726
- def doAddOrganizationMemberEmail(args, parsed_globals):
2726
+ def doListJoinedGroupsForUser(args, parsed_globals):
2727
2727
  g_param = parse_global_arg(parsed_globals)
2728
2728
 
2729
2729
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2752,11 +2752,11 @@ def doAddOrganizationMemberEmail(args, parsed_globals):
2752
2752
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2753
2753
  client._sdkVersion += ("_CLI_" + __version__)
2754
2754
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2755
- model = models.AddOrganizationMemberEmailRequest()
2755
+ model = models.ListJoinedGroupsForUserRequest()
2756
2756
  model.from_json_string(json.dumps(args))
2757
2757
  start_time = time.time()
2758
2758
  while True:
2759
- rsp = client.AddOrganizationMemberEmail(model)
2759
+ rsp = client.ListJoinedGroupsForUser(model)
2760
2760
  result = rsp.to_json_string()
2761
2761
  try:
2762
2762
  json_obj = json.loads(result)
@@ -2775,7 +2775,7 @@ def doAddOrganizationMemberEmail(args, parsed_globals):
2775
2775
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2776
2776
 
2777
2777
 
2778
- def doDeleteShareUnitMembers(args, parsed_globals):
2778
+ def doListPermissionPoliciesInRoleConfiguration(args, parsed_globals):
2779
2779
  g_param = parse_global_arg(parsed_globals)
2780
2780
 
2781
2781
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2804,11 +2804,11 @@ def doDeleteShareUnitMembers(args, parsed_globals):
2804
2804
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2805
2805
  client._sdkVersion += ("_CLI_" + __version__)
2806
2806
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2807
- model = models.DeleteShareUnitMembersRequest()
2807
+ model = models.ListPermissionPoliciesInRoleConfigurationRequest()
2808
2808
  model.from_json_string(json.dumps(args))
2809
2809
  start_time = time.time()
2810
2810
  while True:
2811
- rsp = client.DeleteShareUnitMembers(model)
2811
+ rsp = client.ListPermissionPoliciesInRoleConfiguration(model)
2812
2812
  result = rsp.to_json_string()
2813
2813
  try:
2814
2814
  json_obj = json.loads(result)
@@ -2827,7 +2827,2503 @@ def doDeleteShareUnitMembers(args, parsed_globals):
2827
2827
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2828
2828
 
2829
2829
 
2830
- def doDescribeOrganizationMemberEmailBind(args, parsed_globals):
2830
+ def doAddShareUnit(args, parsed_globals):
2831
+ g_param = parse_global_arg(parsed_globals)
2832
+
2833
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2834
+ cred = credential.CVMRoleCredential()
2835
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2836
+ cred = credential.STSAssumeRoleCredential(
2837
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2838
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2839
+ )
2840
+ 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):
2841
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2842
+ else:
2843
+ cred = credential.Credential(
2844
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2845
+ )
2846
+ http_profile = HttpProfile(
2847
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2848
+ reqMethod="POST",
2849
+ endpoint=g_param[OptionsDefine.Endpoint],
2850
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2851
+ )
2852
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2853
+ if g_param[OptionsDefine.Language]:
2854
+ profile.language = g_param[OptionsDefine.Language]
2855
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2856
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2857
+ client._sdkVersion += ("_CLI_" + __version__)
2858
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2859
+ model = models.AddShareUnitRequest()
2860
+ model.from_json_string(json.dumps(args))
2861
+ start_time = time.time()
2862
+ while True:
2863
+ rsp = client.AddShareUnit(model)
2864
+ result = rsp.to_json_string()
2865
+ try:
2866
+ json_obj = json.loads(result)
2867
+ except TypeError as e:
2868
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2869
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2870
+ break
2871
+ cur_time = time.time()
2872
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2873
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2874
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2875
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2876
+ else:
2877
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2878
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2879
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2880
+
2881
+
2882
+ def doDescribeOrganizationAuthNode(args, parsed_globals):
2883
+ g_param = parse_global_arg(parsed_globals)
2884
+
2885
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2886
+ cred = credential.CVMRoleCredential()
2887
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2888
+ cred = credential.STSAssumeRoleCredential(
2889
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2890
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2891
+ )
2892
+ 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):
2893
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2894
+ else:
2895
+ cred = credential.Credential(
2896
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2897
+ )
2898
+ http_profile = HttpProfile(
2899
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2900
+ reqMethod="POST",
2901
+ endpoint=g_param[OptionsDefine.Endpoint],
2902
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2903
+ )
2904
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2905
+ if g_param[OptionsDefine.Language]:
2906
+ profile.language = g_param[OptionsDefine.Language]
2907
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2908
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2909
+ client._sdkVersion += ("_CLI_" + __version__)
2910
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2911
+ model = models.DescribeOrganizationAuthNodeRequest()
2912
+ model.from_json_string(json.dumps(args))
2913
+ start_time = time.time()
2914
+ while True:
2915
+ rsp = client.DescribeOrganizationAuthNode(model)
2916
+ result = rsp.to_json_string()
2917
+ try:
2918
+ json_obj = json.loads(result)
2919
+ except TypeError as e:
2920
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2921
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2922
+ break
2923
+ cur_time = time.time()
2924
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2925
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2926
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2927
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2928
+ else:
2929
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2930
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2931
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2932
+
2933
+
2934
+ def doListRoleConfigurationProvisionings(args, parsed_globals):
2935
+ g_param = parse_global_arg(parsed_globals)
2936
+
2937
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2938
+ cred = credential.CVMRoleCredential()
2939
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2940
+ cred = credential.STSAssumeRoleCredential(
2941
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2942
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2943
+ )
2944
+ 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):
2945
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2946
+ else:
2947
+ cred = credential.Credential(
2948
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2949
+ )
2950
+ http_profile = HttpProfile(
2951
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2952
+ reqMethod="POST",
2953
+ endpoint=g_param[OptionsDefine.Endpoint],
2954
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2955
+ )
2956
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2957
+ if g_param[OptionsDefine.Language]:
2958
+ profile.language = g_param[OptionsDefine.Language]
2959
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2960
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2961
+ client._sdkVersion += ("_CLI_" + __version__)
2962
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2963
+ model = models.ListRoleConfigurationProvisioningsRequest()
2964
+ model.from_json_string(json.dumps(args))
2965
+ start_time = time.time()
2966
+ while True:
2967
+ rsp = client.ListRoleConfigurationProvisionings(model)
2968
+ result = rsp.to_json_string()
2969
+ try:
2970
+ json_obj = json.loads(result)
2971
+ except TypeError as e:
2972
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2973
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2974
+ break
2975
+ cur_time = time.time()
2976
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2977
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2978
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2979
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2980
+ else:
2981
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2982
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2983
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
+
2985
+
2986
+ def doAddShareUnitMembers(args, parsed_globals):
2987
+ g_param = parse_global_arg(parsed_globals)
2988
+
2989
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2990
+ cred = credential.CVMRoleCredential()
2991
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2992
+ cred = credential.STSAssumeRoleCredential(
2993
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2994
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2995
+ )
2996
+ 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):
2997
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2998
+ else:
2999
+ cred = credential.Credential(
3000
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3001
+ )
3002
+ http_profile = HttpProfile(
3003
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3004
+ reqMethod="POST",
3005
+ endpoint=g_param[OptionsDefine.Endpoint],
3006
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3007
+ )
3008
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3009
+ if g_param[OptionsDefine.Language]:
3010
+ profile.language = g_param[OptionsDefine.Language]
3011
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3012
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3013
+ client._sdkVersion += ("_CLI_" + __version__)
3014
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3015
+ model = models.AddShareUnitMembersRequest()
3016
+ model.from_json_string(json.dumps(args))
3017
+ start_time = time.time()
3018
+ while True:
3019
+ rsp = client.AddShareUnitMembers(model)
3020
+ result = rsp.to_json_string()
3021
+ try:
3022
+ json_obj = json.loads(result)
3023
+ except TypeError as e:
3024
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3025
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3026
+ break
3027
+ cur_time = time.time()
3028
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3029
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3030
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3031
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3032
+ else:
3033
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3034
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3035
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3036
+
3037
+
3038
+ def doDescribePolicyConfig(args, parsed_globals):
3039
+ g_param = parse_global_arg(parsed_globals)
3040
+
3041
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3042
+ cred = credential.CVMRoleCredential()
3043
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3044
+ cred = credential.STSAssumeRoleCredential(
3045
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3046
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3047
+ )
3048
+ 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):
3049
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3050
+ else:
3051
+ cred = credential.Credential(
3052
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3053
+ )
3054
+ http_profile = HttpProfile(
3055
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3056
+ reqMethod="POST",
3057
+ endpoint=g_param[OptionsDefine.Endpoint],
3058
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3059
+ )
3060
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3061
+ if g_param[OptionsDefine.Language]:
3062
+ profile.language = g_param[OptionsDefine.Language]
3063
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3064
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3065
+ client._sdkVersion += ("_CLI_" + __version__)
3066
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3067
+ model = models.DescribePolicyConfigRequest()
3068
+ model.from_json_string(json.dumps(args))
3069
+ start_time = time.time()
3070
+ while True:
3071
+ rsp = client.DescribePolicyConfig(model)
3072
+ result = rsp.to_json_string()
3073
+ try:
3074
+ json_obj = json.loads(result)
3075
+ except TypeError as e:
3076
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3077
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3078
+ break
3079
+ cur_time = time.time()
3080
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3081
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3082
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3083
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3084
+ else:
3085
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3086
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3087
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3088
+
3089
+
3090
+ def doUpdatePolicy(args, parsed_globals):
3091
+ g_param = parse_global_arg(parsed_globals)
3092
+
3093
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3094
+ cred = credential.CVMRoleCredential()
3095
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3096
+ cred = credential.STSAssumeRoleCredential(
3097
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3098
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3099
+ )
3100
+ 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):
3101
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3102
+ else:
3103
+ cred = credential.Credential(
3104
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3105
+ )
3106
+ http_profile = HttpProfile(
3107
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3108
+ reqMethod="POST",
3109
+ endpoint=g_param[OptionsDefine.Endpoint],
3110
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3111
+ )
3112
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3113
+ if g_param[OptionsDefine.Language]:
3114
+ profile.language = g_param[OptionsDefine.Language]
3115
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3116
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3117
+ client._sdkVersion += ("_CLI_" + __version__)
3118
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3119
+ model = models.UpdatePolicyRequest()
3120
+ model.from_json_string(json.dumps(args))
3121
+ start_time = time.time()
3122
+ while True:
3123
+ rsp = client.UpdatePolicy(model)
3124
+ result = rsp.to_json_string()
3125
+ try:
3126
+ json_obj = json.loads(result)
3127
+ except TypeError as e:
3128
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3129
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3130
+ break
3131
+ cur_time = time.time()
3132
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3133
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3134
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3135
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3136
+ else:
3137
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3138
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3139
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3140
+
3141
+
3142
+ def doDescribeShareUnits(args, parsed_globals):
3143
+ g_param = parse_global_arg(parsed_globals)
3144
+
3145
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3146
+ cred = credential.CVMRoleCredential()
3147
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3148
+ cred = credential.STSAssumeRoleCredential(
3149
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3150
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3151
+ )
3152
+ 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):
3153
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3154
+ else:
3155
+ cred = credential.Credential(
3156
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3157
+ )
3158
+ http_profile = HttpProfile(
3159
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3160
+ reqMethod="POST",
3161
+ endpoint=g_param[OptionsDefine.Endpoint],
3162
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3163
+ )
3164
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3165
+ if g_param[OptionsDefine.Language]:
3166
+ profile.language = g_param[OptionsDefine.Language]
3167
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3168
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3169
+ client._sdkVersion += ("_CLI_" + __version__)
3170
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3171
+ model = models.DescribeShareUnitsRequest()
3172
+ model.from_json_string(json.dumps(args))
3173
+ start_time = time.time()
3174
+ while True:
3175
+ rsp = client.DescribeShareUnits(model)
3176
+ result = rsp.to_json_string()
3177
+ try:
3178
+ json_obj = json.loads(result)
3179
+ except TypeError as e:
3180
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3181
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3182
+ break
3183
+ cur_time = time.time()
3184
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3185
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3186
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3187
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3188
+ else:
3189
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3190
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3191
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3192
+
3193
+
3194
+ def doListOrganizationNodeMembers(args, parsed_globals):
3195
+ g_param = parse_global_arg(parsed_globals)
3196
+
3197
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3198
+ cred = credential.CVMRoleCredential()
3199
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3200
+ cred = credential.STSAssumeRoleCredential(
3201
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3202
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3203
+ )
3204
+ 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):
3205
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3206
+ else:
3207
+ cred = credential.Credential(
3208
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3209
+ )
3210
+ http_profile = HttpProfile(
3211
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3212
+ reqMethod="POST",
3213
+ endpoint=g_param[OptionsDefine.Endpoint],
3214
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3215
+ )
3216
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3217
+ if g_param[OptionsDefine.Language]:
3218
+ profile.language = g_param[OptionsDefine.Language]
3219
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3220
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3221
+ client._sdkVersion += ("_CLI_" + __version__)
3222
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3223
+ model = models.ListOrganizationNodeMembersRequest()
3224
+ model.from_json_string(json.dumps(args))
3225
+ start_time = time.time()
3226
+ while True:
3227
+ rsp = client.ListOrganizationNodeMembers(model)
3228
+ result = rsp.to_json_string()
3229
+ try:
3230
+ json_obj = json.loads(result)
3231
+ except TypeError as e:
3232
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3233
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3234
+ break
3235
+ cur_time = time.time()
3236
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3237
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3238
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3239
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3240
+ else:
3241
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3242
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3243
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3244
+
3245
+
3246
+ def doListUserSyncProvisionings(args, parsed_globals):
3247
+ g_param = parse_global_arg(parsed_globals)
3248
+
3249
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3250
+ cred = credential.CVMRoleCredential()
3251
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3252
+ cred = credential.STSAssumeRoleCredential(
3253
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3254
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3255
+ )
3256
+ 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):
3257
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3258
+ else:
3259
+ cred = credential.Credential(
3260
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3261
+ )
3262
+ http_profile = HttpProfile(
3263
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3264
+ reqMethod="POST",
3265
+ endpoint=g_param[OptionsDefine.Endpoint],
3266
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3267
+ )
3268
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3269
+ if g_param[OptionsDefine.Language]:
3270
+ profile.language = g_param[OptionsDefine.Language]
3271
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3272
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3273
+ client._sdkVersion += ("_CLI_" + __version__)
3274
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3275
+ model = models.ListUserSyncProvisioningsRequest()
3276
+ model.from_json_string(json.dumps(args))
3277
+ start_time = time.time()
3278
+ while True:
3279
+ rsp = client.ListUserSyncProvisionings(model)
3280
+ result = rsp.to_json_string()
3281
+ try:
3282
+ json_obj = json.loads(result)
3283
+ except TypeError as e:
3284
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3285
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3286
+ break
3287
+ cur_time = time.time()
3288
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3289
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3290
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3291
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3292
+ else:
3293
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3294
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3295
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3296
+
3297
+
3298
+ def doUpdateOrganizationNode(args, parsed_globals):
3299
+ g_param = parse_global_arg(parsed_globals)
3300
+
3301
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3302
+ cred = credential.CVMRoleCredential()
3303
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3304
+ cred = credential.STSAssumeRoleCredential(
3305
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3306
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3307
+ )
3308
+ 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):
3309
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3310
+ else:
3311
+ cred = credential.Credential(
3312
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3313
+ )
3314
+ http_profile = HttpProfile(
3315
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3316
+ reqMethod="POST",
3317
+ endpoint=g_param[OptionsDefine.Endpoint],
3318
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3319
+ )
3320
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3321
+ if g_param[OptionsDefine.Language]:
3322
+ profile.language = g_param[OptionsDefine.Language]
3323
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3324
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3325
+ client._sdkVersion += ("_CLI_" + __version__)
3326
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3327
+ model = models.UpdateOrganizationNodeRequest()
3328
+ model.from_json_string(json.dumps(args))
3329
+ start_time = time.time()
3330
+ while True:
3331
+ rsp = client.UpdateOrganizationNode(model)
3332
+ result = rsp.to_json_string()
3333
+ try:
3334
+ json_obj = json.loads(result)
3335
+ except TypeError as e:
3336
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3337
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3338
+ break
3339
+ cur_time = time.time()
3340
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3341
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3342
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3343
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3344
+ else:
3345
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3346
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3347
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3348
+
3349
+
3350
+ def doDisablePolicyType(args, parsed_globals):
3351
+ g_param = parse_global_arg(parsed_globals)
3352
+
3353
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3354
+ cred = credential.CVMRoleCredential()
3355
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3356
+ cred = credential.STSAssumeRoleCredential(
3357
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3358
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3359
+ )
3360
+ 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):
3361
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3362
+ else:
3363
+ cred = credential.Credential(
3364
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3365
+ )
3366
+ http_profile = HttpProfile(
3367
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3368
+ reqMethod="POST",
3369
+ endpoint=g_param[OptionsDefine.Endpoint],
3370
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3371
+ )
3372
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3373
+ if g_param[OptionsDefine.Language]:
3374
+ profile.language = g_param[OptionsDefine.Language]
3375
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3376
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3377
+ client._sdkVersion += ("_CLI_" + __version__)
3378
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3379
+ model = models.DisablePolicyTypeRequest()
3380
+ model.from_json_string(json.dumps(args))
3381
+ start_time = time.time()
3382
+ while True:
3383
+ rsp = client.DisablePolicyType(model)
3384
+ result = rsp.to_json_string()
3385
+ try:
3386
+ json_obj = json.loads(result)
3387
+ except TypeError as e:
3388
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3389
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3390
+ break
3391
+ cur_time = time.time()
3392
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3393
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3394
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3395
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3396
+ else:
3397
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3398
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3399
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3400
+
3401
+
3402
+ def doCreateUserSyncProvisioning(args, parsed_globals):
3403
+ g_param = parse_global_arg(parsed_globals)
3404
+
3405
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3406
+ cred = credential.CVMRoleCredential()
3407
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3408
+ cred = credential.STSAssumeRoleCredential(
3409
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3410
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3411
+ )
3412
+ 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):
3413
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3414
+ else:
3415
+ cred = credential.Credential(
3416
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3417
+ )
3418
+ http_profile = HttpProfile(
3419
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3420
+ reqMethod="POST",
3421
+ endpoint=g_param[OptionsDefine.Endpoint],
3422
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3423
+ )
3424
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3425
+ if g_param[OptionsDefine.Language]:
3426
+ profile.language = g_param[OptionsDefine.Language]
3427
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3428
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3429
+ client._sdkVersion += ("_CLI_" + __version__)
3430
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3431
+ model = models.CreateUserSyncProvisioningRequest()
3432
+ model.from_json_string(json.dumps(args))
3433
+ start_time = time.time()
3434
+ while True:
3435
+ rsp = client.CreateUserSyncProvisioning(model)
3436
+ result = rsp.to_json_string()
3437
+ try:
3438
+ json_obj = json.loads(result)
3439
+ except TypeError as e:
3440
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3441
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3442
+ break
3443
+ cur_time = time.time()
3444
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3445
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3446
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3447
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3448
+ else:
3449
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3450
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3451
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3452
+
3453
+
3454
+ def doAddPermissionPolicyToRoleConfiguration(args, parsed_globals):
3455
+ g_param = parse_global_arg(parsed_globals)
3456
+
3457
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3458
+ cred = credential.CVMRoleCredential()
3459
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3460
+ cred = credential.STSAssumeRoleCredential(
3461
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3462
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3463
+ )
3464
+ 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):
3465
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3466
+ else:
3467
+ cred = credential.Credential(
3468
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3469
+ )
3470
+ http_profile = HttpProfile(
3471
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3472
+ reqMethod="POST",
3473
+ endpoint=g_param[OptionsDefine.Endpoint],
3474
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3475
+ )
3476
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3477
+ if g_param[OptionsDefine.Language]:
3478
+ profile.language = g_param[OptionsDefine.Language]
3479
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3480
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3481
+ client._sdkVersion += ("_CLI_" + __version__)
3482
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3483
+ model = models.AddPermissionPolicyToRoleConfigurationRequest()
3484
+ model.from_json_string(json.dumps(args))
3485
+ start_time = time.time()
3486
+ while True:
3487
+ rsp = client.AddPermissionPolicyToRoleConfiguration(model)
3488
+ result = rsp.to_json_string()
3489
+ try:
3490
+ json_obj = json.loads(result)
3491
+ except TypeError as e:
3492
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3493
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3494
+ break
3495
+ cur_time = time.time()
3496
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3497
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3498
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3499
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3500
+ else:
3501
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3502
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3503
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3504
+
3505
+
3506
+ def doDeleteOrganizationMembersPolicy(args, parsed_globals):
3507
+ g_param = parse_global_arg(parsed_globals)
3508
+
3509
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3510
+ cred = credential.CVMRoleCredential()
3511
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3512
+ cred = credential.STSAssumeRoleCredential(
3513
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3514
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3515
+ )
3516
+ 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):
3517
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3518
+ else:
3519
+ cred = credential.Credential(
3520
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3521
+ )
3522
+ http_profile = HttpProfile(
3523
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3524
+ reqMethod="POST",
3525
+ endpoint=g_param[OptionsDefine.Endpoint],
3526
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3527
+ )
3528
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3529
+ if g_param[OptionsDefine.Language]:
3530
+ profile.language = g_param[OptionsDefine.Language]
3531
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3532
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3533
+ client._sdkVersion += ("_CLI_" + __version__)
3534
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3535
+ model = models.DeleteOrganizationMembersPolicyRequest()
3536
+ model.from_json_string(json.dumps(args))
3537
+ start_time = time.time()
3538
+ while True:
3539
+ rsp = client.DeleteOrganizationMembersPolicy(model)
3540
+ result = rsp.to_json_string()
3541
+ try:
3542
+ json_obj = json.loads(result)
3543
+ except TypeError as e:
3544
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3545
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3546
+ break
3547
+ cur_time = time.time()
3548
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3549
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3550
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3551
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3552
+ else:
3553
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3554
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3555
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3556
+
3557
+
3558
+ def doDeletePolicy(args, parsed_globals):
3559
+ g_param = parse_global_arg(parsed_globals)
3560
+
3561
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3562
+ cred = credential.CVMRoleCredential()
3563
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3564
+ cred = credential.STSAssumeRoleCredential(
3565
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3566
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3567
+ )
3568
+ 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):
3569
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3570
+ else:
3571
+ cred = credential.Credential(
3572
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3573
+ )
3574
+ http_profile = HttpProfile(
3575
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3576
+ reqMethod="POST",
3577
+ endpoint=g_param[OptionsDefine.Endpoint],
3578
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3579
+ )
3580
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3581
+ if g_param[OptionsDefine.Language]:
3582
+ profile.language = g_param[OptionsDefine.Language]
3583
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3584
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3585
+ client._sdkVersion += ("_CLI_" + __version__)
3586
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3587
+ model = models.DeletePolicyRequest()
3588
+ model.from_json_string(json.dumps(args))
3589
+ start_time = time.time()
3590
+ while True:
3591
+ rsp = client.DeletePolicy(model)
3592
+ result = rsp.to_json_string()
3593
+ try:
3594
+ json_obj = json.loads(result)
3595
+ except TypeError as e:
3596
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3597
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3598
+ break
3599
+ cur_time = time.time()
3600
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3601
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3602
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3603
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3604
+ else:
3605
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3606
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3607
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3608
+
3609
+
3610
+ def doCreateGroup(args, parsed_globals):
3611
+ g_param = parse_global_arg(parsed_globals)
3612
+
3613
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3614
+ cred = credential.CVMRoleCredential()
3615
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3616
+ cred = credential.STSAssumeRoleCredential(
3617
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3618
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3619
+ )
3620
+ 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):
3621
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3622
+ else:
3623
+ cred = credential.Credential(
3624
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3625
+ )
3626
+ http_profile = HttpProfile(
3627
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3628
+ reqMethod="POST",
3629
+ endpoint=g_param[OptionsDefine.Endpoint],
3630
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3631
+ )
3632
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3633
+ if g_param[OptionsDefine.Language]:
3634
+ profile.language = g_param[OptionsDefine.Language]
3635
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3636
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3637
+ client._sdkVersion += ("_CLI_" + __version__)
3638
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3639
+ model = models.CreateGroupRequest()
3640
+ model.from_json_string(json.dumps(args))
3641
+ start_time = time.time()
3642
+ while True:
3643
+ rsp = client.CreateGroup(model)
3644
+ result = rsp.to_json_string()
3645
+ try:
3646
+ json_obj = json.loads(result)
3647
+ except TypeError as e:
3648
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3649
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3650
+ break
3651
+ cur_time = time.time()
3652
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3653
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3654
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3655
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3656
+ else:
3657
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3658
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3659
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3660
+
3661
+
3662
+ def doDescribeShareUnitMembers(args, parsed_globals):
3663
+ g_param = parse_global_arg(parsed_globals)
3664
+
3665
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3666
+ cred = credential.CVMRoleCredential()
3667
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3668
+ cred = credential.STSAssumeRoleCredential(
3669
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3670
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3671
+ )
3672
+ 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):
3673
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3674
+ else:
3675
+ cred = credential.Credential(
3676
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3677
+ )
3678
+ http_profile = HttpProfile(
3679
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3680
+ reqMethod="POST",
3681
+ endpoint=g_param[OptionsDefine.Endpoint],
3682
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3683
+ )
3684
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3685
+ if g_param[OptionsDefine.Language]:
3686
+ profile.language = g_param[OptionsDefine.Language]
3687
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3688
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3689
+ client._sdkVersion += ("_CLI_" + __version__)
3690
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3691
+ model = models.DescribeShareUnitMembersRequest()
3692
+ model.from_json_string(json.dumps(args))
3693
+ start_time = time.time()
3694
+ while True:
3695
+ rsp = client.DescribeShareUnitMembers(model)
3696
+ result = rsp.to_json_string()
3697
+ try:
3698
+ json_obj = json.loads(result)
3699
+ except TypeError as e:
3700
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3701
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3702
+ break
3703
+ cur_time = time.time()
3704
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3705
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3706
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3707
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3708
+ else:
3709
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3710
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3711
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3712
+
3713
+
3714
+ def doDismantleRoleConfiguration(args, parsed_globals):
3715
+ g_param = parse_global_arg(parsed_globals)
3716
+
3717
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3718
+ cred = credential.CVMRoleCredential()
3719
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3720
+ cred = credential.STSAssumeRoleCredential(
3721
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3722
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3723
+ )
3724
+ 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):
3725
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3726
+ else:
3727
+ cred = credential.Credential(
3728
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3729
+ )
3730
+ http_profile = HttpProfile(
3731
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3732
+ reqMethod="POST",
3733
+ endpoint=g_param[OptionsDefine.Endpoint],
3734
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3735
+ )
3736
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3737
+ if g_param[OptionsDefine.Language]:
3738
+ profile.language = g_param[OptionsDefine.Language]
3739
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3740
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3741
+ client._sdkVersion += ("_CLI_" + __version__)
3742
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3743
+ model = models.DismantleRoleConfigurationRequest()
3744
+ model.from_json_string(json.dumps(args))
3745
+ start_time = time.time()
3746
+ while True:
3747
+ rsp = client.DismantleRoleConfiguration(model)
3748
+ result = rsp.to_json_string()
3749
+ try:
3750
+ json_obj = json.loads(result)
3751
+ except TypeError as e:
3752
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3753
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3754
+ break
3755
+ cur_time = time.time()
3756
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3757
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3758
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3759
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3760
+ else:
3761
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3762
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3763
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3764
+
3765
+
3766
+ def doDeleteShareUnit(args, parsed_globals):
3767
+ g_param = parse_global_arg(parsed_globals)
3768
+
3769
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3770
+ cred = credential.CVMRoleCredential()
3771
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3772
+ cred = credential.STSAssumeRoleCredential(
3773
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3774
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3775
+ )
3776
+ 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):
3777
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3778
+ else:
3779
+ cred = credential.Credential(
3780
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3781
+ )
3782
+ http_profile = HttpProfile(
3783
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3784
+ reqMethod="POST",
3785
+ endpoint=g_param[OptionsDefine.Endpoint],
3786
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3787
+ )
3788
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3789
+ if g_param[OptionsDefine.Language]:
3790
+ profile.language = g_param[OptionsDefine.Language]
3791
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3792
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3793
+ client._sdkVersion += ("_CLI_" + __version__)
3794
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3795
+ model = models.DeleteShareUnitRequest()
3796
+ model.from_json_string(json.dumps(args))
3797
+ start_time = time.time()
3798
+ while True:
3799
+ rsp = client.DeleteShareUnit(model)
3800
+ result = rsp.to_json_string()
3801
+ try:
3802
+ json_obj = json.loads(result)
3803
+ except TypeError as e:
3804
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3805
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3806
+ break
3807
+ cur_time = time.time()
3808
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3809
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3810
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3811
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3812
+ else:
3813
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3814
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3815
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3816
+
3817
+
3818
+ def doDeleteOrganizationMembers(args, parsed_globals):
3819
+ g_param = parse_global_arg(parsed_globals)
3820
+
3821
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3822
+ cred = credential.CVMRoleCredential()
3823
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3824
+ cred = credential.STSAssumeRoleCredential(
3825
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3826
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3827
+ )
3828
+ 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):
3829
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3830
+ else:
3831
+ cred = credential.Credential(
3832
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3833
+ )
3834
+ http_profile = HttpProfile(
3835
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3836
+ reqMethod="POST",
3837
+ endpoint=g_param[OptionsDefine.Endpoint],
3838
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3839
+ )
3840
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3841
+ if g_param[OptionsDefine.Language]:
3842
+ profile.language = g_param[OptionsDefine.Language]
3843
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3844
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3845
+ client._sdkVersion += ("_CLI_" + __version__)
3846
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3847
+ model = models.DeleteOrganizationMembersRequest()
3848
+ model.from_json_string(json.dumps(args))
3849
+ start_time = time.time()
3850
+ while True:
3851
+ rsp = client.DeleteOrganizationMembers(model)
3852
+ result = rsp.to_json_string()
3853
+ try:
3854
+ json_obj = json.loads(result)
3855
+ except TypeError as e:
3856
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3857
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3858
+ break
3859
+ cur_time = time.time()
3860
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3861
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3862
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3863
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3864
+ else:
3865
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3866
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3867
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3868
+
3869
+
3870
+ def doListOrgServiceAssignMember(args, parsed_globals):
3871
+ g_param = parse_global_arg(parsed_globals)
3872
+
3873
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3874
+ cred = credential.CVMRoleCredential()
3875
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3876
+ cred = credential.STSAssumeRoleCredential(
3877
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3878
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3879
+ )
3880
+ 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):
3881
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3882
+ else:
3883
+ cred = credential.Credential(
3884
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3885
+ )
3886
+ http_profile = HttpProfile(
3887
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3888
+ reqMethod="POST",
3889
+ endpoint=g_param[OptionsDefine.Endpoint],
3890
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3891
+ )
3892
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3893
+ if g_param[OptionsDefine.Language]:
3894
+ profile.language = g_param[OptionsDefine.Language]
3895
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3896
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3897
+ client._sdkVersion += ("_CLI_" + __version__)
3898
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3899
+ model = models.ListOrgServiceAssignMemberRequest()
3900
+ model.from_json_string(json.dumps(args))
3901
+ start_time = time.time()
3902
+ while True:
3903
+ rsp = client.ListOrgServiceAssignMember(model)
3904
+ result = rsp.to_json_string()
3905
+ try:
3906
+ json_obj = json.loads(result)
3907
+ except TypeError as e:
3908
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3909
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3910
+ break
3911
+ cur_time = time.time()
3912
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3913
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3914
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3915
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3916
+ else:
3917
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3918
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3919
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3920
+
3921
+
3922
+ def doRejectJoinShareUnitInvitation(args, parsed_globals):
3923
+ g_param = parse_global_arg(parsed_globals)
3924
+
3925
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3926
+ cred = credential.CVMRoleCredential()
3927
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3928
+ cred = credential.STSAssumeRoleCredential(
3929
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3930
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3931
+ )
3932
+ 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):
3933
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3934
+ else:
3935
+ cred = credential.Credential(
3936
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3937
+ )
3938
+ http_profile = HttpProfile(
3939
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3940
+ reqMethod="POST",
3941
+ endpoint=g_param[OptionsDefine.Endpoint],
3942
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3943
+ )
3944
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3945
+ if g_param[OptionsDefine.Language]:
3946
+ profile.language = g_param[OptionsDefine.Language]
3947
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3948
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3949
+ client._sdkVersion += ("_CLI_" + __version__)
3950
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3951
+ model = models.RejectJoinShareUnitInvitationRequest()
3952
+ model.from_json_string(json.dumps(args))
3953
+ start_time = time.time()
3954
+ while True:
3955
+ rsp = client.RejectJoinShareUnitInvitation(model)
3956
+ result = rsp.to_json_string()
3957
+ try:
3958
+ json_obj = json.loads(result)
3959
+ except TypeError as e:
3960
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3961
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3962
+ break
3963
+ cur_time = time.time()
3964
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3965
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3966
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3967
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3968
+ else:
3969
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3970
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3971
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3972
+
3973
+
3974
+ def doListNonCompliantResource(args, parsed_globals):
3975
+ g_param = parse_global_arg(parsed_globals)
3976
+
3977
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3978
+ cred = credential.CVMRoleCredential()
3979
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3980
+ cred = credential.STSAssumeRoleCredential(
3981
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3982
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3983
+ )
3984
+ 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):
3985
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3986
+ else:
3987
+ cred = credential.Credential(
3988
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3989
+ )
3990
+ http_profile = HttpProfile(
3991
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3992
+ reqMethod="POST",
3993
+ endpoint=g_param[OptionsDefine.Endpoint],
3994
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3995
+ )
3996
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3997
+ if g_param[OptionsDefine.Language]:
3998
+ profile.language = g_param[OptionsDefine.Language]
3999
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4000
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4001
+ client._sdkVersion += ("_CLI_" + __version__)
4002
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4003
+ model = models.ListNonCompliantResourceRequest()
4004
+ model.from_json_string(json.dumps(args))
4005
+ start_time = time.time()
4006
+ while True:
4007
+ rsp = client.ListNonCompliantResource(model)
4008
+ result = rsp.to_json_string()
4009
+ try:
4010
+ json_obj = json.loads(result)
4011
+ except TypeError as e:
4012
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4013
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4014
+ break
4015
+ cur_time = time.time()
4016
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4017
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4018
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4019
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4020
+ else:
4021
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4022
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4023
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4024
+
4025
+
4026
+ def doDeleteGroup(args, parsed_globals):
4027
+ g_param = parse_global_arg(parsed_globals)
4028
+
4029
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4030
+ cred = credential.CVMRoleCredential()
4031
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4032
+ cred = credential.STSAssumeRoleCredential(
4033
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4034
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4035
+ )
4036
+ 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):
4037
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4038
+ else:
4039
+ cred = credential.Credential(
4040
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4041
+ )
4042
+ http_profile = HttpProfile(
4043
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4044
+ reqMethod="POST",
4045
+ endpoint=g_param[OptionsDefine.Endpoint],
4046
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4047
+ )
4048
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4049
+ if g_param[OptionsDefine.Language]:
4050
+ profile.language = g_param[OptionsDefine.Language]
4051
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4052
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4053
+ client._sdkVersion += ("_CLI_" + __version__)
4054
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4055
+ model = models.DeleteGroupRequest()
4056
+ model.from_json_string(json.dumps(args))
4057
+ start_time = time.time()
4058
+ while True:
4059
+ rsp = client.DeleteGroup(model)
4060
+ result = rsp.to_json_string()
4061
+ try:
4062
+ json_obj = json.loads(result)
4063
+ except TypeError as e:
4064
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4065
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4066
+ break
4067
+ cur_time = time.time()
4068
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4069
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4070
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4071
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4072
+ else:
4073
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4074
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4075
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4076
+
4077
+
4078
+ def doSetExternalSAMLIdentityProvider(args, parsed_globals):
4079
+ g_param = parse_global_arg(parsed_globals)
4080
+
4081
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4082
+ cred = credential.CVMRoleCredential()
4083
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4084
+ cred = credential.STSAssumeRoleCredential(
4085
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4086
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4087
+ )
4088
+ 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):
4089
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4090
+ else:
4091
+ cred = credential.Credential(
4092
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4093
+ )
4094
+ http_profile = HttpProfile(
4095
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4096
+ reqMethod="POST",
4097
+ endpoint=g_param[OptionsDefine.Endpoint],
4098
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4099
+ )
4100
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4101
+ if g_param[OptionsDefine.Language]:
4102
+ profile.language = g_param[OptionsDefine.Language]
4103
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4104
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4105
+ client._sdkVersion += ("_CLI_" + __version__)
4106
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4107
+ model = models.SetExternalSAMLIdentityProviderRequest()
4108
+ model.from_json_string(json.dumps(args))
4109
+ start_time = time.time()
4110
+ while True:
4111
+ rsp = client.SetExternalSAMLIdentityProvider(model)
4112
+ result = rsp.to_json_string()
4113
+ try:
4114
+ json_obj = json.loads(result)
4115
+ except TypeError as e:
4116
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4117
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4118
+ break
4119
+ cur_time = time.time()
4120
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4121
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4122
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4123
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4124
+ else:
4125
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4126
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4127
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4128
+
4129
+
4130
+ def doDeleteOrganization(args, parsed_globals):
4131
+ g_param = parse_global_arg(parsed_globals)
4132
+
4133
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4134
+ cred = credential.CVMRoleCredential()
4135
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4136
+ cred = credential.STSAssumeRoleCredential(
4137
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4138
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4139
+ )
4140
+ 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):
4141
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4142
+ else:
4143
+ cred = credential.Credential(
4144
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4145
+ )
4146
+ http_profile = HttpProfile(
4147
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4148
+ reqMethod="POST",
4149
+ endpoint=g_param[OptionsDefine.Endpoint],
4150
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4151
+ )
4152
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4153
+ if g_param[OptionsDefine.Language]:
4154
+ profile.language = g_param[OptionsDefine.Language]
4155
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4156
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4157
+ client._sdkVersion += ("_CLI_" + __version__)
4158
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4159
+ model = models.DeleteOrganizationRequest()
4160
+ model.from_json_string(json.dumps(args))
4161
+ start_time = time.time()
4162
+ while True:
4163
+ rsp = client.DeleteOrganization(model)
4164
+ result = rsp.to_json_string()
4165
+ try:
4166
+ json_obj = json.loads(result)
4167
+ except TypeError as e:
4168
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4169
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4170
+ break
4171
+ cur_time = time.time()
4172
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4173
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4174
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4175
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4176
+ else:
4177
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4178
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4179
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4180
+
4181
+
4182
+ def doGetOrganizationMember(args, parsed_globals):
4183
+ g_param = parse_global_arg(parsed_globals)
4184
+
4185
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4186
+ cred = credential.CVMRoleCredential()
4187
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4188
+ cred = credential.STSAssumeRoleCredential(
4189
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4190
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4191
+ )
4192
+ 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):
4193
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4194
+ else:
4195
+ cred = credential.Credential(
4196
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4197
+ )
4198
+ http_profile = HttpProfile(
4199
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4200
+ reqMethod="POST",
4201
+ endpoint=g_param[OptionsDefine.Endpoint],
4202
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4203
+ )
4204
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4205
+ if g_param[OptionsDefine.Language]:
4206
+ profile.language = g_param[OptionsDefine.Language]
4207
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4208
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4209
+ client._sdkVersion += ("_CLI_" + __version__)
4210
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4211
+ model = models.GetOrganizationMemberRequest()
4212
+ model.from_json_string(json.dumps(args))
4213
+ start_time = time.time()
4214
+ while True:
4215
+ rsp = client.GetOrganizationMember(model)
4216
+ result = rsp.to_json_string()
4217
+ try:
4218
+ json_obj = json.loads(result)
4219
+ except TypeError as e:
4220
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4221
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4222
+ break
4223
+ cur_time = time.time()
4224
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4225
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4226
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4227
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4228
+ else:
4229
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4230
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4231
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4232
+
4233
+
4234
+ def doUpdateUserSyncProvisioning(args, parsed_globals):
4235
+ g_param = parse_global_arg(parsed_globals)
4236
+
4237
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4238
+ cred = credential.CVMRoleCredential()
4239
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4240
+ cred = credential.STSAssumeRoleCredential(
4241
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4242
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4243
+ )
4244
+ 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):
4245
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4246
+ else:
4247
+ cred = credential.Credential(
4248
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4249
+ )
4250
+ http_profile = HttpProfile(
4251
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4252
+ reqMethod="POST",
4253
+ endpoint=g_param[OptionsDefine.Endpoint],
4254
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4255
+ )
4256
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4257
+ if g_param[OptionsDefine.Language]:
4258
+ profile.language = g_param[OptionsDefine.Language]
4259
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4260
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4261
+ client._sdkVersion += ("_CLI_" + __version__)
4262
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4263
+ model = models.UpdateUserSyncProvisioningRequest()
4264
+ model.from_json_string(json.dumps(args))
4265
+ start_time = time.time()
4266
+ while True:
4267
+ rsp = client.UpdateUserSyncProvisioning(model)
4268
+ result = rsp.to_json_string()
4269
+ try:
4270
+ json_obj = json.loads(result)
4271
+ except TypeError as e:
4272
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4273
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4274
+ break
4275
+ cur_time = time.time()
4276
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4277
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4278
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4279
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4280
+ else:
4281
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4282
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4283
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4284
+
4285
+
4286
+ def doGetUserSyncProvisioning(args, parsed_globals):
4287
+ g_param = parse_global_arg(parsed_globals)
4288
+
4289
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4290
+ cred = credential.CVMRoleCredential()
4291
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4292
+ cred = credential.STSAssumeRoleCredential(
4293
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4294
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4295
+ )
4296
+ 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):
4297
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4298
+ else:
4299
+ cred = credential.Credential(
4300
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4301
+ )
4302
+ http_profile = HttpProfile(
4303
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4304
+ reqMethod="POST",
4305
+ endpoint=g_param[OptionsDefine.Endpoint],
4306
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4307
+ )
4308
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4309
+ if g_param[OptionsDefine.Language]:
4310
+ profile.language = g_param[OptionsDefine.Language]
4311
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4312
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4313
+ client._sdkVersion += ("_CLI_" + __version__)
4314
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4315
+ model = models.GetUserSyncProvisioningRequest()
4316
+ model.from_json_string(json.dumps(args))
4317
+ start_time = time.time()
4318
+ while True:
4319
+ rsp = client.GetUserSyncProvisioning(model)
4320
+ result = rsp.to_json_string()
4321
+ try:
4322
+ json_obj = json.loads(result)
4323
+ except TypeError as e:
4324
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4325
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4326
+ break
4327
+ cur_time = time.time()
4328
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4329
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4330
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4331
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4332
+ else:
4333
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4334
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4335
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4336
+
4337
+
4338
+ def doDescribeOrganization(args, parsed_globals):
4339
+ g_param = parse_global_arg(parsed_globals)
4340
+
4341
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4342
+ cred = credential.CVMRoleCredential()
4343
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4344
+ cred = credential.STSAssumeRoleCredential(
4345
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4346
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4347
+ )
4348
+ 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):
4349
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4350
+ else:
4351
+ cred = credential.Credential(
4352
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4353
+ )
4354
+ http_profile = HttpProfile(
4355
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4356
+ reqMethod="POST",
4357
+ endpoint=g_param[OptionsDefine.Endpoint],
4358
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4359
+ )
4360
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4361
+ if g_param[OptionsDefine.Language]:
4362
+ profile.language = g_param[OptionsDefine.Language]
4363
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4364
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4365
+ client._sdkVersion += ("_CLI_" + __version__)
4366
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4367
+ model = models.DescribeOrganizationRequest()
4368
+ model.from_json_string(json.dumps(args))
4369
+ start_time = time.time()
4370
+ while True:
4371
+ rsp = client.DescribeOrganization(model)
4372
+ result = rsp.to_json_string()
4373
+ try:
4374
+ json_obj = json.loads(result)
4375
+ except TypeError as e:
4376
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4377
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4378
+ break
4379
+ cur_time = time.time()
4380
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4381
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4382
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4383
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4384
+ else:
4385
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4386
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4387
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4388
+
4389
+
4390
+ def doListOrganizationMembers(args, parsed_globals):
4391
+ g_param = parse_global_arg(parsed_globals)
4392
+
4393
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4394
+ cred = credential.CVMRoleCredential()
4395
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4396
+ cred = credential.STSAssumeRoleCredential(
4397
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4398
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4399
+ )
4400
+ 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):
4401
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4402
+ else:
4403
+ cred = credential.Credential(
4404
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4405
+ )
4406
+ http_profile = HttpProfile(
4407
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4408
+ reqMethod="POST",
4409
+ endpoint=g_param[OptionsDefine.Endpoint],
4410
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4411
+ )
4412
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4413
+ if g_param[OptionsDefine.Language]:
4414
+ profile.language = g_param[OptionsDefine.Language]
4415
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4416
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4417
+ client._sdkVersion += ("_CLI_" + __version__)
4418
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4419
+ model = models.ListOrganizationMembersRequest()
4420
+ model.from_json_string(json.dumps(args))
4421
+ start_time = time.time()
4422
+ while True:
4423
+ rsp = client.ListOrganizationMembers(model)
4424
+ result = rsp.to_json_string()
4425
+ try:
4426
+ json_obj = json.loads(result)
4427
+ except TypeError as e:
4428
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4429
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4430
+ break
4431
+ cur_time = time.time()
4432
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4433
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4434
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4435
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4436
+ else:
4437
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4438
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4439
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4440
+
4441
+
4442
+ def doListGroups(args, parsed_globals):
4443
+ g_param = parse_global_arg(parsed_globals)
4444
+
4445
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4446
+ cred = credential.CVMRoleCredential()
4447
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4448
+ cred = credential.STSAssumeRoleCredential(
4449
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4450
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4451
+ )
4452
+ 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):
4453
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4454
+ else:
4455
+ cred = credential.Credential(
4456
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4457
+ )
4458
+ http_profile = HttpProfile(
4459
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4460
+ reqMethod="POST",
4461
+ endpoint=g_param[OptionsDefine.Endpoint],
4462
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4463
+ )
4464
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4465
+ if g_param[OptionsDefine.Language]:
4466
+ profile.language = g_param[OptionsDefine.Language]
4467
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4468
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4469
+ client._sdkVersion += ("_CLI_" + __version__)
4470
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4471
+ model = models.ListGroupsRequest()
4472
+ model.from_json_string(json.dumps(args))
4473
+ start_time = time.time()
4474
+ while True:
4475
+ rsp = client.ListGroups(model)
4476
+ result = rsp.to_json_string()
4477
+ try:
4478
+ json_obj = json.loads(result)
4479
+ except TypeError as e:
4480
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4481
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4482
+ break
4483
+ cur_time = time.time()
4484
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4485
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4486
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4487
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4488
+ else:
4489
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4490
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4491
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4492
+
4493
+
4494
+ def doCreateOrganizationMember(args, parsed_globals):
4495
+ g_param = parse_global_arg(parsed_globals)
4496
+
4497
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4498
+ cred = credential.CVMRoleCredential()
4499
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4500
+ cred = credential.STSAssumeRoleCredential(
4501
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4502
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4503
+ )
4504
+ 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):
4505
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4506
+ else:
4507
+ cred = credential.Credential(
4508
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4509
+ )
4510
+ http_profile = HttpProfile(
4511
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4512
+ reqMethod="POST",
4513
+ endpoint=g_param[OptionsDefine.Endpoint],
4514
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4515
+ )
4516
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4517
+ if g_param[OptionsDefine.Language]:
4518
+ profile.language = g_param[OptionsDefine.Language]
4519
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4520
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4521
+ client._sdkVersion += ("_CLI_" + __version__)
4522
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4523
+ model = models.CreateOrganizationMemberRequest()
4524
+ model.from_json_string(json.dumps(args))
4525
+ start_time = time.time()
4526
+ while True:
4527
+ rsp = client.CreateOrganizationMember(model)
4528
+ result = rsp.to_json_string()
4529
+ try:
4530
+ json_obj = json.loads(result)
4531
+ except TypeError as e:
4532
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4533
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4534
+ break
4535
+ cur_time = time.time()
4536
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4537
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4538
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4539
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4540
+ else:
4541
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4542
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4543
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4544
+
4545
+
4546
+ def doBindOrganizationMemberAuthAccount(args, parsed_globals):
4547
+ g_param = parse_global_arg(parsed_globals)
4548
+
4549
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4550
+ cred = credential.CVMRoleCredential()
4551
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4552
+ cred = credential.STSAssumeRoleCredential(
4553
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4554
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4555
+ )
4556
+ 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):
4557
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4558
+ else:
4559
+ cred = credential.Credential(
4560
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4561
+ )
4562
+ http_profile = HttpProfile(
4563
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4564
+ reqMethod="POST",
4565
+ endpoint=g_param[OptionsDefine.Endpoint],
4566
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4567
+ )
4568
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4569
+ if g_param[OptionsDefine.Language]:
4570
+ profile.language = g_param[OptionsDefine.Language]
4571
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4572
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4573
+ client._sdkVersion += ("_CLI_" + __version__)
4574
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4575
+ model = models.BindOrganizationMemberAuthAccountRequest()
4576
+ model.from_json_string(json.dumps(args))
4577
+ start_time = time.time()
4578
+ while True:
4579
+ rsp = client.BindOrganizationMemberAuthAccount(model)
4580
+ result = rsp.to_json_string()
4581
+ try:
4582
+ json_obj = json.loads(result)
4583
+ except TypeError as e:
4584
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4585
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4586
+ break
4587
+ cur_time = time.time()
4588
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4589
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4590
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4591
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4592
+ else:
4593
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4594
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4595
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4596
+
4597
+
4598
+ def doUpdateGroup(args, parsed_globals):
4599
+ g_param = parse_global_arg(parsed_globals)
4600
+
4601
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4602
+ cred = credential.CVMRoleCredential()
4603
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4604
+ cred = credential.STSAssumeRoleCredential(
4605
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4606
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4607
+ )
4608
+ 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):
4609
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4610
+ else:
4611
+ cred = credential.Credential(
4612
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4613
+ )
4614
+ http_profile = HttpProfile(
4615
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4616
+ reqMethod="POST",
4617
+ endpoint=g_param[OptionsDefine.Endpoint],
4618
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4619
+ )
4620
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4621
+ if g_param[OptionsDefine.Language]:
4622
+ profile.language = g_param[OptionsDefine.Language]
4623
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4624
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4625
+ client._sdkVersion += ("_CLI_" + __version__)
4626
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4627
+ model = models.UpdateGroupRequest()
4628
+ model.from_json_string(json.dumps(args))
4629
+ start_time = time.time()
4630
+ while True:
4631
+ rsp = client.UpdateGroup(model)
4632
+ result = rsp.to_json_string()
4633
+ try:
4634
+ json_obj = json.loads(result)
4635
+ except TypeError as e:
4636
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4637
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4638
+ break
4639
+ cur_time = time.time()
4640
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4641
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4642
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4643
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4644
+ else:
4645
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4646
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4647
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4648
+
4649
+
4650
+ def doCreatePolicy(args, parsed_globals):
4651
+ g_param = parse_global_arg(parsed_globals)
4652
+
4653
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4654
+ cred = credential.CVMRoleCredential()
4655
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4656
+ cred = credential.STSAssumeRoleCredential(
4657
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4658
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4659
+ )
4660
+ 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):
4661
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4662
+ else:
4663
+ cred = credential.Credential(
4664
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4665
+ )
4666
+ http_profile = HttpProfile(
4667
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4668
+ reqMethod="POST",
4669
+ endpoint=g_param[OptionsDefine.Endpoint],
4670
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4671
+ )
4672
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4673
+ if g_param[OptionsDefine.Language]:
4674
+ profile.language = g_param[OptionsDefine.Language]
4675
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4676
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4677
+ client._sdkVersion += ("_CLI_" + __version__)
4678
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4679
+ model = models.CreatePolicyRequest()
4680
+ model.from_json_string(json.dumps(args))
4681
+ start_time = time.time()
4682
+ while True:
4683
+ rsp = client.CreatePolicy(model)
4684
+ result = rsp.to_json_string()
4685
+ try:
4686
+ json_obj = json.loads(result)
4687
+ except TypeError as e:
4688
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4689
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4690
+ break
4691
+ cur_time = time.time()
4692
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4693
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4694
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4695
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4696
+ else:
4697
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4698
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4699
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4700
+
4701
+
4702
+ def doGetProvisioningTaskStatus(args, parsed_globals):
4703
+ g_param = parse_global_arg(parsed_globals)
4704
+
4705
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4706
+ cred = credential.CVMRoleCredential()
4707
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4708
+ cred = credential.STSAssumeRoleCredential(
4709
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4710
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4711
+ )
4712
+ 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):
4713
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4714
+ else:
4715
+ cred = credential.Credential(
4716
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4717
+ )
4718
+ http_profile = HttpProfile(
4719
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4720
+ reqMethod="POST",
4721
+ endpoint=g_param[OptionsDefine.Endpoint],
4722
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4723
+ )
4724
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4725
+ if g_param[OptionsDefine.Language]:
4726
+ profile.language = g_param[OptionsDefine.Language]
4727
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4728
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4729
+ client._sdkVersion += ("_CLI_" + __version__)
4730
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4731
+ model = models.GetProvisioningTaskStatusRequest()
4732
+ model.from_json_string(json.dumps(args))
4733
+ start_time = time.time()
4734
+ while True:
4735
+ rsp = client.GetProvisioningTaskStatus(model)
4736
+ result = rsp.to_json_string()
4737
+ try:
4738
+ json_obj = json.loads(result)
4739
+ except TypeError as e:
4740
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4741
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4742
+ break
4743
+ cur_time = time.time()
4744
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4745
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4746
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4747
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4748
+ else:
4749
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4750
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4751
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4752
+
4753
+
4754
+ def doUpdateUserStatus(args, parsed_globals):
4755
+ g_param = parse_global_arg(parsed_globals)
4756
+
4757
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4758
+ cred = credential.CVMRoleCredential()
4759
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4760
+ cred = credential.STSAssumeRoleCredential(
4761
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4762
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4763
+ )
4764
+ 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):
4765
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4766
+ else:
4767
+ cred = credential.Credential(
4768
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4769
+ )
4770
+ http_profile = HttpProfile(
4771
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4772
+ reqMethod="POST",
4773
+ endpoint=g_param[OptionsDefine.Endpoint],
4774
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4775
+ )
4776
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4777
+ if g_param[OptionsDefine.Language]:
4778
+ profile.language = g_param[OptionsDefine.Language]
4779
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4780
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4781
+ client._sdkVersion += ("_CLI_" + __version__)
4782
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4783
+ model = models.UpdateUserStatusRequest()
4784
+ model.from_json_string(json.dumps(args))
4785
+ start_time = time.time()
4786
+ while True:
4787
+ rsp = client.UpdateUserStatus(model)
4788
+ result = rsp.to_json_string()
4789
+ try:
4790
+ json_obj = json.loads(result)
4791
+ except TypeError as e:
4792
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4793
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4794
+ break
4795
+ cur_time = time.time()
4796
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4797
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4798
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4799
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4800
+ else:
4801
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4802
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4803
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4804
+
4805
+
4806
+ def doUpdateShareUnit(args, parsed_globals):
4807
+ g_param = parse_global_arg(parsed_globals)
4808
+
4809
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4810
+ cred = credential.CVMRoleCredential()
4811
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4812
+ cred = credential.STSAssumeRoleCredential(
4813
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4814
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4815
+ )
4816
+ 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):
4817
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4818
+ else:
4819
+ cred = credential.Credential(
4820
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4821
+ )
4822
+ http_profile = HttpProfile(
4823
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4824
+ reqMethod="POST",
4825
+ endpoint=g_param[OptionsDefine.Endpoint],
4826
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4827
+ )
4828
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4829
+ if g_param[OptionsDefine.Language]:
4830
+ profile.language = g_param[OptionsDefine.Language]
4831
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4832
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4833
+ client._sdkVersion += ("_CLI_" + __version__)
4834
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4835
+ model = models.UpdateShareUnitRequest()
4836
+ model.from_json_string(json.dumps(args))
4837
+ start_time = time.time()
4838
+ while True:
4839
+ rsp = client.UpdateShareUnit(model)
4840
+ result = rsp.to_json_string()
4841
+ try:
4842
+ json_obj = json.loads(result)
4843
+ except TypeError as e:
4844
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4845
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4846
+ break
4847
+ cur_time = time.time()
4848
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4849
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4850
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4851
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4852
+ else:
4853
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4854
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4855
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4856
+
4857
+
4858
+ def doUpdateOrganizationMember(args, parsed_globals):
4859
+ g_param = parse_global_arg(parsed_globals)
4860
+
4861
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4862
+ cred = credential.CVMRoleCredential()
4863
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4864
+ cred = credential.STSAssumeRoleCredential(
4865
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4866
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4867
+ )
4868
+ 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):
4869
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4870
+ else:
4871
+ cred = credential.Credential(
4872
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4873
+ )
4874
+ http_profile = HttpProfile(
4875
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4876
+ reqMethod="POST",
4877
+ endpoint=g_param[OptionsDefine.Endpoint],
4878
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4879
+ )
4880
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4881
+ if g_param[OptionsDefine.Language]:
4882
+ profile.language = g_param[OptionsDefine.Language]
4883
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4884
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4885
+ client._sdkVersion += ("_CLI_" + __version__)
4886
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4887
+ model = models.UpdateOrganizationMemberRequest()
4888
+ model.from_json_string(json.dumps(args))
4889
+ start_time = time.time()
4890
+ while True:
4891
+ rsp = client.UpdateOrganizationMember(model)
4892
+ result = rsp.to_json_string()
4893
+ try:
4894
+ json_obj = json.loads(result)
4895
+ except TypeError as e:
4896
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4897
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4898
+ break
4899
+ cur_time = time.time()
4900
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4901
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4902
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4903
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4904
+ else:
4905
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4906
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4907
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4908
+
4909
+
4910
+ def doListPoliciesForTarget(args, parsed_globals):
4911
+ g_param = parse_global_arg(parsed_globals)
4912
+
4913
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4914
+ cred = credential.CVMRoleCredential()
4915
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4916
+ cred = credential.STSAssumeRoleCredential(
4917
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4918
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4919
+ )
4920
+ 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):
4921
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4922
+ else:
4923
+ cred = credential.Credential(
4924
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4925
+ )
4926
+ http_profile = HttpProfile(
4927
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4928
+ reqMethod="POST",
4929
+ endpoint=g_param[OptionsDefine.Endpoint],
4930
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4931
+ )
4932
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4933
+ if g_param[OptionsDefine.Language]:
4934
+ profile.language = g_param[OptionsDefine.Language]
4935
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4936
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4937
+ client._sdkVersion += ("_CLI_" + __version__)
4938
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4939
+ model = models.ListPoliciesForTargetRequest()
4940
+ model.from_json_string(json.dumps(args))
4941
+ start_time = time.time()
4942
+ while True:
4943
+ rsp = client.ListPoliciesForTarget(model)
4944
+ result = rsp.to_json_string()
4945
+ try:
4946
+ json_obj = json.loads(result)
4947
+ except TypeError as e:
4948
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4949
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4950
+ break
4951
+ cur_time = time.time()
4952
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4953
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4954
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4955
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4956
+ else:
4957
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4958
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4959
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4960
+
4961
+
4962
+ def doDescribeOrganizationMemberAuthIdentities(args, parsed_globals):
4963
+ g_param = parse_global_arg(parsed_globals)
4964
+
4965
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4966
+ cred = credential.CVMRoleCredential()
4967
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4968
+ cred = credential.STSAssumeRoleCredential(
4969
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4970
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4971
+ )
4972
+ 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):
4973
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4974
+ else:
4975
+ cred = credential.Credential(
4976
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4977
+ )
4978
+ http_profile = HttpProfile(
4979
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4980
+ reqMethod="POST",
4981
+ endpoint=g_param[OptionsDefine.Endpoint],
4982
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4983
+ )
4984
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4985
+ if g_param[OptionsDefine.Language]:
4986
+ profile.language = g_param[OptionsDefine.Language]
4987
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4988
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4989
+ client._sdkVersion += ("_CLI_" + __version__)
4990
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4991
+ model = models.DescribeOrganizationMemberAuthIdentitiesRequest()
4992
+ model.from_json_string(json.dumps(args))
4993
+ start_time = time.time()
4994
+ while True:
4995
+ rsp = client.DescribeOrganizationMemberAuthIdentities(model)
4996
+ result = rsp.to_json_string()
4997
+ try:
4998
+ json_obj = json.loads(result)
4999
+ except TypeError as e:
5000
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5001
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5002
+ break
5003
+ cur_time = time.time()
5004
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5005
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5006
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5007
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5008
+ else:
5009
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5010
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5011
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5012
+
5013
+
5014
+ def doDescribeIdentityCenter(args, parsed_globals):
5015
+ g_param = parse_global_arg(parsed_globals)
5016
+
5017
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5018
+ cred = credential.CVMRoleCredential()
5019
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5020
+ cred = credential.STSAssumeRoleCredential(
5021
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5022
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5023
+ )
5024
+ 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):
5025
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5026
+ else:
5027
+ cred = credential.Credential(
5028
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5029
+ )
5030
+ http_profile = HttpProfile(
5031
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5032
+ reqMethod="POST",
5033
+ endpoint=g_param[OptionsDefine.Endpoint],
5034
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5035
+ )
5036
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5037
+ if g_param[OptionsDefine.Language]:
5038
+ profile.language = g_param[OptionsDefine.Language]
5039
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5040
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5041
+ client._sdkVersion += ("_CLI_" + __version__)
5042
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5043
+ model = models.DescribeIdentityCenterRequest()
5044
+ model.from_json_string(json.dumps(args))
5045
+ start_time = time.time()
5046
+ while True:
5047
+ rsp = client.DescribeIdentityCenter(model)
5048
+ result = rsp.to_json_string()
5049
+ try:
5050
+ json_obj = json.loads(result)
5051
+ except TypeError as e:
5052
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5053
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5054
+ break
5055
+ cur_time = time.time()
5056
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5057
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5058
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5059
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5060
+ else:
5061
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5062
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5063
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5064
+
5065
+
5066
+ def doGetZoneStatistics(args, parsed_globals):
5067
+ g_param = parse_global_arg(parsed_globals)
5068
+
5069
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5070
+ cred = credential.CVMRoleCredential()
5071
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5072
+ cred = credential.STSAssumeRoleCredential(
5073
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5074
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5075
+ )
5076
+ 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):
5077
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5078
+ else:
5079
+ cred = credential.Credential(
5080
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5081
+ )
5082
+ http_profile = HttpProfile(
5083
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5084
+ reqMethod="POST",
5085
+ endpoint=g_param[OptionsDefine.Endpoint],
5086
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5087
+ )
5088
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5089
+ if g_param[OptionsDefine.Language]:
5090
+ profile.language = g_param[OptionsDefine.Language]
5091
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5092
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5093
+ client._sdkVersion += ("_CLI_" + __version__)
5094
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5095
+ model = models.GetZoneStatisticsRequest()
5096
+ model.from_json_string(json.dumps(args))
5097
+ start_time = time.time()
5098
+ while True:
5099
+ rsp = client.GetZoneStatistics(model)
5100
+ result = rsp.to_json_string()
5101
+ try:
5102
+ json_obj = json.loads(result)
5103
+ except TypeError as e:
5104
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5105
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5106
+ break
5107
+ cur_time = time.time()
5108
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5109
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5110
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5111
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5112
+ else:
5113
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5114
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5115
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5116
+
5117
+
5118
+ def doDetachPolicy(args, parsed_globals):
5119
+ g_param = parse_global_arg(parsed_globals)
5120
+
5121
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5122
+ cred = credential.CVMRoleCredential()
5123
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5124
+ cred = credential.STSAssumeRoleCredential(
5125
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5126
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5127
+ )
5128
+ 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):
5129
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5130
+ else:
5131
+ cred = credential.Credential(
5132
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5133
+ )
5134
+ http_profile = HttpProfile(
5135
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5136
+ reqMethod="POST",
5137
+ endpoint=g_param[OptionsDefine.Endpoint],
5138
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5139
+ )
5140
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5141
+ if g_param[OptionsDefine.Language]:
5142
+ profile.language = g_param[OptionsDefine.Language]
5143
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5144
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5145
+ client._sdkVersion += ("_CLI_" + __version__)
5146
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5147
+ model = models.DetachPolicyRequest()
5148
+ model.from_json_string(json.dumps(args))
5149
+ start_time = time.time()
5150
+ while True:
5151
+ rsp = client.DetachPolicy(model)
5152
+ result = rsp.to_json_string()
5153
+ try:
5154
+ json_obj = json.loads(result)
5155
+ except TypeError as e:
5156
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5157
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5158
+ break
5159
+ cur_time = time.time()
5160
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5161
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5162
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5163
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5164
+ else:
5165
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5166
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5167
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5168
+
5169
+
5170
+ def doDeleteShareUnitMembers(args, parsed_globals):
5171
+ g_param = parse_global_arg(parsed_globals)
5172
+
5173
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5174
+ cred = credential.CVMRoleCredential()
5175
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5176
+ cred = credential.STSAssumeRoleCredential(
5177
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5178
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5179
+ )
5180
+ 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):
5181
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5182
+ else:
5183
+ cred = credential.Credential(
5184
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5185
+ )
5186
+ http_profile = HttpProfile(
5187
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5188
+ reqMethod="POST",
5189
+ endpoint=g_param[OptionsDefine.Endpoint],
5190
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5191
+ )
5192
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5193
+ if g_param[OptionsDefine.Language]:
5194
+ profile.language = g_param[OptionsDefine.Language]
5195
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5196
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5197
+ client._sdkVersion += ("_CLI_" + __version__)
5198
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5199
+ model = models.DeleteShareUnitMembersRequest()
5200
+ model.from_json_string(json.dumps(args))
5201
+ start_time = time.time()
5202
+ while True:
5203
+ rsp = client.DeleteShareUnitMembers(model)
5204
+ result = rsp.to_json_string()
5205
+ try:
5206
+ json_obj = json.loads(result)
5207
+ except TypeError as e:
5208
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5209
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5210
+ break
5211
+ cur_time = time.time()
5212
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5213
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5214
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5215
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5216
+ else:
5217
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5218
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5219
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5220
+
5221
+
5222
+ def doDescribeOrganizationFinancialByMonth(args, parsed_globals):
5223
+ g_param = parse_global_arg(parsed_globals)
5224
+
5225
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5226
+ cred = credential.CVMRoleCredential()
5227
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5228
+ cred = credential.STSAssumeRoleCredential(
5229
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5230
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5231
+ )
5232
+ 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):
5233
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5234
+ else:
5235
+ cred = credential.Credential(
5236
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5237
+ )
5238
+ http_profile = HttpProfile(
5239
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5240
+ reqMethod="POST",
5241
+ endpoint=g_param[OptionsDefine.Endpoint],
5242
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5243
+ )
5244
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5245
+ if g_param[OptionsDefine.Language]:
5246
+ profile.language = g_param[OptionsDefine.Language]
5247
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5248
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5249
+ client._sdkVersion += ("_CLI_" + __version__)
5250
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5251
+ model = models.DescribeOrganizationFinancialByMonthRequest()
5252
+ model.from_json_string(json.dumps(args))
5253
+ start_time = time.time()
5254
+ while True:
5255
+ rsp = client.DescribeOrganizationFinancialByMonth(model)
5256
+ result = rsp.to_json_string()
5257
+ try:
5258
+ json_obj = json.loads(result)
5259
+ except TypeError as e:
5260
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5261
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5262
+ break
5263
+ cur_time = time.time()
5264
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5265
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5266
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5267
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5268
+ else:
5269
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5270
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5271
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5272
+
5273
+
5274
+ def doDeleteAccount(args, parsed_globals):
5275
+ g_param = parse_global_arg(parsed_globals)
5276
+
5277
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5278
+ cred = credential.CVMRoleCredential()
5279
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5280
+ cred = credential.STSAssumeRoleCredential(
5281
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5282
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5283
+ )
5284
+ 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):
5285
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5286
+ else:
5287
+ cred = credential.Credential(
5288
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5289
+ )
5290
+ http_profile = HttpProfile(
5291
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5292
+ reqMethod="POST",
5293
+ endpoint=g_param[OptionsDefine.Endpoint],
5294
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5295
+ )
5296
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5297
+ if g_param[OptionsDefine.Language]:
5298
+ profile.language = g_param[OptionsDefine.Language]
5299
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5300
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
5301
+ client._sdkVersion += ("_CLI_" + __version__)
5302
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5303
+ model = models.DeleteAccountRequest()
5304
+ model.from_json_string(json.dumps(args))
5305
+ start_time = time.time()
5306
+ while True:
5307
+ rsp = client.DeleteAccount(model)
5308
+ result = rsp.to_json_string()
5309
+ try:
5310
+ json_obj = json.loads(result)
5311
+ except TypeError as e:
5312
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5313
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5314
+ break
5315
+ cur_time = time.time()
5316
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5317
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5318
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5319
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5320
+ else:
5321
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5322
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5323
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5324
+
5325
+
5326
+ def doDeleteOrganizationNodes(args, parsed_globals):
2831
5327
  g_param = parse_global_arg(parsed_globals)
2832
5328
 
2833
5329
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2856,11 +5352,11 @@ def doDescribeOrganizationMemberEmailBind(args, parsed_globals):
2856
5352
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2857
5353
  client._sdkVersion += ("_CLI_" + __version__)
2858
5354
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2859
- model = models.DescribeOrganizationMemberEmailBindRequest()
5355
+ model = models.DeleteOrganizationNodesRequest()
2860
5356
  model.from_json_string(json.dumps(args))
2861
5357
  start_time = time.time()
2862
5358
  while True:
2863
- rsp = client.DescribeOrganizationMemberEmailBind(model)
5359
+ rsp = client.DeleteOrganizationNodes(model)
2864
5360
  result = rsp.to_json_string()
2865
5361
  try:
2866
5362
  json_obj = json.loads(result)
@@ -2879,7 +5375,7 @@ def doDescribeOrganizationMemberEmailBind(args, parsed_globals):
2879
5375
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2880
5376
 
2881
5377
 
2882
- def doEnablePolicyType(args, parsed_globals):
5378
+ def doListRoleAssignments(args, parsed_globals):
2883
5379
  g_param = parse_global_arg(parsed_globals)
2884
5380
 
2885
5381
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2908,11 +5404,11 @@ def doEnablePolicyType(args, parsed_globals):
2908
5404
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2909
5405
  client._sdkVersion += ("_CLI_" + __version__)
2910
5406
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2911
- model = models.EnablePolicyTypeRequest()
5407
+ model = models.ListRoleAssignmentsRequest()
2912
5408
  model.from_json_string(json.dumps(args))
2913
5409
  start_time = time.time()
2914
5410
  while True:
2915
- rsp = client.EnablePolicyType(model)
5411
+ rsp = client.ListRoleAssignments(model)
2916
5412
  result = rsp.to_json_string()
2917
5413
  try:
2918
5414
  json_obj = json.loads(result)
@@ -2931,7 +5427,7 @@ def doEnablePolicyType(args, parsed_globals):
2931
5427
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2932
5428
 
2933
5429
 
2934
- def doListOrganizationInvitations(args, parsed_globals):
5430
+ def doDescribeOrganizationMemberPolicies(args, parsed_globals):
2935
5431
  g_param = parse_global_arg(parsed_globals)
2936
5432
 
2937
5433
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2960,11 +5456,11 @@ def doListOrganizationInvitations(args, parsed_globals):
2960
5456
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
2961
5457
  client._sdkVersion += ("_CLI_" + __version__)
2962
5458
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2963
- model = models.ListOrganizationInvitationsRequest()
5459
+ model = models.DescribeOrganizationMemberPoliciesRequest()
2964
5460
  model.from_json_string(json.dumps(args))
2965
5461
  start_time = time.time()
2966
5462
  while True:
2967
- rsp = client.ListOrganizationInvitations(model)
5463
+ rsp = client.DescribeOrganizationMemberPolicies(model)
2968
5464
  result = rsp.to_json_string()
2969
5465
  try:
2970
5466
  json_obj = json.loads(result)
@@ -2983,7 +5479,7 @@ def doListOrganizationInvitations(args, parsed_globals):
2983
5479
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
5480
 
2985
5481
 
2986
- def doCreateOrganizationMember(args, parsed_globals):
5482
+ def doDeleteUserSyncProvisioning(args, parsed_globals):
2987
5483
  g_param = parse_global_arg(parsed_globals)
2988
5484
 
2989
5485
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3012,11 +5508,11 @@ def doCreateOrganizationMember(args, parsed_globals):
3012
5508
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3013
5509
  client._sdkVersion += ("_CLI_" + __version__)
3014
5510
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3015
- model = models.CreateOrganizationMemberRequest()
5511
+ model = models.DeleteUserSyncProvisioningRequest()
3016
5512
  model.from_json_string(json.dumps(args))
3017
5513
  start_time = time.time()
3018
5514
  while True:
3019
- rsp = client.CreateOrganizationMember(model)
5515
+ rsp = client.DeleteUserSyncProvisioning(model)
3020
5516
  result = rsp.to_json_string()
3021
5517
  try:
3022
5518
  json_obj = json.loads(result)
@@ -3035,7 +5531,7 @@ def doCreateOrganizationMember(args, parsed_globals):
3035
5531
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3036
5532
 
3037
5533
 
3038
- def doBindOrganizationMemberAuthAccount(args, parsed_globals):
5534
+ def doListRoleConfigurations(args, parsed_globals):
3039
5535
  g_param = parse_global_arg(parsed_globals)
3040
5536
 
3041
5537
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3064,11 +5560,11 @@ def doBindOrganizationMemberAuthAccount(args, parsed_globals):
3064
5560
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3065
5561
  client._sdkVersion += ("_CLI_" + __version__)
3066
5562
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3067
- model = models.BindOrganizationMemberAuthAccountRequest()
5563
+ model = models.ListRoleConfigurationsRequest()
3068
5564
  model.from_json_string(json.dumps(args))
3069
5565
  start_time = time.time()
3070
5566
  while True:
3071
- rsp = client.BindOrganizationMemberAuthAccount(model)
5567
+ rsp = client.ListRoleConfigurations(model)
3072
5568
  result = rsp.to_json_string()
3073
5569
  try:
3074
5570
  json_obj = json.loads(result)
@@ -3087,7 +5583,7 @@ def doBindOrganizationMemberAuthAccount(args, parsed_globals):
3087
5583
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3088
5584
 
3089
5585
 
3090
- def doMoveOrganizationMembersToNode(args, parsed_globals):
5586
+ def doAddShareUnitResources(args, parsed_globals):
3091
5587
  g_param = parse_global_arg(parsed_globals)
3092
5588
 
3093
5589
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3116,11 +5612,11 @@ def doMoveOrganizationMembersToNode(args, parsed_globals):
3116
5612
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3117
5613
  client._sdkVersion += ("_CLI_" + __version__)
3118
5614
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3119
- model = models.MoveOrganizationMembersToNodeRequest()
5615
+ model = models.AddShareUnitResourcesRequest()
3120
5616
  model.from_json_string(json.dumps(args))
3121
5617
  start_time = time.time()
3122
5618
  while True:
3123
- rsp = client.MoveOrganizationMembersToNode(model)
5619
+ rsp = client.AddShareUnitResources(model)
3124
5620
  result = rsp.to_json_string()
3125
5621
  try:
3126
5622
  json_obj = json.loads(result)
@@ -3139,7 +5635,7 @@ def doMoveOrganizationMembersToNode(args, parsed_globals):
3139
5635
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3140
5636
 
3141
5637
 
3142
- def doAddShareUnit(args, parsed_globals):
5638
+ def doAttachPolicy(args, parsed_globals):
3143
5639
  g_param = parse_global_arg(parsed_globals)
3144
5640
 
3145
5641
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3168,11 +5664,11 @@ def doAddShareUnit(args, parsed_globals):
3168
5664
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3169
5665
  client._sdkVersion += ("_CLI_" + __version__)
3170
5666
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3171
- model = models.AddShareUnitRequest()
5667
+ model = models.AttachPolicyRequest()
3172
5668
  model.from_json_string(json.dumps(args))
3173
5669
  start_time = time.time()
3174
5670
  while True:
3175
- rsp = client.AddShareUnit(model)
5671
+ rsp = client.AttachPolicy(model)
3176
5672
  result = rsp.to_json_string()
3177
5673
  try:
3178
5674
  json_obj = json.loads(result)
@@ -3191,7 +5687,7 @@ def doAddShareUnit(args, parsed_globals):
3191
5687
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3192
5688
 
3193
5689
 
3194
- def doDeleteShareUnit(args, parsed_globals):
5690
+ def doDescribeShareAreas(args, parsed_globals):
3195
5691
  g_param = parse_global_arg(parsed_globals)
3196
5692
 
3197
5693
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3220,11 +5716,11 @@ def doDeleteShareUnit(args, parsed_globals):
3220
5716
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3221
5717
  client._sdkVersion += ("_CLI_" + __version__)
3222
5718
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3223
- model = models.DeleteShareUnitRequest()
5719
+ model = models.DescribeShareAreasRequest()
3224
5720
  model.from_json_string(json.dumps(args))
3225
5721
  start_time = time.time()
3226
5722
  while True:
3227
- rsp = client.DeleteShareUnit(model)
5723
+ rsp = client.DescribeShareAreas(model)
3228
5724
  result = rsp.to_json_string()
3229
5725
  try:
3230
5726
  json_obj = json.loads(result)
@@ -3243,7 +5739,7 @@ def doDeleteShareUnit(args, parsed_globals):
3243
5739
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3244
5740
 
3245
5741
 
3246
- def doListPolicies(args, parsed_globals):
5742
+ def doAddUserToGroup(args, parsed_globals):
3247
5743
  g_param = parse_global_arg(parsed_globals)
3248
5744
 
3249
5745
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3272,11 +5768,11 @@ def doListPolicies(args, parsed_globals):
3272
5768
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3273
5769
  client._sdkVersion += ("_CLI_" + __version__)
3274
5770
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3275
- model = models.ListPoliciesRequest()
5771
+ model = models.AddUserToGroupRequest()
3276
5772
  model.from_json_string(json.dumps(args))
3277
5773
  start_time = time.time()
3278
5774
  while True:
3279
- rsp = client.ListPolicies(model)
5775
+ rsp = client.AddUserToGroup(model)
3280
5776
  result = rsp.to_json_string()
3281
5777
  try:
3282
5778
  json_obj = json.loads(result)
@@ -3295,7 +5791,7 @@ def doListPolicies(args, parsed_globals):
3295
5791
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3296
5792
 
3297
5793
 
3298
- def doDescribeOrganizationFinancialByProduct(args, parsed_globals):
5794
+ def doDeleteRoleConfiguration(args, parsed_globals):
3299
5795
  g_param = parse_global_arg(parsed_globals)
3300
5796
 
3301
5797
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3324,11 +5820,11 @@ def doDescribeOrganizationFinancialByProduct(args, parsed_globals):
3324
5820
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3325
5821
  client._sdkVersion += ("_CLI_" + __version__)
3326
5822
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3327
- model = models.DescribeOrganizationFinancialByProductRequest()
5823
+ model = models.DeleteRoleConfigurationRequest()
3328
5824
  model.from_json_string(json.dumps(args))
3329
5825
  start_time = time.time()
3330
5826
  while True:
3331
- rsp = client.DescribeOrganizationFinancialByProduct(model)
5827
+ rsp = client.DeleteRoleConfiguration(model)
3332
5828
  result = rsp.to_json_string()
3333
5829
  try:
3334
5830
  json_obj = json.loads(result)
@@ -3347,7 +5843,7 @@ def doDescribeOrganizationFinancialByProduct(args, parsed_globals):
3347
5843
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3348
5844
 
3349
5845
 
3350
- def doDescribeOrganizationAuthNode(args, parsed_globals):
5846
+ def doCreateOrganization(args, parsed_globals):
3351
5847
  g_param = parse_global_arg(parsed_globals)
3352
5848
 
3353
5849
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3376,11 +5872,11 @@ def doDescribeOrganizationAuthNode(args, parsed_globals):
3376
5872
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3377
5873
  client._sdkVersion += ("_CLI_" + __version__)
3378
5874
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3379
- model = models.DescribeOrganizationAuthNodeRequest()
5875
+ model = models.CreateOrganizationRequest()
3380
5876
  model.from_json_string(json.dumps(args))
3381
5877
  start_time = time.time()
3382
5878
  while True:
3383
- rsp = client.DescribeOrganizationAuthNode(model)
5879
+ rsp = client.CreateOrganization(model)
3384
5880
  result = rsp.to_json_string()
3385
5881
  try:
3386
5882
  json_obj = json.loads(result)
@@ -3399,7 +5895,7 @@ def doDescribeOrganizationAuthNode(args, parsed_globals):
3399
5895
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3400
5896
 
3401
5897
 
3402
- def doAddShareUnitMembers(args, parsed_globals):
5898
+ def doAddExternalSAMLIdPCertificate(args, parsed_globals):
3403
5899
  g_param = parse_global_arg(parsed_globals)
3404
5900
 
3405
5901
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3428,11 +5924,11 @@ def doAddShareUnitMembers(args, parsed_globals):
3428
5924
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3429
5925
  client._sdkVersion += ("_CLI_" + __version__)
3430
5926
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3431
- model = models.AddShareUnitMembersRequest()
5927
+ model = models.AddExternalSAMLIdPCertificateRequest()
3432
5928
  model.from_json_string(json.dumps(args))
3433
5929
  start_time = time.time()
3434
5930
  while True:
3435
- rsp = client.AddShareUnitMembers(model)
5931
+ rsp = client.AddExternalSAMLIdPCertificate(model)
3436
5932
  result = rsp.to_json_string()
3437
5933
  try:
3438
5934
  json_obj = json.loads(result)
@@ -3451,7 +5947,7 @@ def doAddShareUnitMembers(args, parsed_globals):
3451
5947
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3452
5948
 
3453
5949
 
3454
- def doDescribePolicyConfig(args, parsed_globals):
5950
+ def doMoveOrganizationMembersToNode(args, parsed_globals):
3455
5951
  g_param = parse_global_arg(parsed_globals)
3456
5952
 
3457
5953
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3480,11 +5976,11 @@ def doDescribePolicyConfig(args, parsed_globals):
3480
5976
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3481
5977
  client._sdkVersion += ("_CLI_" + __version__)
3482
5978
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3483
- model = models.DescribePolicyConfigRequest()
5979
+ model = models.MoveOrganizationMembersToNodeRequest()
3484
5980
  model.from_json_string(json.dumps(args))
3485
5981
  start_time = time.time()
3486
5982
  while True:
3487
- rsp = client.DescribePolicyConfig(model)
5983
+ rsp = client.MoveOrganizationMembersToNode(model)
3488
5984
  result = rsp.to_json_string()
3489
5985
  try:
3490
5986
  json_obj = json.loads(result)
@@ -3503,7 +5999,7 @@ def doDescribePolicyConfig(args, parsed_globals):
3503
5999
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3504
6000
 
3505
6001
 
3506
- def doDescribeOrganizationNodes(args, parsed_globals):
6002
+ def doUpdateRoleConfiguration(args, parsed_globals):
3507
6003
  g_param = parse_global_arg(parsed_globals)
3508
6004
 
3509
6005
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3532,11 +6028,11 @@ def doDescribeOrganizationNodes(args, parsed_globals):
3532
6028
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3533
6029
  client._sdkVersion += ("_CLI_" + __version__)
3534
6030
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3535
- model = models.DescribeOrganizationNodesRequest()
6031
+ model = models.UpdateRoleConfigurationRequest()
3536
6032
  model.from_json_string(json.dumps(args))
3537
6033
  start_time = time.time()
3538
6034
  while True:
3539
- rsp = client.DescribeOrganizationNodes(model)
6035
+ rsp = client.UpdateRoleConfiguration(model)
3540
6036
  result = rsp.to_json_string()
3541
6037
  try:
3542
6038
  json_obj = json.loads(result)
@@ -3555,7 +6051,7 @@ def doDescribeOrganizationNodes(args, parsed_globals):
3555
6051
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3556
6052
 
3557
6053
 
3558
- def doCreateOrganization(args, parsed_globals):
6054
+ def doDeleteOrganizationIdentity(args, parsed_globals):
3559
6055
  g_param = parse_global_arg(parsed_globals)
3560
6056
 
3561
6057
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3584,11 +6080,11 @@ def doCreateOrganization(args, parsed_globals):
3584
6080
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3585
6081
  client._sdkVersion += ("_CLI_" + __version__)
3586
6082
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3587
- model = models.CreateOrganizationRequest()
6083
+ model = models.DeleteOrganizationIdentityRequest()
3588
6084
  model.from_json_string(json.dumps(args))
3589
6085
  start_time = time.time()
3590
6086
  while True:
3591
- rsp = client.CreateOrganization(model)
6087
+ rsp = client.DeleteOrganizationIdentity(model)
3592
6088
  result = rsp.to_json_string()
3593
6089
  try:
3594
6090
  json_obj = json.loads(result)
@@ -3607,7 +6103,7 @@ def doCreateOrganization(args, parsed_globals):
3607
6103
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3608
6104
 
3609
6105
 
3610
- def doListOrganizationNodes(args, parsed_globals):
6106
+ def doCancelOrganizationInvitation(args, parsed_globals):
3611
6107
  g_param = parse_global_arg(parsed_globals)
3612
6108
 
3613
6109
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3636,11 +6132,11 @@ def doListOrganizationNodes(args, parsed_globals):
3636
6132
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3637
6133
  client._sdkVersion += ("_CLI_" + __version__)
3638
6134
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3639
- model = models.ListOrganizationNodesRequest()
6135
+ model = models.CancelOrganizationInvitationRequest()
3640
6136
  model.from_json_string(json.dumps(args))
3641
6137
  start_time = time.time()
3642
6138
  while True:
3643
- rsp = client.ListOrganizationNodes(model)
6139
+ rsp = client.CancelOrganizationInvitation(model)
3644
6140
  result = rsp.to_json_string()
3645
6141
  try:
3646
6142
  json_obj = json.loads(result)
@@ -3659,7 +6155,7 @@ def doListOrganizationNodes(args, parsed_globals):
3659
6155
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3660
6156
 
3661
6157
 
3662
- def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
6158
+ def doEnablePolicyType(args, parsed_globals):
3663
6159
  g_param = parse_global_arg(parsed_globals)
3664
6160
 
3665
6161
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3688,11 +6184,11 @@ def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
3688
6184
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3689
6185
  client._sdkVersion += ("_CLI_" + __version__)
3690
6186
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3691
- model = models.DeleteOrganizationMemberAuthIdentityRequest()
6187
+ model = models.EnablePolicyTypeRequest()
3692
6188
  model.from_json_string(json.dumps(args))
3693
6189
  start_time = time.time()
3694
6190
  while True:
3695
- rsp = client.DeleteOrganizationMemberAuthIdentity(model)
6191
+ rsp = client.EnablePolicyType(model)
3696
6192
  result = rsp.to_json_string()
3697
6193
  try:
3698
6194
  json_obj = json.loads(result)
@@ -3711,7 +6207,7 @@ def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
3711
6207
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3712
6208
 
3713
6209
 
3714
- def doCreatePolicy(args, parsed_globals):
6210
+ def doDeleteOrgServiceAssign(args, parsed_globals):
3715
6211
  g_param = parse_global_arg(parsed_globals)
3716
6212
 
3717
6213
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3740,11 +6236,11 @@ def doCreatePolicy(args, parsed_globals):
3740
6236
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3741
6237
  client._sdkVersion += ("_CLI_" + __version__)
3742
6238
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3743
- model = models.CreatePolicyRequest()
6239
+ model = models.DeleteOrgServiceAssignRequest()
3744
6240
  model.from_json_string(json.dumps(args))
3745
6241
  start_time = time.time()
3746
6242
  while True:
3747
- rsp = client.CreatePolicy(model)
6243
+ rsp = client.DeleteOrgServiceAssign(model)
3748
6244
  result = rsp.to_json_string()
3749
6245
  try:
3750
6246
  json_obj = json.loads(result)
@@ -3763,7 +6259,7 @@ def doCreatePolicy(args, parsed_globals):
3763
6259
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3764
6260
 
3765
6261
 
3766
- def doCreateOrganizationMemberPolicy(args, parsed_globals):
6262
+ def doGetZoneSAMLServiceProviderInfo(args, parsed_globals):
3767
6263
  g_param = parse_global_arg(parsed_globals)
3768
6264
 
3769
6265
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3792,11 +6288,11 @@ def doCreateOrganizationMemberPolicy(args, parsed_globals):
3792
6288
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3793
6289
  client._sdkVersion += ("_CLI_" + __version__)
3794
6290
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3795
- model = models.CreateOrganizationMemberPolicyRequest()
6291
+ model = models.GetZoneSAMLServiceProviderInfoRequest()
3796
6292
  model.from_json_string(json.dumps(args))
3797
6293
  start_time = time.time()
3798
6294
  while True:
3799
- rsp = client.CreateOrganizationMemberPolicy(model)
6295
+ rsp = client.GetZoneSAMLServiceProviderInfo(model)
3800
6296
  result = rsp.to_json_string()
3801
6297
  try:
3802
6298
  json_obj = json.loads(result)
@@ -3815,7 +6311,7 @@ def doCreateOrganizationMemberPolicy(args, parsed_globals):
3815
6311
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3816
6312
 
3817
6313
 
3818
- def doListOrganizationService(args, parsed_globals):
6314
+ def doListTargetsForPolicy(args, parsed_globals):
3819
6315
  g_param = parse_global_arg(parsed_globals)
3820
6316
 
3821
6317
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3844,11 +6340,11 @@ def doListOrganizationService(args, parsed_globals):
3844
6340
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3845
6341
  client._sdkVersion += ("_CLI_" + __version__)
3846
6342
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3847
- model = models.ListOrganizationServiceRequest()
6343
+ model = models.ListTargetsForPolicyRequest()
3848
6344
  model.from_json_string(json.dumps(args))
3849
6345
  start_time = time.time()
3850
6346
  while True:
3851
- rsp = client.ListOrganizationService(model)
6347
+ rsp = client.ListTargetsForPolicy(model)
3852
6348
  result = rsp.to_json_string()
3853
6349
  try:
3854
6350
  json_obj = json.loads(result)
@@ -3867,7 +6363,7 @@ def doListOrganizationService(args, parsed_globals):
3867
6363
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3868
6364
 
3869
6365
 
3870
- def doDeletePolicy(args, parsed_globals):
6366
+ def doListPolicies(args, parsed_globals):
3871
6367
  g_param = parse_global_arg(parsed_globals)
3872
6368
 
3873
6369
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3896,11 +6392,11 @@ def doDeletePolicy(args, parsed_globals):
3896
6392
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3897
6393
  client._sdkVersion += ("_CLI_" + __version__)
3898
6394
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3899
- model = models.DeletePolicyRequest()
6395
+ model = models.ListPoliciesRequest()
3900
6396
  model.from_json_string(json.dumps(args))
3901
6397
  start_time = time.time()
3902
6398
  while True:
3903
- rsp = client.DeletePolicy(model)
6399
+ rsp = client.ListPolicies(model)
3904
6400
  result = rsp.to_json_string()
3905
6401
  try:
3906
6402
  json_obj = json.loads(result)
@@ -3919,7 +6415,7 @@ def doDeletePolicy(args, parsed_globals):
3919
6415
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3920
6416
 
3921
6417
 
3922
- def doListTargetsForPolicy(args, parsed_globals):
6418
+ def doGetTaskStatus(args, parsed_globals):
3923
6419
  g_param = parse_global_arg(parsed_globals)
3924
6420
 
3925
6421
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3948,11 +6444,11 @@ def doListTargetsForPolicy(args, parsed_globals):
3948
6444
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3949
6445
  client._sdkVersion += ("_CLI_" + __version__)
3950
6446
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3951
- model = models.ListTargetsForPolicyRequest()
6447
+ model = models.GetTaskStatusRequest()
3952
6448
  model.from_json_string(json.dumps(args))
3953
6449
  start_time = time.time()
3954
6450
  while True:
3955
- rsp = client.ListTargetsForPolicy(model)
6451
+ rsp = client.GetTaskStatus(model)
3956
6452
  result = rsp.to_json_string()
3957
6453
  try:
3958
6454
  json_obj = json.loads(result)
@@ -3971,7 +6467,7 @@ def doListTargetsForPolicy(args, parsed_globals):
3971
6467
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3972
6468
 
3973
6469
 
3974
- def doListOrganizationNodeMembers(args, parsed_globals):
6470
+ def doCreateOrganizationMemberPolicy(args, parsed_globals):
3975
6471
  g_param = parse_global_arg(parsed_globals)
3976
6472
 
3977
6473
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4000,11 +6496,11 @@ def doListOrganizationNodeMembers(args, parsed_globals):
4000
6496
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4001
6497
  client._sdkVersion += ("_CLI_" + __version__)
4002
6498
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4003
- model = models.ListOrganizationNodeMembersRequest()
6499
+ model = models.CreateOrganizationMemberPolicyRequest()
4004
6500
  model.from_json_string(json.dumps(args))
4005
6501
  start_time = time.time()
4006
6502
  while True:
4007
- rsp = client.ListOrganizationNodeMembers(model)
6503
+ rsp = client.CreateOrganizationMemberPolicy(model)
4008
6504
  result = rsp.to_json_string()
4009
6505
  try:
4010
6506
  json_obj = json.loads(result)
@@ -4023,7 +6519,7 @@ def doListOrganizationNodeMembers(args, parsed_globals):
4023
6519
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4024
6520
 
4025
6521
 
4026
- def doCheckAccountDelete(args, parsed_globals):
6522
+ def doListOrganizationService(args, parsed_globals):
4027
6523
  g_param = parse_global_arg(parsed_globals)
4028
6524
 
4029
6525
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4052,11 +6548,11 @@ def doCheckAccountDelete(args, parsed_globals):
4052
6548
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4053
6549
  client._sdkVersion += ("_CLI_" + __version__)
4054
6550
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4055
- model = models.CheckAccountDeleteRequest()
6551
+ model = models.ListOrganizationServiceRequest()
4056
6552
  model.from_json_string(json.dumps(args))
4057
6553
  start_time = time.time()
4058
6554
  while True:
4059
- rsp = client.CheckAccountDelete(model)
6555
+ rsp = client.ListOrganizationService(model)
4060
6556
  result = rsp.to_json_string()
4061
6557
  try:
4062
6558
  json_obj = json.loads(result)
@@ -4075,7 +6571,7 @@ def doCheckAccountDelete(args, parsed_globals):
4075
6571
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4076
6572
 
4077
6573
 
4078
- def doUpdatePolicy(args, parsed_globals):
6574
+ def doDeleteOrganizationMemberAuthIdentity(args, parsed_globals):
4079
6575
  g_param = parse_global_arg(parsed_globals)
4080
6576
 
4081
6577
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4104,11 +6600,11 @@ def doUpdatePolicy(args, parsed_globals):
4104
6600
  client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
4105
6601
  client._sdkVersion += ("_CLI_" + __version__)
4106
6602
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4107
- model = models.UpdatePolicyRequest()
6603
+ model = models.DeleteOrganizationMemberAuthIdentityRequest()
4108
6604
  model.from_json_string(json.dumps(args))
4109
6605
  start_time = time.time()
4110
6606
  while True:
4111
- rsp = client.UpdatePolicy(model)
6607
+ rsp = client.DeleteOrganizationMemberAuthIdentity(model)
4112
6608
  result = rsp.to_json_string()
4113
6609
  try:
4114
6610
  json_obj = json.loads(result)
@@ -4140,85 +6636,133 @@ MODELS_MAP = {
4140
6636
  }
4141
6637
 
4142
6638
  ACTION_MAP = {
4143
- "DescribeOrganizationMembers": doDescribeOrganizationMembers,
4144
6639
  "QuitOrganization": doQuitOrganization,
4145
- "DisablePolicyType": doDisablePolicyType,
6640
+ "ListOrganizationNodes": doListOrganizationNodes,
4146
6641
  "DescribeOrganizationMemberAuthAccounts": doDescribeOrganizationMemberAuthAccounts,
4147
- "GetOrganization": doGetOrganization,
4148
- "UpdateShareUnit": doUpdateShareUnit,
4149
- "UpdateOrganizationMember": doUpdateOrganizationMember,
4150
- "ListPoliciesForTarget": doListPoliciesForTarget,
4151
- "AcceptJoinShareUnitInvitation": doAcceptJoinShareUnitInvitation,
4152
- "DeleteOrganizationMembersPolicy": doDeleteOrganizationMembersPolicy,
6642
+ "ListGroupMembers": doListGroupMembers,
4153
6643
  "ListOrganizationIdentity": doListOrganizationIdentity,
4154
6644
  "AddOrganizationNode": doAddOrganizationNode,
4155
6645
  "UpdateOrganizationMemberEmailBind": doUpdateOrganizationMemberEmailBind,
4156
- "DescribeShareUnitMembers": doDescribeShareUnitMembers,
4157
- "DescribeOrganizationMemberAuthIdentities": doDescribeOrganizationMemberAuthIdentities,
4158
- "DescribePolicy": doDescribePolicy,
4159
- "UpdateOrganizationNode": doUpdateOrganizationNode,
4160
- "CreateOrganizationMemberAuthIdentity": doCreateOrganizationMemberAuthIdentity,
4161
- "DeleteOrganizationMembers": doDeleteOrganizationMembers,
4162
- "UpdateOrganizationIdentity": doUpdateOrganizationIdentity,
4163
- "DescribeOrganizationFinancialByMonth": doDescribeOrganizationFinancialByMonth,
4164
- "DeleteAccount": doDeleteAccount,
4165
- "ListOrgServiceAssignMember": doListOrgServiceAssignMember,
4166
- "RejectJoinShareUnitInvitation": doRejectJoinShareUnitInvitation,
4167
- "DeleteOrganizationNodes": doDeleteOrganizationNodes,
6646
+ "RemovePermissionPolicyFromRoleConfiguration": doRemovePermissionPolicyFromRoleConfiguration,
6647
+ "UpdateUser": doUpdateUser,
4168
6648
  "CreateOrgServiceAssign": doCreateOrgServiceAssign,
4169
6649
  "DescribeEffectivePolicy": doDescribeEffectivePolicy,
6650
+ "GetUser": doGetUser,
6651
+ "SendOrganizationInvitation": doSendOrganizationInvitation,
6652
+ "CreateOrganizationMemberAuthIdentity": doCreateOrganizationMemberAuthIdentity,
6653
+ "OpenIdentityCenter": doOpenIdentityCenter,
6654
+ "DeleteUser": doDeleteUser,
6655
+ "GetRoleConfiguration": doGetRoleConfiguration,
6656
+ "DescribeShareUnitResources": doDescribeShareUnitResources,
6657
+ "DenyOrganizationInvitation": doDenyOrganizationInvitation,
6658
+ "DescribeOrganizationMemberEmailBind": doDescribeOrganizationMemberEmailBind,
4170
6659
  "DeleteShareUnitResources": doDeleteShareUnitResources,
4171
- "DescribeShareUnits": doDescribeShareUnits,
4172
- "DescribeOrganizationMemberPolicies": doDescribeOrganizationMemberPolicies,
4173
- "CancelOrganizationInvitation": doCancelOrganizationInvitation,
4174
- "DeleteOrganization": doDeleteOrganization,
6660
+ "AcceptOrganizationInvitation": doAcceptOrganizationInvitation,
6661
+ "ListTasks": doListTasks,
6662
+ "RemoveUserFromGroup": doRemoveUserFromGroup,
6663
+ "DescribeOrganizationFinancialByProduct": doDescribeOrganizationFinancialByProduct,
6664
+ "DescribeOrganizationNodes": doDescribeOrganizationNodes,
6665
+ "CreateUser": doCreateUser,
6666
+ "ListExternalSAMLIdPCertificates": doListExternalSAMLIdPCertificates,
6667
+ "RemoveExternalSAMLIdPCertificate": doRemoveExternalSAMLIdPCertificate,
6668
+ "CheckAccountDelete": doCheckAccountDelete,
6669
+ "DescribeOrganizationMembers": doDescribeOrganizationMembers,
6670
+ "CreateRoleAssignment": doCreateRoleAssignment,
6671
+ "CreateRoleConfiguration": doCreateRoleConfiguration,
6672
+ "GetOrganization": doGetOrganization,
6673
+ "AcceptJoinShareUnitInvitation": doAcceptJoinShareUnitInvitation,
6674
+ "ListUsers": doListUsers,
6675
+ "DescribePolicy": doDescribePolicy,
6676
+ "GetExternalSAMLIdentityProvider": doGetExternalSAMLIdentityProvider,
6677
+ "ClearExternalSAMLIdentityProvider": doClearExternalSAMLIdentityProvider,
6678
+ "UpdateOrganizationIdentity": doUpdateOrganizationIdentity,
6679
+ "ProvisionRoleConfiguration": doProvisionRoleConfiguration,
4175
6680
  "CancelOrganizationMemberAuthAccount": doCancelOrganizationMemberAuthAccount,
4176
- "SendOrganizationInvitation": doSendOrganizationInvitation,
4177
6681
  "DescribeOrganizationFinancialByMember": doDescribeOrganizationFinancialByMember,
4178
- "GetOrganizationMember": doGetOrganizationMember,
4179
- "AddShareUnitResources": doAddShareUnitResources,
4180
- "ListNonCompliantResource": doListNonCompliantResource,
4181
- "AttachPolicy": doAttachPolicy,
6682
+ "GetGroup": doGetGroup,
6683
+ "DeleteRoleAssignment": doDeleteRoleAssignment,
4182
6684
  "CreateOrganizationMembersPolicy": doCreateOrganizationMembersPolicy,
4183
- "DescribeShareAreas": doDescribeShareAreas,
4184
- "DescribeOrganization": doDescribeOrganization,
4185
6685
  "MoveOrganizationNodeMembers": doMoveOrganizationNodeMembers,
4186
- "ListOrganizationMembers": doListOrganizationMembers,
4187
6686
  "DeleteOrganizationMemberFromNode": doDeleteOrganizationMemberFromNode,
4188
- "DescribeShareUnitResources": doDescribeShareUnitResources,
4189
- "DetachPolicy": doDetachPolicy,
6687
+ "UpdateZone": doUpdateZone,
4190
6688
  "CreateOrganizationIdentity": doCreateOrganizationIdentity,
4191
- "DeleteOrgServiceAssign": doDeleteOrgServiceAssign,
4192
- "DeleteOrganizationIdentity": doDeleteOrganizationIdentity,
4193
- "AcceptOrganizationInvitation": doAcceptOrganizationInvitation,
4194
- "DenyOrganizationInvitation": doDenyOrganizationInvitation,
4195
6689
  "AddOrganizationMemberEmail": doAddOrganizationMemberEmail,
4196
- "DeleteShareUnitMembers": doDeleteShareUnitMembers,
4197
- "DescribeOrganizationMemberEmailBind": doDescribeOrganizationMemberEmailBind,
4198
- "EnablePolicyType": doEnablePolicyType,
4199
6690
  "ListOrganizationInvitations": doListOrganizationInvitations,
4200
- "CreateOrganizationMember": doCreateOrganizationMember,
4201
- "BindOrganizationMemberAuthAccount": doBindOrganizationMemberAuthAccount,
4202
- "MoveOrganizationMembersToNode": doMoveOrganizationMembersToNode,
6691
+ "ListJoinedGroupsForUser": doListJoinedGroupsForUser,
6692
+ "ListPermissionPoliciesInRoleConfiguration": doListPermissionPoliciesInRoleConfiguration,
4203
6693
  "AddShareUnit": doAddShareUnit,
4204
- "DeleteShareUnit": doDeleteShareUnit,
4205
- "ListPolicies": doListPolicies,
4206
- "DescribeOrganizationFinancialByProduct": doDescribeOrganizationFinancialByProduct,
4207
6694
  "DescribeOrganizationAuthNode": doDescribeOrganizationAuthNode,
6695
+ "ListRoleConfigurationProvisionings": doListRoleConfigurationProvisionings,
4208
6696
  "AddShareUnitMembers": doAddShareUnitMembers,
4209
6697
  "DescribePolicyConfig": doDescribePolicyConfig,
4210
- "DescribeOrganizationNodes": doDescribeOrganizationNodes,
4211
- "CreateOrganization": doCreateOrganization,
4212
- "ListOrganizationNodes": doListOrganizationNodes,
4213
- "DeleteOrganizationMemberAuthIdentity": doDeleteOrganizationMemberAuthIdentity,
6698
+ "UpdatePolicy": doUpdatePolicy,
6699
+ "DescribeShareUnits": doDescribeShareUnits,
6700
+ "ListOrganizationNodeMembers": doListOrganizationNodeMembers,
6701
+ "ListUserSyncProvisionings": doListUserSyncProvisionings,
6702
+ "UpdateOrganizationNode": doUpdateOrganizationNode,
6703
+ "DisablePolicyType": doDisablePolicyType,
6704
+ "CreateUserSyncProvisioning": doCreateUserSyncProvisioning,
6705
+ "AddPermissionPolicyToRoleConfiguration": doAddPermissionPolicyToRoleConfiguration,
6706
+ "DeleteOrganizationMembersPolicy": doDeleteOrganizationMembersPolicy,
6707
+ "DeletePolicy": doDeletePolicy,
6708
+ "CreateGroup": doCreateGroup,
6709
+ "DescribeShareUnitMembers": doDescribeShareUnitMembers,
6710
+ "DismantleRoleConfiguration": doDismantleRoleConfiguration,
6711
+ "DeleteShareUnit": doDeleteShareUnit,
6712
+ "DeleteOrganizationMembers": doDeleteOrganizationMembers,
6713
+ "ListOrgServiceAssignMember": doListOrgServiceAssignMember,
6714
+ "RejectJoinShareUnitInvitation": doRejectJoinShareUnitInvitation,
6715
+ "ListNonCompliantResource": doListNonCompliantResource,
6716
+ "DeleteGroup": doDeleteGroup,
6717
+ "SetExternalSAMLIdentityProvider": doSetExternalSAMLIdentityProvider,
6718
+ "DeleteOrganization": doDeleteOrganization,
6719
+ "GetOrganizationMember": doGetOrganizationMember,
6720
+ "UpdateUserSyncProvisioning": doUpdateUserSyncProvisioning,
6721
+ "GetUserSyncProvisioning": doGetUserSyncProvisioning,
6722
+ "DescribeOrganization": doDescribeOrganization,
6723
+ "ListOrganizationMembers": doListOrganizationMembers,
6724
+ "ListGroups": doListGroups,
6725
+ "CreateOrganizationMember": doCreateOrganizationMember,
6726
+ "BindOrganizationMemberAuthAccount": doBindOrganizationMemberAuthAccount,
6727
+ "UpdateGroup": doUpdateGroup,
4214
6728
  "CreatePolicy": doCreatePolicy,
6729
+ "GetProvisioningTaskStatus": doGetProvisioningTaskStatus,
6730
+ "UpdateUserStatus": doUpdateUserStatus,
6731
+ "UpdateShareUnit": doUpdateShareUnit,
6732
+ "UpdateOrganizationMember": doUpdateOrganizationMember,
6733
+ "ListPoliciesForTarget": doListPoliciesForTarget,
6734
+ "DescribeOrganizationMemberAuthIdentities": doDescribeOrganizationMemberAuthIdentities,
6735
+ "DescribeIdentityCenter": doDescribeIdentityCenter,
6736
+ "GetZoneStatistics": doGetZoneStatistics,
6737
+ "DetachPolicy": doDetachPolicy,
6738
+ "DeleteShareUnitMembers": doDeleteShareUnitMembers,
6739
+ "DescribeOrganizationFinancialByMonth": doDescribeOrganizationFinancialByMonth,
6740
+ "DeleteAccount": doDeleteAccount,
6741
+ "DeleteOrganizationNodes": doDeleteOrganizationNodes,
6742
+ "ListRoleAssignments": doListRoleAssignments,
6743
+ "DescribeOrganizationMemberPolicies": doDescribeOrganizationMemberPolicies,
6744
+ "DeleteUserSyncProvisioning": doDeleteUserSyncProvisioning,
6745
+ "ListRoleConfigurations": doListRoleConfigurations,
6746
+ "AddShareUnitResources": doAddShareUnitResources,
6747
+ "AttachPolicy": doAttachPolicy,
6748
+ "DescribeShareAreas": doDescribeShareAreas,
6749
+ "AddUserToGroup": doAddUserToGroup,
6750
+ "DeleteRoleConfiguration": doDeleteRoleConfiguration,
6751
+ "CreateOrganization": doCreateOrganization,
6752
+ "AddExternalSAMLIdPCertificate": doAddExternalSAMLIdPCertificate,
6753
+ "MoveOrganizationMembersToNode": doMoveOrganizationMembersToNode,
6754
+ "UpdateRoleConfiguration": doUpdateRoleConfiguration,
6755
+ "DeleteOrganizationIdentity": doDeleteOrganizationIdentity,
6756
+ "CancelOrganizationInvitation": doCancelOrganizationInvitation,
6757
+ "EnablePolicyType": doEnablePolicyType,
6758
+ "DeleteOrgServiceAssign": doDeleteOrgServiceAssign,
6759
+ "GetZoneSAMLServiceProviderInfo": doGetZoneSAMLServiceProviderInfo,
6760
+ "ListTargetsForPolicy": doListTargetsForPolicy,
6761
+ "ListPolicies": doListPolicies,
6762
+ "GetTaskStatus": doGetTaskStatus,
4215
6763
  "CreateOrganizationMemberPolicy": doCreateOrganizationMemberPolicy,
4216
6764
  "ListOrganizationService": doListOrganizationService,
4217
- "DeletePolicy": doDeletePolicy,
4218
- "ListTargetsForPolicy": doListTargetsForPolicy,
4219
- "ListOrganizationNodeMembers": doListOrganizationNodeMembers,
4220
- "CheckAccountDelete": doCheckAccountDelete,
4221
- "UpdatePolicy": doUpdatePolicy,
6765
+ "DeleteOrganizationMemberAuthIdentity": doDeleteOrganizationMemberAuthIdentity,
4222
6766
 
4223
6767
  }
4224
6768