tccli 3.0.1371.1__py2.py3-none-any.whl → 3.0.1373.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/batch/v20170312/api.json +59 -59
  3. tccli/services/batch/v20170312/examples.json +3 -3
  4. tccli/services/cfg/v20210820/api.json +5 -5
  5. tccli/services/cfg/v20210820/examples.json +1 -1
  6. tccli/services/cfs/v20190719/api.json +10 -10
  7. tccli/services/cfs/v20190719/examples.json +1 -1
  8. tccli/services/ckafka/v20190819/api.json +21 -21
  9. tccli/services/clb/v20180317/api.json +259 -10
  10. tccli/services/cls/v20201016/api.json +388 -282
  11. tccli/services/cls/v20201016/examples.json +33 -33
  12. tccli/services/csip/v20221121/examples.json +1 -1
  13. tccli/services/ctem/v20231128/api.json +104 -104
  14. tccli/services/ctem/v20231128/examples.json +8 -8
  15. tccli/services/dnspod/v20210323/api.json +14 -4
  16. tccli/services/dnspod/v20210323/examples.json +2 -2
  17. tccli/services/es/v20180416/api.json +23 -4
  18. tccli/services/ess/v20201111/api.json +3 -3
  19. tccli/services/essbasic/v20210526/api.json +4 -4
  20. tccli/services/iai/v20200303/api.json +9 -0
  21. tccli/services/keewidb/v20220308/api.json +24 -24
  22. tccli/services/lcic/v20220817/api.json +46 -18
  23. tccli/services/lighthouse/lighthouse_client.py +106 -0
  24. tccli/services/lighthouse/v20200324/api.json +280 -0
  25. tccli/services/lighthouse/v20200324/examples.json +22 -0
  26. tccli/services/live/v20180801/api.json +1 -1
  27. tccli/services/lke/lke_client.py +0 -53
  28. tccli/services/lke/v20231130/api.json +29 -79
  29. tccli/services/lke/v20231130/examples.json +0 -8
  30. tccli/services/mongodb/v20190725/api.json +4 -4
  31. tccli/services/monitor/v20180724/api.json +7 -7
  32. tccli/services/mps/v20190612/api.json +42 -2
  33. tccli/services/ocr/v20181119/api.json +43 -14
  34. tccli/services/organization/v20210331/api.json +25 -25
  35. tccli/services/organization/v20210331/examples.json +1 -1
  36. tccli/services/postgres/postgres_client.py +12 -171
  37. tccli/services/postgres/v20170312/api.json +20 -819
  38. tccli/services/postgres/v20170312/examples.json +6 -30
  39. tccli/services/scf/v20180416/api.json +2 -0
  40. tccli/services/ssl/v20191205/api.json +1 -1
  41. tccli/services/sts/v20180813/api.json +4 -4
  42. tccli/services/tcbr/v20220217/api.json +92 -0
  43. tccli/services/tcss/v20201101/api.json +32 -2
  44. tccli/services/tcss/v20201101/examples.json +3 -3
  45. tccli/services/teo/v20220901/api.json +12 -12
  46. tccli/services/tione/v20211111/api.json +18 -18
  47. tccli/services/tke/v20180525/api.json +10 -1
  48. tccli/services/tms/v20201229/api.json +6 -6
  49. tccli/services/trabbit/v20230418/api.json +41 -2
  50. tccli/services/trocket/trocket_client.py +65 -12
  51. tccli/services/trocket/v20230308/api.json +156 -0
  52. tccli/services/trocket/v20230308/examples.json +8 -0
  53. tccli/services/trtc/trtc_client.py +159 -0
  54. tccli/services/trtc/v20190722/api.json +273 -9
  55. tccli/services/trtc/v20190722/examples.json +24 -0
  56. tccli/services/tse/v20201207/api.json +23 -5
  57. tccli/services/tse/v20201207/examples.json +2 -2
  58. tccli/services/tsf/v20180326/api.json +907 -802
  59. tccli/services/tsf/v20180326/examples.json +29 -29
  60. tccli/services/vod/v20180717/api.json +73 -33
  61. tccli/services/vod/v20180717/examples.json +1 -1
  62. tccli/services/vpc/v20170312/api.json +12 -2
  63. tccli/services/vpc/v20170312/examples.json +2 -2
  64. tccli/services/waf/v20180125/api.json +717 -38
  65. tccli/services/waf/v20180125/examples.json +56 -0
  66. tccli/services/waf/waf_client.py +444 -73
  67. tccli/services/wedata/v20210820/api.json +138 -6
  68. tccli/services/wsa/v20250508/api.json +21 -3
  69. {tccli-3.0.1371.1.dist-info → tccli-3.0.1373.1.dist-info}/METADATA +2 -2
  70. {tccli-3.0.1371.1.dist-info → tccli-3.0.1373.1.dist-info}/RECORD +73 -73
  71. {tccli-3.0.1371.1.dist-info → tccli-3.0.1373.1.dist-info}/WHEEL +0 -0
  72. {tccli-3.0.1371.1.dist-info → tccli-3.0.1373.1.dist-info}/entry_points.txt +0 -0
  73. {tccli-3.0.1371.1.dist-info → tccli-3.0.1373.1.dist-info}/license_files/LICENSE +0 -0
