tccli 3.0.1221.1__py2.py3-none-any.whl → 3.0.1223.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +392 -392
  3. tccli/services/billing/v20180709/examples.json +8 -8
  4. tccli/services/bsca/v20210811/api.json +11 -1
  5. tccli/services/cfs/v20190719/api.json +1 -1
  6. tccli/services/cfs/v20190719/examples.json +1 -1
  7. tccli/services/cls/v20201016/api.json +1 -1
  8. tccli/services/cvm/v20170312/api.json +1 -1
  9. tccli/services/cynosdb/v20190107/api.json +5 -5
  10. tccli/services/dbdc/v20201029/api.json +43 -43
  11. tccli/services/dbdc/v20201029/examples.json +5 -5
  12. tccli/services/dcdb/v20180411/api.json +203 -215
  13. tccli/services/dnspod/dnspod_client.py +139 -33
  14. tccli/services/dnspod/v20210323/api.json +105 -1
  15. tccli/services/dnspod/v20210323/examples.json +16 -0
  16. tccli/services/dts/v20211206/api.json +1 -1
  17. tccli/services/ess/v20201111/api.json +4 -4
  18. tccli/services/essbasic/v20210526/api.json +2 -2
  19. tccli/services/goosefs/v20220519/api.json +9 -0
  20. tccli/services/gwlb/v20240906/api.json +6 -6
  21. tccli/services/gwlb/v20240906/examples.json +4 -4
  22. tccli/services/hunyuan/v20230901/api.json +11 -0
  23. tccli/services/iotexplorer/v20190423/api.json +5 -5
  24. tccli/services/lcic/v20220817/api.json +10 -1
  25. tccli/services/lighthouse/v20200324/api.json +1 -1
  26. tccli/services/live/live_client.py +1339 -332
  27. tccli/services/live/v20180801/api.json +1461 -166
  28. tccli/services/live/v20180801/examples.json +152 -0
  29. tccli/services/lke/v20231130/api.json +709 -101
  30. tccli/services/lke/v20231130/examples.json +16 -16
  31. tccli/services/mariadb/v20170312/api.json +212 -230
  32. tccli/services/mps/v20190612/api.json +11 -1
  33. tccli/services/oceanus/v20190422/api.json +10 -0
  34. tccli/services/ocr/v20181119/api.json +30 -0
  35. tccli/services/ocr/v20181119/examples.json +4 -10
  36. tccli/services/privatedns/privatedns_client.py +4 -534
  37. tccli/services/privatedns/v20201028/api.json +4 -943
  38. tccli/services/privatedns/v20201028/examples.json +0 -80
  39. tccli/services/redis/v20180412/api.json +1 -1
  40. tccli/services/svp/v20240125/api.json +4 -4
  41. tccli/services/teo/v20220901/api.json +5 -0
  42. tccli/services/tke/v20180525/api.json +10 -0
  43. tccli/services/tke/v20220501/api.json +3 -1
  44. tccli/services/trtc/v20190722/api.json +55 -72
  45. tccli/services/tse/v20201207/api.json +35 -31
  46. tccli/services/tse/v20201207/examples.json +19 -19
  47. tccli/services/vod/v20180717/api.json +19 -0
  48. tccli/services/vpc/v20170312/api.json +29 -0
  49. tccli/services/wedata/v20210820/api.json +3 -3
  50. {tccli-3.0.1221.1.dist-info → tccli-3.0.1223.1.dist-info}/METADATA +2 -2
  51. {tccli-3.0.1221.1.dist-info → tccli-3.0.1223.1.dist-info}/RECORD +54 -54
  52. {tccli-3.0.1221.1.dist-info → tccli-3.0.1223.1.dist-info}/WHEEL +0 -0
  53. {tccli-3.0.1221.1.dist-info → tccli-3.0.1223.1.dist-info}/entry_points.txt +0 -0
  54. {tccli-3.0.1221.1.dist-info → tccli-3.0.1223.1.dist-info}/license_files/LICENSE +0 -0
