tccli 3.0.1372.1__py2.py3-none-any.whl → 3.0.1374.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 (52) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ai3d/v20250513/api.json +1 -1
  3. tccli/services/batch/v20170312/api.json +3 -3
  4. tccli/services/cfs/v20190719/api.json +10 -10
  5. tccli/services/cfs/v20190719/examples.json +1 -1
  6. tccli/services/clb/v20180317/api.json +252 -3
  7. tccli/services/cls/v20201016/api.json +244 -106
  8. tccli/services/cls/v20201016/examples.json +7 -7
  9. tccli/services/emr/v20190103/api.json +2 -2
  10. tccli/services/ess/v20201111/api.json +69 -0
  11. tccli/services/essbasic/v20210526/api.json +39 -0
  12. tccli/services/keewidb/v20220308/api.json +24 -24
  13. tccli/services/lcic/v20220817/api.json +46 -18
  14. tccli/services/lighthouse/v20200324/examples.json +3 -3
  15. tccli/services/live/v20180801/examples.json +1 -1
  16. tccli/services/lke/v20231130/api.json +1344 -246
  17. tccli/services/lke/v20231130/examples.json +1 -1
  18. tccli/services/mongodb/v20190725/api.json +4 -4
  19. tccli/services/monitor/v20180724/api.json +4 -4
  20. tccli/services/mps/v20190612/api.json +42 -2
  21. tccli/services/ocr/v20181119/api.json +31 -12
  22. tccli/services/partners/v20180321/api.json +4 -4
  23. tccli/services/postgres/postgres_client.py +12 -171
  24. tccli/services/postgres/v20170312/api.json +20 -819
  25. tccli/services/postgres/v20170312/examples.json +6 -30
  26. tccli/services/scf/v20180416/api.json +2 -0
  27. tccli/services/sqlserver/v20180328/api.json +19 -17
  28. tccli/services/sqlserver/v20180328/examples.json +2 -2
  29. tccli/services/sts/v20180813/api.json +4 -4
  30. tccli/services/tcbr/v20220217/api.json +92 -0
  31. tccli/services/tcss/v20201101/api.json +32 -2
  32. tccli/services/tcss/v20201101/examples.json +3 -3
  33. tccli/services/tke/v20180525/api.json +10 -1
  34. tccli/services/trabbit/v20230418/api.json +50 -2
  35. tccli/services/trocket/trocket_client.py +65 -12
  36. tccli/services/trocket/v20230308/api.json +156 -0
  37. tccli/services/trocket/v20230308/examples.json +8 -0
  38. tccli/services/trtc/v20190722/api.json +10 -10
  39. tccli/services/tsf/v20180326/api.json +573 -371
  40. tccli/services/tsf/v20180326/examples.json +8 -8
  41. tccli/services/vod/v20180717/api.json +325 -32
  42. tccli/services/vod/v20180717/examples.json +33 -1
  43. tccli/services/vod/vod_client.py +212 -0
  44. tccli/services/waf/v20180125/api.json +717 -38
  45. tccli/services/waf/v20180125/examples.json +56 -0
  46. tccli/services/waf/waf_client.py +444 -73
  47. tccli/services/wedata/v20210820/api.json +138 -6
  48. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/METADATA +2 -2
  49. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/RECORD +52 -52
  50. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/WHEEL +0 -0
  51. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/entry_points.txt +0 -0
  52. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/license_files/LICENSE +0 -0