@@ -4720,7 +4720,7 @@
4720
4720
  "members": [
4721
4721
  {
4722
4722
  "disabled": false,
4723
- "document": "地域",
4723
+ "document": "共享地域。可通过接口[DescribeShareAreas](https://cloud.tencent.com/document/product/850/103050)获取支持共享的地域。",
4724
4724
  "example": "ap-guangzhou",
4725
4725
  "member": "string",
4726
4726
  "name": "Area",
@@ -4729,7 +4729,7 @@
4729
4729
  },
4730
4730
  {
4731
4731
  "disabled": false,
4732
- "document": "偏移量",
4732
+ "document": "偏移量。取值是limit的整数倍。默认值 : 0。",
4733
4733
  "example": "0",
4734
4734
  "member": "uint64",
4735
4735
  "name": "Offset",
@@ -4738,7 +4738,7 @@
4738
4738
  },
4739
4739
  {
4740
4740
  "disabled": false,
4741
- "document": "每页条数",
4741
+ "document": "限制数目。取值范围:1~50。",
4742
4742
  "example": "10",
4743
4743
  "member": "uint64",
4744
4744
  "name": "Limit",
@@ -4747,7 +4747,7 @@
4747
4747
  },
4748
4748
  {
4749
4749
  "disabled": false,
4750
- "document": "搜索关键字,支持业务资源ID搜索",
4750
+ "document": "搜索关键字,支持业务资源ID搜索。",
4751
4751
  "example": "sec***002",
4752
4752
  "member": "string",
4753
4753
  "name": "SearchKey",
@@ -4756,7 +4756,7 @@
4756
4756
  },
4757
4757
  {
4758
4758
  "disabled": false,
4759
- "document": "资源类型",
4759
+ "document": "共享资源类型。支持共享的资源类型,请参见[资源共享概述](https://cloud.tencent.com/document/product/850/59489)",
4760
4760
  "example": "secret",
4761
4761
  "member": "string",
4762
4762
  "name": "Type",
@@ -11082,73 +11082,73 @@
11082
11082
  "members": [
11083
11083
  {
11084
11084
  "disabled": false,
11085
- "document": "资源ID",
11086
- "example": "shareResource-23kds",
11085
+ "document": "共享单元资源ID",
11086
+ "example": "shareResource-23***kds",
11087
11087
  "member": "string",
11088
11088
  "name": "ResourceId",
11089
- "required": true,
11089
+ "output_required": true,
11090
11090
  "type": "string",
11091
11091
  "value_allowed_null": false
11092
11092
  },
11093
11093
  {
11094
11094
  "disabled": false,
11095
- "document": "资源类型",
11096
- "example": "vpc",
11095
+ "document": "资源类型。",
11096
+ "example": "secret",
11097
11097
  "member": "string",
11098
11098
  "name": "Type",
11099
- "required": true,
11099
+ "output_required": true,
11100
11100
  "type": "string",
11101
11101
  "value_allowed_null": false
11102
11102
  },
11103
11103
  {
11104
11104
  "disabled": false,
11105
- "document": "共享单元ID",
11106
- "example": "shareUnit-1234erte",
11105
+ "document": "共享单元ID",
11106
+ "example": "shareUnit-1a***2erte",
11107
11107
  "member": "string",
11108
11108
  "name": "UnitId",
11109
- "required": true,
11109
+ "output_required": true,
11110
11110
  "type": "string",
11111
11111
  "value_allowed_null": false
11112
11112
  },
11113
11113
  {
11114
11114
  "disabled": false,
11115
- "document": "共享单元名",
11116
- "example": "test",
11115
+ "document": "共享单元名称。",
11116
+ "example": "my-shareunit",
11117
11117
  "member": "string",
11118
11118
  "name": "UnitName",
11119
- "required": true,
11119
+ "output_required": true,
11120
11120
  "type": "string",
11121
11121
  "value_allowed_null": false
11122
11122
  },
11123
11123
  {
11124
11124
  "disabled": false,
11125
- "document": "创建时间",
11125
+ "document": "创建时间。",
11126
11126
  "example": "2021-03-06 11:12:03",
11127
11127
  "member": "string",
11128
11128
  "name": "CreateTime",
11129
- "required": true,
11129
+ "output_required": true,
11130
11130
  "type": "string",
11131
11131
  "value_allowed_null": false
11132
11132
  },
11133
11133
  {
11134
11134
  "disabled": false,
11135
- "document": "业务资源ID",
11136
- "example": "vpc-23kds",
11135
+ "document": "业务资源ID",
11136
+ "example": "sec***002",
11137
11137
  "member": "string",
11138
11138
  "name": "ProductResourceId",
11139
- "required": true,
11139
+ "output_required": true,
11140
11140
  "type": "string",
11141
11141
  "value_allowed_null": false
11142
11142
  },
11143
11143
  {
11144
11144
  "disabled": false,
11145
- "document": "共享管理员uin\n注意:此字段可能返回 null,表示取不到有效值。",
11145
+ "document": "共享账号Uin。",
11146
11146
  "example": "1000001",
11147
11147
  "member": "int64",
11148
11148
  "name": "ShareManagerUin",
11149
- "required": true,
11149
+ "output_required": true,
11150
11150
  "type": "int",
11151
- "value_allowed_null": true
11151
+ "value_allowed_null": false
11152
11152
  }
11153
11153
  ],
11154
11154
  "usage": "out"
@@ -508,7 +508,7 @@
508
508
  {
509
509
  "document": "",
510
510
  "input": "https://organization.tencentcloudapi.com/?Action=DescribeResourceToShareMember\n&Area=guangzhou\n&Offset=0\n&Limit=10\n&<公共请求参数>",
511
- "output": "{\n \"Response\": {\n \"Items\": [\n {\n \"CreateTime\": \"2021-03-06 17:11:30\",\n \"ResourceId\": \"shareResource-ew89er12d\",\n \"ProductResourceId\": \"vpc-ewd23dd\",\n \"Type\": \"vpc\",\n \"UnitId\": \"shareUnit-xhreofra2p\",\n \"UnitName\": \"test\"\n }\n ],\n \"RequestId\": \"34b1919e-ab09-4cc0-8f4b-b35f371c7c58\",\n \"Total\": 1\n }\n}",
511
+ "output": "{\n \"Response\": {\n \"Items\": [\n {\n \"CreateTime\": \"2021-03-06 17:11:30\",\n \"ProductResourceId\": \"sec***002\",\n \"Type\": \"secret\",\n \"UnitId\": \"shareUnit-xh***a2p\",\n \"UnitName\": \"my-shareunit\",\n \"ShareManagerUin\": \"1000001\"\n }\n ],\n \"RequestId\": \"34b1919e-ab09-4cc0-8f4b-b35f371c7c58\",\n \"Total\": 1\n }\n}",
512
512
  "title": "获取与我共享的资源列表"
513
513
  }
514
514
  ],
@@ -17,7 +17,7 @@ from tencentcloud.postgres.v20170312 import models as models_v20170312
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doDescribeTasks(args, parsed_globals):
20
+ def doModifyMaintainTimeWindow(args, parsed_globals):
21
21
  g_param = parse_global_arg(parsed_globals)
22
22
 
23
23
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -46,11 +46,11 @@ def doDescribeTasks(args, parsed_globals):
46
46
  client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.DescribeTasksRequest()
49
+ model = models.ModifyMaintainTimeWindowRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.DescribeTasks(model)
53
+ rsp = client.ModifyMaintainTimeWindow(model)
54
54
  result = rsp.to_json_string()
55
55
  try:
56
56
  json_obj = json.loads(result)
@@ -849,59 +849,7 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals):
849
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
850
 