@@ -121,7 +121,7 @@ def doDescribePrivateZone(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doDeleteEndPoint(args, parsed_globals):
124
+ def doDescribePrivateZoneRecordList(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doDeleteEndPoint(args, parsed_globals):
150
150
  client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.DeleteEndPointRequest()
153
+ model = models.DescribePrivateZoneRecordListRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.DeleteEndPoint(model)
157
+ rsp = client.DescribePrivateZoneRecordList(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -329,58 +329,6 @@ def doCreatePrivateZoneRecord(args, parsed_globals):
329
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
330
 
331
331
 
332
- def doDescribeEndPointList(args, parsed_globals):
333
- g_param = parse_global_arg(parsed_globals)
334
-
335
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
336
- cred = credential.CVMRoleCredential()
337
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
338
- cred = credential.STSAssumeRoleCredential(
339
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
340
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
341
- )
342
- 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):
343
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
344
- else:
345
- cred = credential.Credential(
346
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
347
- )
348
- http_profile = HttpProfile(
349
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
350
- reqMethod="POST",
351
- endpoint=g_param[OptionsDefine.Endpoint],
352
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
353
- )
354
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
355
- if g_param[OptionsDefine.Language]:
356
- profile.language = g_param[OptionsDefine.Language]
357
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
358
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
359
- client._sdkVersion += ("_CLI_" + __version__)
360
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.DescribeEndPointListRequest()
362
- model.from_json_string(json.dumps(args))
363
- start_time = time.time()
364
- while True:
365
- rsp = client.DescribeEndPointList(model)
366
- result = rsp.to_json_string()
367
- try:
368
- json_obj = json.loads(result)
369
- except TypeError as e:
370
- json_obj = json.loads(result.decode('utf-8')) # python3.3
371
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
372
- break
373
- cur_time = time.time()
374
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
375
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
376
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
377
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
378
- else:
379
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
380
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
381
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
-
383
-
384
332
  def doCreatePrivateZone(args, parsed_globals):
385
333
  g_param = parse_global_arg(parsed_globals)
386
334
 
@@ -485,58 +433,6 @@ def doDescribePrivateZoneList(args, parsed_globals):
485
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
434
 
487
435
 
488
- def doCreateEndPoint(args, parsed_globals):
489
- g_param = parse_global_arg(parsed_globals)
490
-
491
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
492
- cred = credential.CVMRoleCredential()
493
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
494
- cred = credential.STSAssumeRoleCredential(
495
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
496
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
497
- )
498
- 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):
499
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
500
- else:
501
- cred = credential.Credential(
502
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
503
- )
504
- http_profile = HttpProfile(
505
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
506
- reqMethod="POST",
507
- endpoint=g_param[OptionsDefine.Endpoint],
508
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
509
- )
510
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
511
- if g_param[OptionsDefine.Language]:
512
- profile.language = g_param[OptionsDefine.Language]
513
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
514
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
515
- client._sdkVersion += ("_CLI_" + __version__)
516
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.CreateEndPointRequest()
518
- model.from_json_string(json.dumps(args))
519
- start_time = time.time()
520
- while True:
521
- rsp = client.CreateEndPoint(model)
522
- result = rsp.to_json_string()
523
- try:
524
- json_obj = json.loads(result)
525
- except TypeError as e:
526
- json_obj = json.loads(result.decode('utf-8')) # python3.3
527
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
528
- break
529
- cur_time = time.time()
530
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
531
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
532
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
533
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
534
- else:
535
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
536
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
537
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
-
539
-
540
436
  def doAddSpecifyPrivateZoneVpc(args, parsed_globals):
541
437
  g_param = parse_global_arg(parsed_globals)
542
438
 
@@ -589,58 +485,6 @@ def doAddSpecifyPrivateZoneVpc(args, parsed_globals):
589
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
486
 
591
487
 
592
- def doModifyForwardRule(args, parsed_globals):
593
- g_param = parse_global_arg(parsed_globals)
594
-
595
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
596
- cred = credential.CVMRoleCredential()
597
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
598
- cred = credential.STSAssumeRoleCredential(
599
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
600
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
601
- )
602
- 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):
603
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
604
- else:
605
- cred = credential.Credential(
606
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
607
- )
608
- http_profile = HttpProfile(
609
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
610
- reqMethod="POST",
611
- endpoint=g_param[OptionsDefine.Endpoint],
612
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
613
- )
614
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
615
- if g_param[OptionsDefine.Language]:
616
- profile.language = g_param[OptionsDefine.Language]
617
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
618
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
619
- client._sdkVersion += ("_CLI_" + __version__)
620
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
- model = models.ModifyForwardRuleRequest()
622
- model.from_json_string(json.dumps(args))
623
- start_time = time.time()
624
- while True:
625
- rsp = client.ModifyForwardRule(model)
626
- result = rsp.to_json_string()
627
- try:
628
- json_obj = json.loads(result)
629
- except TypeError as e:
630
- json_obj = json.loads(result.decode('utf-8')) # python3.3
631
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
- break
633
- cur_time = time.time()
634
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
- else:
639
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
-
643
-
644
488
  def doQueryAsyncBindVpcStatus(args, parsed_globals):
645
489
  g_param = parse_global_arg(parsed_globals)
