tccli 3.0.1128.1__py2.py3-none-any.whl → 3.0.1130.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 (51) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +1 -1
  3. tccli/services/billing/v20180709/api.json +3 -2
  4. tccli/services/bpaas/v20181217/api.json +5 -0
  5. tccli/services/cat/v20180409/api.json +1 -0
  6. tccli/services/cdwdoris/v20211228/api.json +20 -0
  7. tccli/services/ciam/v20220331/api.json +92 -104
  8. tccli/services/cls/v20201016/api.json +5 -5
  9. tccli/services/cynosdb/v20190107/api.json +5 -3
  10. tccli/services/dc/v20180410/api.json +139 -121
  11. tccli/services/dc/v20180410/examples.json +6 -6
  12. tccli/services/es/v20180416/api.json +10 -0
  13. tccli/services/ess/v20201111/api.json +5 -5
  14. tccli/services/essbasic/v20210526/api.json +54 -3
  15. tccli/services/essbasic/v20210526/examples.json +2 -2
  16. tccli/services/hunyuan/v20230901/api.json +4 -4
  17. tccli/services/lighthouse/v20200324/api.json +2 -4
  18. tccli/services/monitor/v20180724/api.json +29 -16
  19. tccli/services/mps/v20190612/api.json +122 -4
  20. tccli/services/mrs/v20200910/api.json +315 -65
  21. tccli/services/ocr/v20181119/api.json +1 -1
  22. tccli/services/organization/v20210331/api.json +28 -0
  23. tccli/services/rce/v20201103/api.json +9 -9
  24. tccli/services/redis/redis_client.py +220 -8
  25. tccli/services/redis/v20180412/api.json +254 -28
  26. tccli/services/redis/v20180412/examples.json +36 -4
  27. tccli/services/ssl/v20191205/api.json +63 -38
  28. tccli/services/ssl/v20191205/examples.json +1 -1
  29. tccli/services/tcm/v20210413/api.json +75 -22
  30. tccli/services/tcm/v20210413/examples.json +1 -1
  31. tccli/services/tcr/v20190924/api.json +8 -8
  32. tccli/services/tcr/v20190924/examples.json +1 -1
  33. tccli/services/tdmq/v20200217/api.json +31 -18
  34. tccli/services/tdmq/v20200217/examples.json +8 -8
  35. tccli/services/teo/v20220901/api.json +4 -4
  36. tccli/services/tke/v20180525/api.json +67 -53
  37. tccli/services/tke/v20180525/examples.json +12 -12
  38. tccli/services/trtc/v20190722/api.json +2 -2
  39. tccli/services/tse/v20201207/api.json +103 -0
  40. tccli/services/tts/v20190823/api.json +1 -1
  41. tccli/services/waf/v20180125/api.json +109 -0
  42. tccli/services/waf/v20180125/examples.json +14 -0
  43. tccli/services/waf/waf_client.py +61 -8
  44. tccli/services/wedata/v20210820/api.json +177 -1
  45. tccli/services/wedata/v20210820/examples.json +10 -2
  46. tccli/services/wedata/wedata_client.py +53 -0
  47. {tccli-3.0.1128.1.dist-info → tccli-3.0.1130.1.dist-info}/METADATA +2 -2
  48. {tccli-3.0.1128.1.dist-info → tccli-3.0.1130.1.dist-info}/RECORD +51 -51
  49. {tccli-3.0.1128.1.dist-info → tccli-3.0.1130.1.dist-info}/WHEEL +0 -0
  50. {tccli-3.0.1128.1.dist-info → tccli-3.0.1130.1.dist-info}/entry_points.txt +0 -0
  51. {tccli-3.0.1128.1.dist-info → tccli-3.0.1130.1.dist-info}/license_files/LICENSE +0 -0
@@ -6054,7 +6054,7 @@
6054
6054
  },