@@ -514,7 +514,7 @@
514
514
  {
515
515
  "document": "获取企业下应用列表",
516
516
  "input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListApp\n<公共请求参数>\n\n{\n \"AppType\": \"knowledge_qa\"\n}",
517
- "output": "{\n \"Response\": {\n \"Total\": \"1\",\n \"List\": [\n {\n \"AppType\": \"knowledge_qa\",\n \"AppTypeDesc\": \"知识库问答\",\n \"AppBizId\": \"1801166480814637052\",\n \"Name\": \"我的应用\",\n \"Avatar\": \"https://qidian-qbot-xxxxxxx.cos.ap-guangzhou.myqcloud.com/public/174434244193038090240/1801166482343244637056/image/jNVJvoXsTsBzo2324324121HZdgd-1816016475183120384.png\",\n \"Desc\": \"描述\",\n \"AppStatus\": 2,\n \"AppStatusDesc\": \"运行中\",\n \"UpdateTime\": \"1731407395\",\n \"Operator\": \"操作人\",\n \"ModelName\": \"精调知识大模型标准版\",\n \"Pattern\": \"standard\",\n \"ThoughtModelAliasName\": \"意图识别模型高级版\"\n }\n ],\n \"RequestId\": \"143a9f30-a21c-4eb3-af82-ccacd4cdcbfd\"\n }\n}",
517
+ "output": "{\n \"Response\": {\n \"Total\": \"1\",\n \"List\": [\n {\n \"AppType\": \"knowledge_qa\",\n \"AppTypeDesc\": \"知识库问答\",\n \"AppBizId\": \"1801166480814637052\",\n \"Name\": \"我的应用\",\n \"Avatar\": \"https://qidian-qbot-xxxxxxx.cos.ap-guangzhou.myqcloud.com/public/174434244193038090240/1801166482343244637056/image/jNVJvoXsTsBzo2324324121HZdgd-1816016475183120384.png\",\n \"Desc\": \"描述信息\",\n \"AppStatus\": 2,\n \"AppStatusDesc\": \"运行中\",\n \"UpdateTime\": \"1731407395\",\n \"Operator\": \"操作人\",\n \"ModelName\": \"精调知识大模型标准版\",\n \"Pattern\": \"standard\",\n \"ThoughtModelAliasName\": \"意图识别模型高级版\"\n }\n ],\n \"RequestId\": \"143a9f30-a21c-4eb3-af82-ccacd4cdcbfd\"\n }\n}",
518
518
  "title": "ListApp"
519
519
  }
520
520
  ],
@@ -410,8 +410,8 @@
410
410
  },