851
851
 
852
- def doModifyMaintainTimeWindow(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.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
879
- client._sdkVersion += ("_CLI_" + __version__)
880
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.ModifyMaintainTimeWindowRequest()
882
- model.from_json_string(json.dumps(args))
883
- start_time = time.time()
884
- while True:
885
- rsp = client.ModifyMaintainTimeWindow(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
- def doRenewInstance(args, parsed_globals):
852
+ def doDescribeTasks(args, parsed_globals):
905
853
  g_param = parse_global_arg(parsed_globals)
906
854
 
907
855
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +878,11 @@ def doRenewInstance(args, parsed_globals):
930
878
  client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
931
879
  client._sdkVersion += ("_CLI_" + __version__)
932
880
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.RenewInstanceRequest()
881
+ model = models.DescribeTasksRequest()
934
882
  model.from_json_string(json.dumps(args))
935
883
  start_time = time.time()
936
884
  while True:
937
- rsp = client.RenewInstance(model)
885
+ rsp = client.DescribeTasks(model)
938
886
  result = rsp.to_json_string()
939
887
  try:
940
888
  json_obj = json.loads(result)
@@ -1109,58 +1057,6 @@ def doDescribeProductConfig(args, parsed_globals):
1109
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
1058
 
1111
1059
 
1112
- def doDescribeDBSlowlogs(args, parsed_globals):
1113
- g_param = parse_global_arg(parsed_globals)
1114
-
1115
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1116
- cred = credential.CVMRoleCredential()
1117
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1118
- cred = credential.STSAssumeRoleCredential(
1119
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1120
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1121
- )
1122
- elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1123
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1124
- else:
1125
- cred = credential.Credential(
1126
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1127
- )
1128
- http_profile = HttpProfile(
1129
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1130
- reqMethod="POST",
1131
- endpoint=g_param[OptionsDefine.Endpoint],
1132
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1133
- )
1134
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1135
- if g_param[OptionsDefine.Language]:
1136
- profile.language = g_param[OptionsDefine.Language]
1137
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1138
- client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
1139
- client._sdkVersion += ("_CLI_" + __version__)
1140
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
- model = models.DescribeDBSlowlogsRequest()
1142
- model.from_json_string(json.dumps(args))
1143
- start_time = time.time()
1144
- while True:
1145
- rsp = client.DescribeDBSlowlogs(model)
1146
- result = rsp.to_json_string()
1147
- try:
1148
- json_obj = json.loads(result)
1149
- except TypeError as e:
1150
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1151
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1152
- break
1153
- cur_time = time.time()
1154
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1155
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1156
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1157
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1158
- else:
1159
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1160
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1161
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
-
1163
-
1164
1060
  def doDescribeAccountPrivileges(args, parsed_globals):
1165
1061
  g_param = parse_global_arg(parsed_globals)
1166
1062
 
@@ -1785,7 +1681,7 @@ def doModifyDBInstanceDeployment(args, parsed_globals):
1785
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1786
1682
 
1787
1683
 
1788
- def doCreateServerlessDBInstance(args, parsed_globals):
1684
+ def doRenewInstance(args, parsed_globals):
1789
1685
  g_param = parse_global_arg(parsed_globals)
1790
1686
 
1791
1687
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1814,11 +1710,11 @@ def doCreateServerlessDBInstance(args, parsed_globals):
1814
1710
  client = mod.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
1815
1711
  client._sdkVersion += ("_CLI_" + __version__)
1816
1712
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
- model = models.CreateServerlessDBInstanceRequest()
1713
+ model = models.RenewInstanceRequest()
1818
1714
  model.from_json_string(json.dumps(args))
1819
1715
  start_time = time.time()
1820
1716
  while True:
1821
- rsp = client.CreateServerlessDBInstance(model)
1717
+ rsp = client.RenewInstance(model)
1822
1718
  result = rsp.to_json_string()
1823
1719
  try:
1824
1720
  json_obj = json.loads(result)
@@ -2305,58 +2201,6 @@ def doDisIsolateDBInstances(args, parsed_globals):
2305
2201
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
2202
 
2307
2203
 
2308
- def doDescribeServerlessDBInstances(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.PostgresClient(cred, g_param[OptionsDefine.Region], profile)
2335
- client._sdkVersion += ("_CLI_" + __version__)
2336
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
2337
- model = models.DescribeServerlessDBInstancesRequest()
2338
- model.from_json_string(json.dumps(args))
2339
- start_time = time.time()
2340
- while True:
2341
- rsp = client.DescribeServerlessDBInstances(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
-
2360
2204
  def doDeleteBaseBackup(args, parsed_globals):
2361
2205
  g_param = parse_global_arg(parsed_globals)
2362
2206
 
@@ -5384,7 +5228,7 @@ MODELS_MAP = {
5384
5228
  }
5385
5229
 
5386
5230
  ACTION_MAP = {
5387
- "DescribeTasks": doDescribeTasks,
5231
+ "ModifyMaintainTimeWindow": doModifyMaintainTimeWindow,
5388
5232
  "DescribeDatabaseObjects": doDescribeDatabaseObjects,
5389
5233
  "ModifyDBInstanceChargeType": doModifyDBInstanceChargeType,
5390
5234
  "DescribeDBErrlogs": doDescribeDBErrlogs,
@@ -5400,12 +5244,10 @@ ACTION_MAP = {
5400
5244
  "CreateDBInstanceNetworkAccess": doCreateDBInstanceNetworkAccess,
5401
5245
  "ModifyDBInstanceSpec": doModifyDBInstanceSpec,
5402
5246
  "ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups,
5403
- "ModifyMaintainTimeWindow": doModifyMaintainTimeWindow,
5404
- "RenewInstance": doRenewInstance,
5247
+ "DescribeTasks": doDescribeTasks,
5405
5248
  "DescribeDatabases": doDescribeDatabases,
5406
5249
  "DescribeParameterTemplates": doDescribeParameterTemplates,
5407
5250
  "DescribeProductConfig": doDescribeProductConfig,
5408
- "DescribeDBSlowlogs": doDescribeDBSlowlogs,
5409
5251
  "DescribeAccountPrivileges": doDescribeAccountPrivileges,
5410
5252
  "DeleteReadOnlyGroupNetworkAccess": doDeleteReadOnlyGroupNetworkAccess,
5411
5253
  "DescribeDefaultParameters": doDescribeDefaultParameters,
@@ -5418,7 +5260,7 @@ ACTION_MAP = {
5418
5260
  "CreateBaseBackup": doCreateBaseBackup,
5419
5261
  "DescribeParameterTemplateAttributes": doDescribeParameterTemplateAttributes,
5420
5262
  "ModifyDBInstanceDeployment": doModifyDBInstanceDeployment,
5421
- "CreateServerlessDBInstance": doCreateServerlessDBInstance,
5263
+ "RenewInstance": doRenewInstance,
5422
5264
  "CreateDatabase": doCreateDatabase,
5423
5265
  "CreateAccount": doCreateAccount,
5424
5266
  "ModifyDBInstanceParameters": doModifyDBInstanceParameters,
@@ -5428,7 +5270,6 @@ ACTION_MAP = {
5428
5270
  "ModifyDBInstanceReadOnlyGroup": doModifyDBInstanceReadOnlyGroup,
5429
5271
  "CloneDBInstance": doCloneDBInstance,
5430
5272
  "DisIsolateDBInstances": doDisIsolateDBInstances,
5431
- "DescribeServerlessDBInstances": doDescribeServerlessDBInstances,
5432
5273
  "DeleteBaseBackup": doDeleteBaseBackup,
5433
5274
  "ModifyParameterTemplate": doModifyParameterTemplate,
5434
5275
  "CreateParameterTemplate": doCreateParameterTemplate,