646
490
 
@@ -849,58 +693,6 @@ def doDeletePrivateDNSAccount(args, parsed_globals):
849
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
694
 
851
695
 
852
- def doDeleteForwardRule(args, parsed_globals):
853
- g_param = parse_global_arg(parsed_globals)
854
-
855
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
856
- cred = credential.CVMRoleCredential()
857
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
858
- cred = credential.STSAssumeRoleCredential(
859
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
860
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
861
- )
862
- elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
863
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
864
- else:
865
- cred = credential.Credential(
866
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
867
- )
868
- http_profile = HttpProfile(
869
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
870
- reqMethod="POST",
871
- endpoint=g_param[OptionsDefine.Endpoint],
872
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
873
- )
874
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
875
- if g_param[OptionsDefine.Language]:
876
- profile.language = g_param[OptionsDefine.Language]
877
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
878
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
879
- client._sdkVersion += ("_CLI_" + __version__)
880
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.DeleteForwardRuleRequest()
882
- model.from_json_string(json.dumps(args))
883
- start_time = time.time()
884
- while True:
885
- rsp = client.DeleteForwardRule(model)
886
- result = rsp.to_json_string()
887
- try:
888
- json_obj = json.loads(result)
889
- except TypeError as e:
890
- json_obj = json.loads(result.decode('utf-8')) # python3.3
891
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
- break
893
- cur_time = time.time()
894
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
- else:
899
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
-
903
-
904
696
  def doSubscribePrivateZoneService(args, parsed_globals):
905
697
  g_param = parse_global_arg(parsed_globals)
906
698
 
@@ -1161,58 +953,6 @@ def doDescribeAccountVpcList(args, parsed_globals):
1161
953
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
954
 
1163
955
 
1164
- def doCreateEndPointAndEndPointService(args, parsed_globals):
1165
- g_param = parse_global_arg(parsed_globals)
1166
-
1167
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1168
- cred = credential.CVMRoleCredential()
1169
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1170
- cred = credential.STSAssumeRoleCredential(
1171
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1172
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1173
- )
1174
- 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):
1175
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1176
- else:
1177
- cred = credential.Credential(
1178
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1179
- )
1180
- http_profile = HttpProfile(
1181
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1182
- reqMethod="POST",
1183
- endpoint=g_param[OptionsDefine.Endpoint],
1184
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1185
- )
1186
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1187
- if g_param[OptionsDefine.Language]:
1188
- profile.language = g_param[OptionsDefine.Language]
1189
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1190
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1191
- client._sdkVersion += ("_CLI_" + __version__)
1192
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
- model = models.CreateEndPointAndEndPointServiceRequest()
1194
- model.from_json_string(json.dumps(args))
1195
- start_time = time.time()
1196
- while True:
1197
- rsp = client.CreateEndPointAndEndPointService(model)
1198
- result = rsp.to_json_string()
1199
- try:
1200
- json_obj = json.loads(result)
1201
- except TypeError as e:
1202
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1203
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1204
- break
1205
- cur_time = time.time()
1206
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1207
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1208
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1209
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1210
- else:
1211
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1212
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1213
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
-
1215
-
1216
956
  def doModifyRecordsStatus(args, parsed_globals):
1217
957
  g_param = parse_global_arg(parsed_globals)
1218
958
 
@@ -1317,110 +1057,6 @@ def doDeleteSpecifyPrivateZoneVpc(args, parsed_globals):
1317
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1318
1058
 
1319
1059
 