411
411
  {
412
412
  "disabled": false,
413
- "document": "项目ID,用户已创建项目的唯一ID,非自定义",
414
- "example": "1118****",
413
+ "document": "项目ID,用户已创建项目的唯一ID。请在控制台账号中心的项目管理中复制项目 ID。",
414
+ "example": "12",
415
415
  "member": "uint64",
416
416
  "name": "ProjectId",
417
417
  "required": true,
@@ -425,8 +425,8 @@
425
425
  "members": [
426
426
  {
427
427
  "disabled": false,
428
- "document": "返回的异步任务ID列表",
429
- "example": "[1081****]",
428
+ "document": "返回的异步任务ID列表。",
429
+ "example": "[1081,1082]",
430
430
  "member": "uint64",
431
431
  "name": "FlowIds",
432
432
  "output_required": true,
@@ -15790,20 +15790,20 @@
15790
15790
  {
15791
15791
  "disabled": false,
15792
15792
  "document": "指标名",
15793
- "example": "",
15793
+ "example": "cpu_usages",
15794
15794
  "member": "string",
15795
15795
  "name": "MetricName",
15796
- "required": true,
15796
+ "output_required": true,
15797
15797
  "type": "string",
15798
15798
  "value_allowed_null": false
15799
15799
  },
15800
15800
  {
15801
15801
  "disabled": false,
15802
15802
  "document": "监控数据点",
15803
- "example": "",
15803
+ "example": "[{}]",
15804
15804
  "member": "MetricDataPoint",
15805
15805
  "name": "Points",
15806
- "required": true,
15806
+ "output_required": true,
15807
15807
  "type": "list",
15808
15808
  "value_allowed_null": false
15809
15809
  }
@@ -18982,6 +18982,26 @@
18982
18982
  "output_required": false,
18983
18983
  "type": "string",
18984
18984
  "value_allowed_null": false
18985
+ },
18986
+ {
18987
+ "disabled": false,
18988
+ "document": "集锦标题。",
18989
+ "example": "title",
18990
+ "member": "string",
18991
+ "name": "Title",
18992
+ "output_required": false,
18993
+ "type": "string",
18994
+ "value_allowed_null": false
18995
+ },
18996
+ {
18997
+ "disabled": false,
18998
+ "document": "集锦概要。",
18999
+ "example": "summary",
19000
+ "member": "string",
19001
+ "name": "Summary",
19002
+ "output_required": false,
19003
+ "type": "string",
19004
+ "value_allowed_null": false
18985
19005
  }
18986
19006
  ],
18987
19007
  "usage": "out"
@@ -21736,7 +21756,7 @@
21736
21756
  {
21737
21757
  "disabled": false,
21738
21758
  "document": "智能精彩集锦地址。",
21739
- "example": "/AItest/hht-20250321xxx-021234545678E_172343423310test-0.mp4",
21759
+ "example": "/AItst/hht-2025031xxx-021354578E_17243423310test-0.mp4",
21740
21760
  "member": "string",
21741
21761
  "name": "HighlightPath",
21742
21762
  "output_required": true,
@@ -21746,7 +21766,7 @@
21746
21766
  {
21747
21767
  "disabled": false,
21748
21768
  "document": "智能精彩集锦封面地址。",
21749
- "example": "/AItest/hht-20250321xxx-021234545678E_172343423310test-0.jpg",
21769
+ "example": "/AItest/hht-2025031xxx-021245578E_17243423310test-0.jpg",
21750
21770
  "member": "string",
21751
21771
  "name": "CovImgPath",
21752
21772
  "output_required": true,
@@ -21782,6 +21802,26 @@
21782
21802
  "output_required": true,
21783
21803
  "type": "list",
21784
21804
  "value_allowed_null": false
21805
+ },
21806
+ {
21807
+ "disabled": false,
21808
+ "document": "智能精彩集锦地址。\n注意:此字段可能返回 null,表示取不到有效值。",
21809
+ "example": "http://test-12246.cos.ap-nanjing.myqcloud.com/AItest/hht-2025031xxx-02135468E_17243423310test-0.mp4",
21810
+ "member": "string",
21811
+ "name": "HighlightUrl",
21812
+ "output_required": false,
21813
+ "type": "string",
21814
+ "value_allowed_null": true
21815
+ },
21816
+ {
21817
+ "disabled": false,
21818
+ "document": "智能精彩集锦封面地址。\n注意:此字段可能返回 null,表示取不到有效值。",
21819
+ "example": "http://test-12246.cos.ap-nanjing.myqcloud.com/AItest/hht-2025031xxx-02134468E_17243423310test-0.jpg",
21820
+ "member": "string",
21821
+ "name": "CovImgUrl",
21822
+ "output_required": false,
21823
+ "type": "string",
21824
+ "value_allowed_null": true
21785
21825
  }
21786
21826
  ],
21787
21827
  "usage": "out"
@@ -5135,7 +5135,7 @@
5135
5135
  },