6055
6055
  {
6056
6056
  "disabled": false,
6057
- "document": "告警码\n-9101 证件边框不完整告警\n-9102 证件复印件告警\n-9103 证件翻拍告警\n-9107 证件反光告警\n-9108 证件模糊告警\n-9109 告警能力未开通",
6057
+ "document": "告警码\n-9101 证件边框不完整告警\n-9102 证件复印件告警\n-9103 证件翻拍告警\n-9104 证件PS告警\n-9107 证件反光告警\n-9108 证件模糊告警\n-9109 告警能力未开通",
6058
6058
  "example": "[-9101]",
6059
6059
  "member": "int64",
6060
6060
  "name": "WarnCardInfos",
@@ -628,6 +628,15 @@
628
628
  "name": "Description",
629
629
  "required": false,
630
630
  "type": "string"
631
+ },
632
+ {
633
+ "disabled": false,
634
+ "document": "共享范围。取值:1-仅允许集团组织内共享 2-允许共享给任意账号,默认值:1",
635
+ "example": "1",
636
+ "member": "uint64",
637
+ "name": "ShareScope",
638
+ "required": false,
639
+ "type": "int"
631
640
  }
632
641
  ],
633
642
  "type": "object"
@@ -4140,6 +4149,16 @@
4140
4149
  "output_required": true,
4141
4150
  "type": "int",
4142
4151
  "value_allowed_null": true
4152
+ },
4153
+ {
4154
+ "disabled": false,
4155
+ "document": "共享范围。取值:1-仅允许集团组织内共享 2-允许共享给任意账号\n注意:此字段可能返回 null,表示取不到有效值。",
4156
+ "example": "1",
4157
+ "member": "uint64",
4158
+ "name": "ShareScope",
4159
+ "output_required": false,
4160
+ "type": "int",
4161
+ "value_allowed_null": true
4143
4162
  }
4144
4163
  ],
4145
4164
  "usage": "out"
@@ -5744,6 +5763,15 @@
5744
5763
  "name": "Description",
5745
5764
  "required": false,
5746
5765
  "type": "string"
5766
+ },
5767
+ {
5768
+ "disabled": false,
5769
+ "document": "共享范围。取值:1-仅允许集团组织内共享 2-允许共享给任意账号,默认值:1",
5770
+ "example": "1",
5771
+ "member": "uint64",
5772
+ "name": "ShareScope",
5773
+ "required": false,
5774
+ "type": "int"
5747
5775
  }
5748
5776
  ],
5749
5777
  "type": "object"