1320
- def doDescribeForwardRule(args, parsed_globals):
1321
- g_param = parse_global_arg(parsed_globals)
1322
-
1323
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1324
- cred = credential.CVMRoleCredential()
1325
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1326
- cred = credential.STSAssumeRoleCredential(
1327
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1328
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1329
- )
1330
- 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):
1331
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1332
- else:
1333
- cred = credential.Credential(
1334
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1335
- )
1336
- http_profile = HttpProfile(
1337
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1338
- reqMethod="POST",
1339
- endpoint=g_param[OptionsDefine.Endpoint],
1340
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1341
- )
1342
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1343
- if g_param[OptionsDefine.Language]:
1344
- profile.language = g_param[OptionsDefine.Language]
1345
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1346
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1347
- client._sdkVersion += ("_CLI_" + __version__)
1348
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
- model = models.DescribeForwardRuleRequest()
1350
- model.from_json_string(json.dumps(args))
1351
- start_time = time.time()
1352
- while True:
1353
- rsp = client.DescribeForwardRule(model)
1354
- result = rsp.to_json_string()
1355
- try:
1356
- json_obj = json.loads(result)
1357
- except TypeError as e:
1358
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1359
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1360
- break
1361
- cur_time = time.time()
1362
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1363
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1364
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1365
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1366
- else:
1367
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1368
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1369
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
-
1371
-
1372
- def doCreateForwardRule(args, parsed_globals):
1373
- g_param = parse_global_arg(parsed_globals)
1374
-
1375
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1376
- cred = credential.CVMRoleCredential()
1377
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1378
- cred = credential.STSAssumeRoleCredential(
1379
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1380
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1381
- )
1382
- 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):
1383
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1384
- else:
1385
- cred = credential.Credential(
1386
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1387
- )
1388
- http_profile = HttpProfile(
1389
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1390
- reqMethod="POST",
1391
- endpoint=g_param[OptionsDefine.Endpoint],
1392
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1393
- )
1394
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1395
- if g_param[OptionsDefine.Language]:
1396
- profile.language = g_param[OptionsDefine.Language]
1397
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1398
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1399
- client._sdkVersion += ("_CLI_" + __version__)
1400
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1401
- model = models.CreateForwardRuleRequest()
1402
- model.from_json_string(json.dumps(args))
1403
- start_time = time.time()
1404
- while True:
1405
- rsp = client.CreateForwardRule(model)
1406
- result = rsp.to_json_string()
1407
- try:
1408
- json_obj = json.loads(result)
1409
- except TypeError as e:
1410
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1411
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1412
- break
1413
- cur_time = time.time()
1414
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1415
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1416
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1417
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1418
- else:
1419
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1420
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1421
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1422
-
1423
-
1424
1060
  def doDescribePrivateZoneService(args, parsed_globals):
1425
1061
  g_param = parse_global_arg(parsed_globals)
1426
1062
 
@@ -1473,162 +1109,6 @@ def doDescribePrivateZoneService(args, parsed_globals):
1473
1109
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1474
1110
 
1475
1111
 
1476
- def doDescribeEndPointRegion(args, parsed_globals):
1477
- g_param = parse_global_arg(parsed_globals)
1478
-
1479
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1480
- cred = credential.CVMRoleCredential()
1481
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1482
- cred = credential.STSAssumeRoleCredential(
1483
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1484
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1485
- )
1486
- 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):
1487
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1488
- else:
1489
- cred = credential.Credential(
1490
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1491
- )
1492
- http_profile = HttpProfile(
1493
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1494
- reqMethod="POST",
1495
- endpoint=g_param[OptionsDefine.Endpoint],
1496
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1497
- )
1498
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1499
- if g_param[OptionsDefine.Language]:
1500
- profile.language = g_param[OptionsDefine.Language]
1501
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1502
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1503
- client._sdkVersion += ("_CLI_" + __version__)
1504
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1505
- model = models.DescribeEndPointRegionRequest()
1506
- model.from_json_string(json.dumps(args))
1507
- start_time = time.time()
1508
- while True:
1509
- rsp = client.DescribeEndPointRegion(model)
1510
- result = rsp.to_json_string()
1511
- try:
1512
- json_obj = json.loads(result)
1513
- except TypeError as e:
1514
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1515
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1516
- break
1517
- cur_time = time.time()
1518
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1519
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1520
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1521
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1522
- else:
1523
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1524
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1525
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
-
1527
-
1528
- def doDescribeForwardRuleList(args, parsed_globals):
1529
- g_param = parse_global_arg(parsed_globals)
1530
-
1531
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1532
- cred = credential.CVMRoleCredential()
1533
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1534
- cred = credential.STSAssumeRoleCredential(
1535
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1536
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1537
- )
1538
- 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):
1539
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1540
- else:
1541
- cred = credential.Credential(
1542
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1543
- )
1544
- http_profile = HttpProfile(
1545
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1546
- reqMethod="POST",
1547
- endpoint=g_param[OptionsDefine.Endpoint],
1548
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1549
- )
1550
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1551
- if g_param[OptionsDefine.Language]:
1552
- profile.language = g_param[OptionsDefine.Language]
1553
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1554
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1555
- client._sdkVersion += ("_CLI_" + __version__)
1556
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.DescribeForwardRuleListRequest()
1558
- model.from_json_string(json.dumps(args))
1559
- start_time = time.time()
1560
- while True:
1561
- rsp = client.DescribeForwardRuleList(model)
1562
- result = rsp.to_json_string()
1563
- try:
1564
- json_obj = json.loads(result)
1565
- except TypeError as e:
1566
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1567
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1568
- break
1569
- cur_time = time.time()
1570
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1571
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1572
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1573
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1574
- else:
1575
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1576
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1577
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
-
1579
-
1580
- def doDescribePrivateZoneRecordList(args, parsed_globals):
1581
- g_param = parse_global_arg(parsed_globals)
1582
-
1583
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1584
- cred = credential.CVMRoleCredential()
1585
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1586
- cred = credential.STSAssumeRoleCredential(
1587
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1588
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1589
- )
1590
- 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):
1591
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1592
- else:
1593
- cred = credential.Credential(
1594
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1595
- )
1596
- http_profile = HttpProfile(
1597
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1598
- reqMethod="POST",
1599
- endpoint=g_param[OptionsDefine.Endpoint],
1600
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1601
- )
1602
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1603
- if g_param[OptionsDefine.Language]:
1604
- profile.language = g_param[OptionsDefine.Language]
1605
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1606
- client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1607
- client._sdkVersion += ("_CLI_" + __version__)
1608
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
- model = models.DescribePrivateZoneRecordListRequest()
1610
- model.from_json_string(json.dumps(args))
1611
- start_time = time.time()
1612
- while True:
1613
- rsp = client.DescribePrivateZoneRecordList(model)
1614
- result = rsp.to_json_string()
1615
- try:
1616
- json_obj = json.loads(result)
1617
- except TypeError as e:
1618
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1619
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1620
- break
1621
- cur_time = time.time()
1622
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1623
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1624
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1625
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1626
- else:
1627
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1628
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1629
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
-
1631
-
1632
1112
  def doDeletePrivateZoneRecord(args, parsed_globals):