5136
5136
  {
5137
5137
  "disabled": false,
5138
- "document": "配置id支持:\nGeneral -- 通用场景\nOnlineTaxiItinerary -- 网约车行程单\nRideHailingDriverLicense -- 网约车驾驶证\nRideHailingTransportLicense -- 网约车运输证\nWayBill -- 快递运单\nAccountOpeningPermit -- 银行开户许可证\nInvoiceEng -- 海外发票模版\nCoin --钱币识别模板\nOnboardingDocuments -- 入职材料识别\nPropertyOwnershipCertificate -- 房产证识别\nRealEstateCertificate --不动产权证识别\nHouseEncumbranceCertificate -- 他权证识别\nCarInsurance -- 车险保单\nMultiRealEstateCertificate -- 房产证、不动产证、产权证等材料合一模板",
5138
+ "document": "配置id支持:\nGeneral -- 通用场景\nOnlineTaxiItinerary -- 网约车行程单\nRideHailingDriverLicense -- 网约车驾驶证\nRideHailingTransportLicense -- 网约车运输证\nWayBill -- 快递运单\nAccountOpeningPermit -- 银行开户许可证\nInvoiceEng -- 国际发票模板\nCoin --钱币识别模板\nOnboardingDocuments -- 入职材料识别\nPropertyOwnershipCertificate -- 房产证识别\nRealEstateCertificate --不动产权证识别\nHouseEncumbranceCertificate -- 他权证识别\nCarInsurance -- 车险保单\nMultiRealEstateCertificate -- 房产证、不动产证、产权证等材料合一模板",
5139
5139
  "example": "General",
5140
5140
  "member": "string",
5141
5141
  "name": "ConfigId",
@@ -5160,7 +5160,7 @@
5160
5160
  {
5161
5161
  "disabled": false,
5162
5162
  "document": "图片旋转角度(角度制),文本的水平方向\n为 0;顺时针为正,逆时针为负",
5163
- "example": "0",
5163
+ "example": "0.0",
5164
5164
  "member": "float",
5165
5165
  "name": "Angle",
5166
5166
  "output_required": true,
@@ -5282,8 +5282,8 @@
5282
5282
  },
5283
5283
  {
5284
5284
  "disabled": false,
5285
- "document": "模版的单个属性配置",
5286
- "example": "{\"Scene\": \"only_hw\"}",
5285
+ "document": "模板的单个属性配置",
5286
+ "example": "",
5287
5287
  "member": "ConfigAdvanced",
5288
5288
  "name": "ConfigAdvanced",
5289
5289
  "required": false,
@@ -5298,7 +5298,7 @@
5298
5298
  {
5299
5299
  "disabled": false,
5300
5300
  "document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
5301
- "example": "0",
5301
+ "example": "0.0",
5302
5302
  "member": "float",
5303
5303
  "name": "Angle",
5304
5304
  "output_required": true,
@@ -5403,7 +5403,7 @@
5403
5403
  },
5404
5404
  {
5405
5405
  "disabled": false,
5406
- "document": "配置id支持:\nGeneral -- 通用场景 \nInvoiceEng -- 国际invoice模版 \nWayBillEng --海运订单模板\nCustomsDeclaration -- 进出口报关单\nWeightNote -- 磅单\nMedicalMeter -- 血压仪表识别\nBillOfLading -- 海运提单\nEntrustmentBook -- 海运托书\nStatement -- 对账单识别模板\nBookingConfirmation -- 配舱通知书识别模板\nAirWayBill -- 航空运单识别模板\nTable -- 表格模版\nSteelLabel -- 实物标签识别模板\nCarInsurance -- 车辆保险单识别模板\nMultiRealEstateCertificate -- 房产材料识别模板\nMultiRealEstateMaterial -- 房产证明识别模板\nHongKongUtilityBill -- 香港水电煤单识别模板",
5406
+ "document": "配置id支持:\nGeneral -- 通用场景 \nInvoiceEng -- 国际invoice模板 \nWayBillEng --海运订单模板\nCustomsDeclaration -- 进出口报关单\nWeightNote -- 磅单\nMedicalMeter -- 血压仪表识别\nBillOfLading -- 海运提单\nEntrustmentBook -- 海运托书\nStatement -- 对账单识别模板\nBookingConfirmation -- 配舱通知书识别模板\nAirWayBill -- 航空运单识别模板\nTable -- 表格模板\nSteelLabel -- 实物标签识别模板\nCarInsurance -- 车辆保险单识别模板\nMultiRealEstateCertificate -- 房产材料识别模板\nMultiRealEstateMaterial -- 房产证明识别模板\nHongKongUtilityBill -- 中国香港水电煤单识别模板",
5407
5407
  "example": "General",
5408
5408
  "member": "string",
5409
5409
  "name": "ConfigId",
@@ -5430,8 +5430,8 @@
5430
5430
  },
5431
5431
  {
5432
5432
  "disabled": false,
5433
- "document": "模版的单个属性配置",
5434
- "example": "{\"Scene\": \"only_hw\"}",
5433
+ "document": "模板的单个属性配置",
5434
+ "example": "",
5435
5435
  "member": "ConfigAdvanced",
5436
5436
  "name": "ConfigAdvanced",
5437
5437
  "required": false,
@@ -5455,7 +5455,7 @@
5455
5455
  {
5456
5456
  "disabled": false,
5457
5457
  "document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
5458
- "example": "0",
5458
+ "example": "0.0",
5459
5459
  "member": "float",
5460
5460
  "name": "Angle",
5461
5461
  "output_required": true,
@@ -6456,6 +6456,15 @@
6456
6456
  "name": "EnableDetectText",
6457
6457
  "required": false,
6458
6458
  "type": "bool"
6459
+ },
6460
+ {
6461
+ "disabled": false,
6462
+ "document": "配置ID支持: OCR -- 通用场景 MulOCR--多语种场景 ",
6463
+ "example": "OCR",
6464
+ "member": "string",
6465
+ "name": "ConfigID",
6466
+ "required": false,
6467
+ "type": "string"
6459
6468
  }
6460
6469
  ],
6461
6470
  "type": "object"
@@ -7409,7 +7418,7 @@
7409
7418
  },
7410
7419
  {
7411
7420
  "disabled": false,
7412
- "document": "配置id支持:\nArticleRecognize -- 手写作文模版\n默认:ArticleRecognize",
7421
+ "document": "配置id支持:\nArticleRecognize -- 手写作文模板\n默认:ArticleRecognize",
7413
7422
  "example": "ArticleRecognize",
7414
7423
  "member": "string",
7415
7424
  "name": "ConfigId",
@@ -7418,7 +7427,7 @@
7418
7427
  },
7419
7428
  {
7420
7429
  "disabled": false,
7421
- "document": "模版的单个属性配置",
7430
+ "document": "模板的单个属性配置",
7422
7431
  "example": "only_hw",
7423
7432
  "member": "string",
7424
7433
  "name": "Scene",
@@ -7434,7 +7443,7 @@
7434
7443
  {
7435
7444
  "disabled": false,
7436
7445
  "document": "图片旋转角度(角度制),文本的水平方向为 0;顺时针为正,逆时针为负",
7437
- "example": "0",
7446
+ "example": "0.0",
7438
7447
  "member": "float",
7439
7448
  "name": "Angle",
7440
7449
  "output_required": true,
@@ -20968,6 +20977,16 @@
20968
20977
  "output_required": true,
20969
20978
  "type": "int",
20970
20979
  "value_allowed_null": false
20980
+ },
20981
+ {
20982
+ "disabled": false,
20983
+ "document": "全电类型的多页pdf票据中,支持输出票面页码:当前第几页,一共第几页。",
20984
+ "example": "共1页第1页",
20985
+ "member": "string",
20986
+ "name": "InvoicePageIndex",
20987
+ "output_required": false,
20988
+ "type": "string",
20989
+ "value_allowed_null": false
20971
20990
  }
20972
20991
  ],
20973
20992
  "usage": "out"
@@ -1409,7 +1409,7 @@
1409
1409
  {
1410
1410
  "disabled": false,
1411
1411
  "document": "客户账号ID列表",
1412
- "example": "[10000, 10001]",
1412
+ "example": "[\"1000021\", \"10000022\"]",
1413
1413
  "member": "string",
1414
1414
  "name": "ClientUins",
1415
1415
  "required": false,
@@ -1435,7 +1435,7 @@
1435
1435
  },
1436
1436
  {
1437
1437
  "disabled": false,
1438
- "document": "偏移量",
1438
+ "document": "偏移量 请保持必传",
1439
1439
  "example": "0",
1440
1440
  "member": "uint64",
1441
1441
  "name": "Offset",
@@ -1444,7 +1444,7 @@
1444
1444
  },
1445
1445
  {
1446
1446
  "disabled": false,
1447
- "document": "限制数目",
1447
+ "document": "限制数目 请保持必传,最大2000",
1448
1448
  "example": "10",
1449
1449
  "member": "uint64",
1450
1450
  "name": "Limit",
@@ -1496,7 +1496,7 @@
1496
1496
  {
1497
1497
  "disabled": false,
1498
1498
  "document": "已审核代客列表",
1499
- "example": "{ \"Uin\": \"3286669433\", \"ClientUin\": \"2461871653\", \"C",
1499
+ "example": "",
1500
1500
  "member": "AgentAuditedClient",
1501
1501
  "name": "AgentClientSet",
1502
1502
  "output_required": true,
@@ -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,