@@ -20,7 +20,7 @@
20
20
  "members": [
21
21
  {
22
22
  "disabled": false,
23
- "document": "用户账号类型;默认开通QQOpenId、手机号MD5权限;如果需要使用微信OpenId入参,则需要\"提交工单\"或联系对接人进行资格审核,审核通过后方可正常使用微信开放账号。\n1:QQ开放账号\n2:微信开放账号\n10004:手机号MD5,中国大陆11位手机号进行MD5加密,取32位小写值。",
23
+ "document": "用户账号类型;默认开通QQOpenId、手机号MD5权限;如果需要使用微信OpenId入参,则需要\"提交工单\"或联系对接人进行资格审核,审核通过后方可正常使用微信开放账号。\n1:QQ开放账号\n2:微信开放账号\n10004:手机号MD5,中国大陆11位手机号进行MD5加密,取32位小写值\n10005:手机号SHA256,中国大陆11位手机号进行SHA256加密,取64位小写值",
24
24
  "example": "10004",
25
25
  "member": "uint64",
26
26
  "name": "AccountType",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  {
49
49
  "disabled": false,
50
- "document": "其它账号信息,AccountType是10004时,该字段必填。",
50
+ "document": "其它账号信息,AccountType是10004或10005时,该字段必填。",
51
51
  "example": " 3ac9aa8a9a0074918763bfd6ed526ed9",
52
52
  "member": "OtherAccountInfo",
53
53
  "name": "OtherAccount",
@@ -124,7 +124,7 @@
124
124
  "members": [
125
125
  {
126
126
  "disabled": false,
127
- "document": "用户账号类型;默认开通QQOpenId、手机号MD5权限;如果需要使用微信OpenId入参,则需要\"提交工单\"或联系对接人进行资格审核,审核通过后方可正常使用微信开放账号。\n1:QQ开放账号\n2:微信开放账号\n10004:手机号MD5,中国大陆11位手机号进行MD5加密,取32位小写值。",
127
+ "document": "用户账号类型;默认开通QQOpenId、手机号MD5权限;如果需要使用微信OpenId入参,则需要\"提交工单\"或联系对接人进行资格审核,审核通过后方可正常使用微信开放账号。\n1:QQ开放账号\n2:微信开放账号\n10004:手机号MD5,中国大陆11位手机号进行MD5加密,取32位小写值\n10005:手机号SHA256,中国大陆11位手机号进行SHA256加密,取64位小写值",
128
128
  "example": "AccountInfo.AccountType= 10004",
129
129
  "member": "AccountInfo",
130
130
  "name": "Account",
@@ -430,7 +430,7 @@
430
430
  "members": [
431
431
  {
432
432
  "disabled": false,
433
- "document": "其他账号信息;\nAccountType是10004时,填入中国大陆标准11位手机号的MD5值\n注释:\nMD5手机号加密方式,使用中国大陆11位手机号进行MD5加密,加密后取32位小写值。",
433
+ "document": "其他账号信息;\nAccountType是10004时,填入中国大陆标准11位手机号的MD5值\nAccountType是10005时,填入中国大陆标准11位手机号的SHA256值\n注释:\nMD5手机号加密方式,使用中国大陆11位手机号进行MD5加密,加密后取32位小写值。\nSHA256手机号加密方式,使用中国大陆11位手机号进行SHA256加密,加密后取64位小写值。",
434
434
  "example": "无",
435
435
  "member": "string",
436
436
  "name": "AccountId",
@@ -439,7 +439,7 @@
439
439
  },
440
440
  {
441
441
  "disabled": false,
442
- "document": "账号绑定的MD5手机号。\n注释:只支持标准中国大陆11位手机号MD5加密后位的32位小写字符串。",
442
+ "document": "账号绑定的MD5或SHA256加密的手机号(该字段已不推荐使用)。\n注释:支持标准中国大陆11位手机号MD5加密后位的32位小写字符串;\n 支持标准中国大陆11位手机号SHA256加密后位的64位小写字符串。",
443
443
  "example": "无",
444
444
  "member": "string",
445
445
  "name": "MobilePhone",
@@ -448,7 +448,7 @@
448
448
  },
449
449
  {
450
450
  "disabled": false,
451
- "document": "用户设备号(已不推荐使用)。",
451
+ "document": "用户设备号(该字段已不推荐使用)。",
452
452
  "example": "无",
453
453
  "member": "string",
454
454
  "name": "DeviceId",
@@ -509,7 +509,7 @@
509
509
  "members": [
510
510
  {
511
511
  "disabled": false,
512
- "document": "账号ID:对应输入参数。\n当AccountType为1时,对应QQ的OpenId。\n当AccountType为2时,对应微信的OpenId/UnionId。\n当AccountType为10004时,对应手机号的MD5值。\n注意:此字段可能返回 null,表示取不到有效值。",
512
+ "document": "账号ID:对应输入参数。\n当AccountType为1时,对应QQ的OpenId;\n当AccountType为2时,对应微信的OpenId/UnionId;\n当AccountType为10004时,对应手机号的MD5值;\n当AccountType为10005时,对应手机号的SHA256值。\n注意:此字段可能返回 null,表示取不到有效值。",
513
513
  "example": "3ac9aa8a9a0074918763bfd6ed526ed9",
514
514
  "member": "string",
515
515
  "name": "UserId",
@@ -622,7 +622,7 @@
622
622
  },
623
623
  {
624
624
  "disabled": false,
625
- "document": "账号绑定的MD5手机号,\n注释:只支中国大陆11位手机号MD5加密后位的32位小写字符串。",
625
+ "document": "账号绑定的MD5或SHA256加密的手机号。\n注释:支持标准中国大陆11位手机号MD5加密后位的32位小写字符串;\n 支持标准中国大陆11位手机号SHA256加密后位的64位小写字符串。",
626
626
  "example": "无",
627
627
  "member": "string",
628
628
  "name": "MobilePhone",
@@ -742,7 +742,7 @@
742
742
  },
743
743
  {
744
744
  "disabled": false,
745
- "document": "账号绑定的MD5手机号,\n注释:只支持标准中国大陆11位手机号MD5加密后位的32位小写字符串。",
745
+ "document": "账号绑定的MD5或SHA256加密的手机号。\n注释:支持标准中国大陆11位手机号MD5加密后位的32位小写字符串;\n 支持标准中国大陆11位手机号SHA256加密后位的64位小写字符串。",
746
746
  "example": "无",
747
747
  "member": "string",
748
748
  "name": "MobilePhone",
@@ -225,7 +225,7 @@ def doDeleteReplicationInstance(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doCleanUpInstance(args, parsed_globals):
228
+ def doDescribeGlobalReplicationArea(args, parsed_globals):
229
229
  g_param = parse_global_arg(parsed_globals)
230
230
 
231
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +254,11 @@ def doCleanUpInstance(args, parsed_globals):
254
254
  client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.CleanUpInstanceRequest()
257
+ model = models.DescribeGlobalReplicationAreaRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.CleanUpInstance(model)
261
+ rsp = client.DescribeGlobalReplicationArea(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -901,6 +901,58 @@ def doUpgradeVersionToMultiAvailabilityZones(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
+ def doCleanUpInstance(args, parsed_globals):
905
+ g_param = parse_global_arg(parsed_globals)
906
+
907
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
908
+ cred = credential.CVMRoleCredential()
909
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
910
+ cred = credential.STSAssumeRoleCredential(
911
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
912
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
913
+ )
914
+ 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):
915
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
916
+ else:
917
+ cred = credential.Credential(
918
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
919
+ )
920
+ http_profile = HttpProfile(
921
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
922
+ reqMethod="POST",
923
+ endpoint=g_param[OptionsDefine.Endpoint],
924
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
925
+ )
926
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
927
+ if g_param[OptionsDefine.Language]:
928
+ profile.language = g_param[OptionsDefine.Language]
929
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
930
+ client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
931
+ client._sdkVersion += ("_CLI_" + __version__)
932
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
+ model = models.CleanUpInstanceRequest()
934
+ model.from_json_string(json.dumps(args))
935
+ start_time = time.time()
936
+ while True:
937
+ rsp = client.CleanUpInstance(model)
938
+ result = rsp.to_json_string()
939
+ try:
940
+ json_obj = json.loads(result)
941
+ except TypeError as e:
942
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
943
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
944
+ break
945
+ cur_time = time.time()
946
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
947
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
948
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
949
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
950
+ else:
951
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
952
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
953
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
+
955
+
904
956
  def doModifyInstanceParams(args, parsed_globals):
905
957
  g_param = parse_global_arg(parsed_globals)
906
958
 
@@ -2253,6 +2305,58 @@ def doInquiryPriceCreateInstance(args, parsed_globals):
2253
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2306
 
2255
2307
 
2308
+ def doModifyReplicationGroup(args, parsed_globals):
2309
+ g_param = parse_global_arg(parsed_globals)
2310
+
2311
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2312
+ cred = credential.CVMRoleCredential()
2313
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2314
+ cred = credential.STSAssumeRoleCredential(
2315
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2316
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2317
+ )
2318
+ 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):
2319
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2320
+ else:
2321
+ cred = credential.Credential(
2322
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2323
+ )
2324
+ http_profile = HttpProfile(
2325
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2326
+ reqMethod="POST",
2327
+ endpoint=g_param[OptionsDefine.Endpoint],
2328
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2329
+ )
2330
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2331
+ if g_param[OptionsDefine.Language]:
2332
+ profile.language = g_param[OptionsDefine.Language]
2333
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2334
+ client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
2335
+ client._sdkVersion += ("_CLI_" + __version__)
2336
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2337
+ model = models.ModifyReplicationGroupRequest()
2338
+ model.from_json_string(json.dumps(args))
2339
+ start_time = time.time()
2340
+ while True:
2341
+ rsp = client.ModifyReplicationGroup(model)
2342
+ result = rsp.to_json_string()
2343
+ try:
2344
+ json_obj = json.loads(result)
2345
+ except TypeError as e:
2346
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2347
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2348
+ break
2349
+ cur_time = time.time()
2350
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2351
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2352
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2353
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2354
+ else:
2355
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2356
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2357
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2358
+
2359
+
2256
2360
  def doDescribeInstanceSupportFeature(args, parsed_globals):
2257
2361
  g_param = parse_global_arg(parsed_globals)
2258
2362
 
@@ -2565,6 +2669,58 @@ def doManualBackupInstance(args, parsed_globals):
2565
2669
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
2670
 
2567
2671
 
2672
+ def doDescribeInstanceSpecBandwidth(args, parsed_globals):
2673
+ g_param = parse_global_arg(parsed_globals)
2674
+
2675
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2676
+ cred = credential.CVMRoleCredential()
2677
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2678
+ cred = credential.STSAssumeRoleCredential(
2679
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2680
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2681
+ )
2682
+ 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):
2683
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2684
+ else:
2685
+ cred = credential.Credential(
2686
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2687
+ )
2688
+ http_profile = HttpProfile(
2689
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2690
+ reqMethod="POST",
2691
+ endpoint=g_param[OptionsDefine.Endpoint],
2692
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2693
+ )
2694
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2695
+ if g_param[OptionsDefine.Language]:
2696
+ profile.language = g_param[OptionsDefine.Language]
2697
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2698
+ client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
2699
+ client._sdkVersion += ("_CLI_" + __version__)
2700
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2701
+ model = models.DescribeInstanceSpecBandwidthRequest()
2702
+ model.from_json_string(json.dumps(args))
2703
+ start_time = time.time()
2704
+ while True:
2705
+ rsp = client.DescribeInstanceSpecBandwidth(model)
2706
+ result = rsp.to_json_string()
2707
+ try:
2708
+ json_obj = json.loads(result)
2709
+ except TypeError as e:
2710
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2711
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2712
+ break
2713
+ cur_time = time.time()
2714
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2715
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2716
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2717
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2718
+ else:
2719
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2720
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2721
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2722
+
2723
+
2568
2724
  def doSwitchProxy(args, parsed_globals):
2569
2725
  g_param = parse_global_arg(parsed_globals)
2570
2726
 
@@ -4489,7 +4645,7 @@ def doDescribeBandwidthRange(args, parsed_globals):
4489
4645
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4490
4646
 
4491
4647
 
4492
- def doDescribeInstanceDealDetail(args, parsed_globals):
4648
+ def doDescribeReplicationGroupInstance(args, parsed_globals):
4493
4649
  g_param = parse_global_arg(parsed_globals)
4494
4650
 
4495
4651
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4518,11 +4674,11 @@ def doDescribeInstanceDealDetail(args, parsed_globals):
4518
4674
  client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
4519
4675
  client._sdkVersion += ("_CLI_" + __version__)
4520
4676
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4521
- model = models.DescribeInstanceDealDetailRequest()
4677
+ model = models.DescribeReplicationGroupInstanceRequest()
4522
4678
  model.from_json_string(json.dumps(args))
4523
4679
  start_time = time.time()
4524
4680
  while True:
4525
- rsp = client.DescribeInstanceDealDetail(model)
4681
+ rsp = client.DescribeReplicationGroupInstance(model)
4526
4682
  result = rsp.to_json_string()
4527
4683
  try:
4528
4684
  json_obj = json.loads(result)
@@ -4645,6 +4801,58 @@ def doModifyInstanceAvailabilityZones(args, parsed_globals):
4645
4801
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4646
4802
 
4647
4803
 
4804
+ def doDescribeInstanceDealDetail(args, parsed_globals):
4805
+ g_param = parse_global_arg(parsed_globals)
4806
+
4807
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4808
+ cred = credential.CVMRoleCredential()
4809
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4810
+ cred = credential.STSAssumeRoleCredential(
4811
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4812
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4813
+ )
4814
+ 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):
4815
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4816
+ else:
4817
+ cred = credential.Credential(
4818
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4819
+ )
4820
+ http_profile = HttpProfile(
4821
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4822
+ reqMethod="POST",
4823
+ endpoint=g_param[OptionsDefine.Endpoint],
4824
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4825
+ )
4826
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4827
+ if g_param[OptionsDefine.Language]:
4828
+ profile.language = g_param[OptionsDefine.Language]
4829
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4830
+ client = mod.RedisClient(cred, g_param[OptionsDefine.Region], profile)
4831
+ client._sdkVersion += ("_CLI_" + __version__)
4832
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4833
+ model = models.DescribeInstanceDealDetailRequest()
4834
+ model.from_json_string(json.dumps(args))
4835
+ start_time = time.time()
4836
+ while True:
4837
+ rsp = client.DescribeInstanceDealDetail(model)
4838
+ result = rsp.to_json_string()
4839
+ try:
4840
+ json_obj = json.loads(result)
4841
+ except TypeError as e:
4842
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4843
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4844
+ break
4845
+ cur_time = time.time()
4846
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4847
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4848
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4849
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4850
+ else:
4851
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4852
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4853
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4854
+
4855
+
4648
4856
  def doModifyDBInstanceSecurityGroups(args, parsed_globals):
4649
4857
  g_param = parse_global_arg(parsed_globals)
4650
4858
 
@@ -5128,7 +5336,7 @@ ACTION_MAP = {
5128
5336
  "DescribeInstanceMonitorBigKeySizeDist": doDescribeInstanceMonitorBigKeySizeDist,
5129
5337
  "DescribeTaskList": doDescribeTaskList,
5130
5338
  "DeleteReplicationInstance": doDeleteReplicationInstance,
5131
- "CleanUpInstance": doCleanUpInstance,
5339
+ "DescribeGlobalReplicationArea": doDescribeGlobalReplicationArea,
5132
5340
  "DescribeInstanceAccount": doDescribeInstanceAccount,
5133
5341
  "SwitchAccessNewInstance": doSwitchAccessNewInstance,
5134
5342
  "ChangeReplicaToMaster": doChangeReplicaToMaster,
@@ -5141,6 +5349,7 @@ ACTION_MAP = {
5141
5349
  "DescribeInstanceSecurityGroup": doDescribeInstanceSecurityGroup,
5142
5350
  "DescribeBackupDetail": doDescribeBackupDetail,
5143
5351
  "UpgradeVersionToMultiAvailabilityZones": doUpgradeVersionToMultiAvailabilityZones,
5352
+ "CleanUpInstance": doCleanUpInstance,
5144
5353
  "ModifyInstanceParams": doModifyInstanceParams,
5145
5354
  "ClearInstance": doClearInstance,
5146
5355
  "AllocateWanAddress": doAllocateWanAddress,
@@ -5167,12 +5376,14 @@ ACTION_MAP = {
5167
5376
  "DescribeTendisSlowLog": doDescribeTendisSlowLog,
5168
5377
  "ModifyParamTemplate": doModifyParamTemplate,
5169
5378
  "InquiryPriceCreateInstance": doInquiryPriceCreateInstance,
5379
+ "ModifyReplicationGroup": doModifyReplicationGroup,
5170
5380
  "DescribeInstanceSupportFeature": doDescribeInstanceSupportFeature,
5171
5381
  "DescribeInstanceParams": doDescribeInstanceParams,
5172
5382
  "DescribeInstanceMonitorBigKeyTypeDist": doDescribeInstanceMonitorBigKeyTypeDist,
5173
5383
  "ReleaseWanAddress": doReleaseWanAddress,
5174
5384
  "ModifyConnectionConfig": doModifyConnectionConfig,
5175
5385
  "ManualBackupInstance": doManualBackupInstance,
5386
+ "DescribeInstanceSpecBandwidth": doDescribeInstanceSpecBandwidth,
5176
5387
  "SwitchProxy": doSwitchProxy,
5177
5388
  "RestoreInstance": doRestoreInstance,
5178
5389
  "DescribeInstanceParamRecords": doDescribeInstanceParamRecords,
@@ -5210,9 +5421,10 @@ ACTION_MAP = {
5210
5421
  "OpenSSL": doOpenSSL,
5211
5422
  "DescribeAutoBackupConfig": doDescribeAutoBackupConfig,
5212
5423
  "DescribeBandwidthRange": doDescribeBandwidthRange,
5213
- "DescribeInstanceDealDetail": doDescribeInstanceDealDetail,
5424
+ "DescribeReplicationGroupInstance": doDescribeReplicationGroupInstance,
5214
5425
  "DescribeProxySlowLog": doDescribeProxySlowLog,
5215
5426
  "ModifyInstanceAvailabilityZones": doModifyInstanceAvailabilityZones,
5427
+ "DescribeInstanceDealDetail": doDescribeInstanceDealDetail,
5216
5428
  "ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups,
5217
5429
  "ChangeMasterInstance": doChangeMasterInstance,
5218
5430
  "UpgradeInstance": doUpgradeInstance,