1633
1113
  g_param = parse_global_arg(parsed_globals)
1634
1114
 
@@ -1798,35 +1278,25 @@ MODELS_MAP = {
1798
1278
  ACTION_MAP = {
1799
1279
  "CreatePrivateDNSAccount": doCreatePrivateDNSAccount,
1800
1280
  "DescribePrivateZone": doDescribePrivateZone,
1801
- "DeleteEndPoint": doDeleteEndPoint,
1281
+ "DescribePrivateZoneRecordList": doDescribePrivateZoneRecordList,
1802
1282
  "DescribeQuotaUsage": doDescribeQuotaUsage,
1803
1283
  "DescribeAuditLog": doDescribeAuditLog,
1804
1284
  "CreatePrivateZoneRecord": doCreatePrivateZoneRecord,
1805
- "DescribeEndPointList": doDescribeEndPointList,
1806
1285
  "CreatePrivateZone": doCreatePrivateZone,
1807
1286
  "DescribePrivateZoneList": doDescribePrivateZoneList,
1808
- "CreateEndPoint": doCreateEndPoint,
1809
1287
  "AddSpecifyPrivateZoneVpc": doAddSpecifyPrivateZoneVpc,
1810
- "ModifyForwardRule": doModifyForwardRule,
1811
1288
  "QueryAsyncBindVpcStatus": doQueryAsyncBindVpcStatus,
1812
1289
  "ModifyPrivateZone": doModifyPrivateZone,
1813
1290
  "ModifyPrivateZoneRecord": doModifyPrivateZoneRecord,
1814
1291
  "DeletePrivateDNSAccount": doDeletePrivateDNSAccount,
1815
- "DeleteForwardRule": doDeleteForwardRule,
1816
1292
  "SubscribePrivateZoneService": doSubscribePrivateZoneService,
1817
1293
  "DescribeDashboard": doDescribeDashboard,
1818
1294
  "ModifyPrivateZoneVpc": doModifyPrivateZoneVpc,
1819
1295
  "DeletePrivateZone": doDeletePrivateZone,
1820
1296
  "DescribeAccountVpcList": doDescribeAccountVpcList,
1821
- "CreateEndPointAndEndPointService": doCreateEndPointAndEndPointService,
1822
1297
  "ModifyRecordsStatus": doModifyRecordsStatus,
1823
1298
  "DeleteSpecifyPrivateZoneVpc": doDeleteSpecifyPrivateZoneVpc,
1824
- "DescribeForwardRule": doDescribeForwardRule,
1825
- "CreateForwardRule": doCreateForwardRule,
1826
1299
  "DescribePrivateZoneService": doDescribePrivateZoneService,
1827
- "DescribeEndPointRegion": doDescribeEndPointRegion,
1828
- "DescribeForwardRuleList": doDescribeForwardRuleList,
1829
- "DescribePrivateZoneRecordList": doDescribePrivateZoneRecordList,
1830
1300
  "DeletePrivateZoneRecord": doDeletePrivateZoneRecord,
1831
1301
  "DescribeRequestData": doDescribeRequestData,
1832
1302
  "DescribePrivateDNSAccountList": doDescribePrivateDNSAccountList,