tccli 3.0.1154.1__py2.py3-none-any.whl → 3.0.1156.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 (45) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/v20180419/api.json +48 -20
  3. tccli/services/ccc/v20200210/api.json +11 -1
  4. tccli/services/ccc/v20200210/examples.json +1 -1
  5. tccli/services/cdb/v20170320/api.json +39 -2
  6. tccli/services/ckafka/ckafka_client.py +65 -12
  7. tccli/services/ckafka/v20190819/api.json +134 -0
  8. tccli/services/ckafka/v20190819/examples.json +8 -0
  9. tccli/services/cvm/cvm_client.py +110 -4
  10. tccli/services/cvm/v20170312/api.json +95 -0
  11. tccli/services/cvm/v20170312/examples.json +16 -0
  12. tccli/services/cynosdb/cynosdb_client.py +110 -4
  13. tccli/services/cynosdb/v20190107/api.json +192 -0
  14. tccli/services/cynosdb/v20190107/examples.json +16 -0
  15. tccli/services/es/v20180416/api.json +36 -0
  16. tccli/services/ess/ess_client.py +53 -0
  17. tccli/services/ess/v20201111/api.json +101 -10
  18. tccli/services/ess/v20201111/examples.json +8 -0
  19. tccli/services/essbasic/v20210526/api.json +16 -16
  20. tccli/services/essbasic/v20210526/examples.json +3 -3
  21. tccli/services/gaap/v20180529/api.json +17 -17
  22. tccli/services/gaap/v20180529/examples.json +7 -13
  23. tccli/services/hunyuan/v20230901/api.json +77 -2
  24. tccli/services/iss/v20230517/api.json +6 -6
  25. tccli/services/mna/mna_client.py +322 -4
  26. tccli/services/mna/v20210119/api.json +435 -0
  27. tccli/services/mna/v20210119/examples.json +48 -0
  28. tccli/services/mongodb/v20190725/api.json +6 -6
  29. tccli/services/monitor/v20180724/api.json +23 -23
  30. tccli/services/monitor/v20180724/examples.json +12 -12
  31. tccli/services/oceanus/v20190422/api.json +9 -0
  32. tccli/services/postgres/postgres_client.py +395 -24
  33. tccli/services/postgres/v20170312/api.json +549 -0
  34. tccli/services/postgres/v20170312/examples.json +92 -0
  35. tccli/services/rce/v20201103/api.json +78 -0
  36. tccli/services/tcr/v20190924/api.json +71 -45
  37. tccli/services/tcr/v20190924/examples.json +9 -9
  38. tccli/services/vpc/v20170312/api.json +10 -10
  39. tccli/services/waf/v20180125/api.json +421 -72
  40. tccli/services/waf/v20180125/examples.json +6 -6
  41. {tccli-3.0.1154.1.dist-info → tccli-3.0.1156.1.dist-info}/METADATA +2 -2
  42. {tccli-3.0.1154.1.dist-info → tccli-3.0.1156.1.dist-info}/RECORD +45 -45
  43. {tccli-3.0.1154.1.dist-info → tccli-3.0.1156.1.dist-info}/WHEEL +0 -0
  44. {tccli-3.0.1154.1.dist-info → tccli-3.0.1156.1.dist-info}/entry_points.txt +0 -0
  45. {tccli-3.0.1154.1.dist-info → tccli-3.0.1156.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1154.1'
1
+ __version__ = '3.0.1156.1'
@@ -2381,10 +2381,11 @@
2381
2381
  "members": [
2382
2382
  {
2383
2383
  "disabled": false,
2384
- "document": "数据盘类型。数据盘类型限制详见[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)。取值范围:<br><li>LOCAL_BASIC:本地硬盘<br><li>LOCAL_SSD:本地SSD硬盘<br><li>CLOUD_BASIC:普通云硬盘<br><li>CLOUD_PREMIUM:高性能云硬盘<br><li>CLOUD_SSD:SSD云硬盘<br><li>CLOUD_HSSD:增强型SSD云硬盘<br><li>CLOUD_TSSD:极速型SSD云硬盘<br><br>默认取值与系统盘类型(SystemDisk.DiskType)保持一致。\n注意:此字段可能返回 null,表示取不到有效值。",
2384
+ "document": "数据盘类型。数据盘类型限制详见[云硬盘类型](https://cloud.tencent.com/document/product/362/2353)。取值范围:\n<li>LOCAL_BASIC:本地硬盘</li>\n<li>LOCAL_SSD:本地SSD硬盘</li>\n<li>CLOUD_BASIC:普通云硬盘</li>\n<li>CLOUD_PREMIUM:高性能云硬盘</li>\n<li>CLOUD_SSD:SSD云硬盘</li>\n<li>CLOUD_HSSD:增强型SSD云硬盘</li>\n<li>CLOUD_TSSD:极速型SSD云硬盘</li>\n默认取值与系统盘类型(SystemDisk.DiskType)保持一致。\n注意:此字段可能返回 null,表示取不到有效值。",
2385
2385
  "example": "CLOUD_PREMIUM",
2386
2386
  "member": "string",
2387
2387
  "name": "DiskType",
2388
+ "output_required": true,
2388
2389
  "required": false,
2389
2390
  "type": "string",
2390
2391
  "value_allowed_null": true
@@ -2395,6 +2396,7 @@
2395
2396
  "example": "0",
2396
2397
  "member": "uint64",
2397
2398
  "name": "DiskSize",
2399
+ "output_required": true,
2398
2400
  "required": false,
2399
2401
  "type": "int",
2400
2402
  "value_allowed_null": true
@@ -2405,26 +2407,29 @@
2405
2407
  "example": "snap-l8psqwnt",
2406
2408
  "member": "string",
2407
2409
  "name": "SnapshotId",
2410
+ "output_required": true,
2408
2411
  "required": false,
2409
2412
  "type": "string",
2410
2413
  "value_allowed_null": true
2411
2414
  },
2412
2415
  {
2413
2416
  "disabled": false,
2414
- "document": "数据盘是否随子机销毁。取值范围:<br><li>TRUE:子机销毁时,销毁数据盘,只支持按小时后付费云盘<br><li>FALSE:子机销毁时,保留数据盘\n注意:此字段可能返回 null,表示取不到有效值。",
2417
+ "document": "数据盘是否随子机销毁。取值范围:\n<li>TRUE:子机销毁时,销毁数据盘,只支持按小时后付费云盘</li>\n<li>FALSE:子机销毁时,保留数据盘</li>\n注意:此字段可能返回 null,表示取不到有效值。",
2415
2418
  "example": "false",
2416
2419
  "member": "bool",
2417
2420
  "name": "DeleteWithInstance",
2421
+ "output_required": true,
2418
2422
  "required": false,
2419
2423
  "type": "bool",
2420
2424
  "value_allowed_null": true
2421
2425
  },
2422
2426
  {
2423
2427
  "disabled": false,
2424
- "document": "数据盘是否加密。取值范围:<br><li>TRUE:加密<br><li>FALSE:不加密\n注意:此字段可能返回 null,表示取不到有效值。",
2428
+ "document": "数据盘是否加密。取值范围:\n<li>TRUE:加密</li>\n<li>FALSE:不加密</li>\n注意:此字段可能返回 null,表示取不到有效值。",
2425
2429
  "example": "true",
2426
2430
  "member": "bool",
2427
2431
  "name": "Encrypt",
2432
+ "output_required": true,
2428
2433
  "required": false,
2429
2434
  "type": "bool",
2430
2435
  "value_allowed_null": true
@@ -2435,9 +2440,21 @@
2435
2440
  "example": "100",
2436
2441
  "member": "uint64",
2437
2442
  "name": "ThroughputPerformance",
2443
+ "output_required": true,
2438
2444
  "required": false,
2439
2445
  "type": "int",
2440
2446
  "value_allowed_null": true
2447
+ },
2448
+ {
2449
+ "disabled": false,
2450
+ "document": "突发性能。是否开启突发性能,默认取值为 false。\n\n注:内测中,需提单申请后使用。\n注意:此字段可能返回 null,表示取不到有效值。",
2451
+ "example": "false",
2452
+ "member": "bool",
2453
+ "name": "BurstPerformance",
2454
+ "output_required": true,
2455
+ "required": false,
2456
+ "type": "bool",
2457
+ "value_allowed_null": true
2441
2458
  }
2442
2459
  ],
2443
2460
  "usage": "both"
@@ -4236,6 +4253,17 @@
4236
4253
  "required": false,
4237
4254
  "type": "string",
4238
4255
  "value_allowed_null": false
4256
+ },
4257
+ {
4258
+ "disabled": false,
4259
+ "document": "云服务器实例名后缀。字符长度为[1,105],且与 InstanceName 的长度和不能超过107。\n\n假设后缀名称为 suffix,原实例名为 test.0,最终实例名为 test.0.suffix。\n注意:此字段可能返回 null,表示取不到有效值。",
4260
+ "example": "testsuffix",
4261
+ "member": "string",
4262
+ "name": "InstanceNameSuffix",
4263
+ "output_required": true,
4264
+ "required": false,
4265
+ "type": "string",
4266
+ "value_allowed_null": true
4239
4267
  }
4240
4268
  ],
4241
4269
  "usage": "both"
@@ -4384,7 +4412,7 @@
4384
4412
  {
4385
4413
  "disabled": false,
4386
4414
  "document": "实例所属项目ID。",
4387
- "example": "",
4415
+ "example": "0",
4388
4416
  "member": "int64",
4389
4417
  "name": "ProjectId",
4390
4418
  "output_required": true,
@@ -4394,7 +4422,7 @@
4394
4422
  {
4395
4423
  "disabled": false,
4396
4424
  "document": "启动配置ID。",
4397
- "example": "",
4425
+ "example": "asc-abcd0123",
4398
4426
  "member": "string",
4399
4427
  "name": "LaunchConfigurationId",
4400
4428
  "output_required": true,
@@ -4404,7 +4432,7 @@
4404
4432
  {
4405
4433
  "disabled": false,
4406
4434
  "document": "启动配置名称。",
4407
- "example": "",
4435
+ "example": "TestLauchConfig0_0",
4408
4436
  "member": "string",
4409
4437
  "name": "LaunchConfigurationName",
4410
4438
  "output_required": true,
@@ -4414,7 +4442,7 @@
4414
4442
  {
4415
4443
  "disabled": false,
4416
4444
  "document": "实例机型。",
4417
- "example": "",
4445
+ "example": "SA2.MEDIUM2",
4418
4446
  "member": "string",
4419
4447
  "name": "InstanceType",
4420
4448
  "output_required": true,
@@ -4464,7 +4492,7 @@
4464
4492
  {
4465
4493
  "disabled": false,
4466
4494
  "document": "实例所属安全组。",
4467
- "example": "",
4495
+ "example": "[\"sg-brwzhm6d\"]",
4468
4496
  "member": "string",
4469
4497
  "name": "SecurityGroupIds",
4470
4498
  "output_required": true,
@@ -4484,7 +4512,7 @@
4484
4512
  {
4485
4513
  "disabled": false,
4486
4514
  "document": "自定义数据。\n注意:此字段可能返回 null,表示取不到有效值。",
4487
- "example": "",
4515
+ "example": "dGVzdA==",
4488
4516
  "member": "string",
4489
4517
  "name": "UserData",
4490
4518
  "output_required": true,
@@ -4494,7 +4522,7 @@
4494
4522
  {
4495
4523
  "disabled": false,
4496
4524
  "document": "启动配置创建时间。",
4497
- "example": "",
4525
+ "example": "2021-05-31T12:38:35Z",
4498
4526
  "member": "datetime_iso",
4499
4527
  "name": "CreatedTime",
4500
4528
  "output_required": true,
@@ -4514,7 +4542,7 @@
4514
4542
  {
4515
4543
  "disabled": false,
4516
4544
  "document": "镜像ID。",
4517
- "example": "",
4545
+ "example": "img-abcd0123",
4518
4546
  "member": "string",
4519
4547
  "name": "ImageId",
4520
4548
  "output_required": true,
@@ -4524,7 +4552,7 @@
4524
4552
  {
4525
4553
  "disabled": false,
4526
4554
  "document": "启动配置当前状态。取值范围:<li>NORMAL:正常</li><li>IMAGE_ABNORMAL:启动配置镜像异常</li><li>CBS_SNAP_ABNORMAL:启动配置数据盘快照异常</li><li>SECURITY_GROUP_ABNORMAL:启动配置安全组异常</li>",
4527
- "example": "",
4555
+ "example": "NORMAL",
4528
4556
  "member": "string",
4529
4557
  "name": "LaunchConfigurationStatus",
4530
4558
  "output_required": true,
@@ -4534,7 +4562,7 @@
4534
4562
  {
4535
4563
  "disabled": false,
4536
4564
  "document": "实例计费类型,CVM默认值按照POSTPAID_BY_HOUR处理。<li>POSTPAID_BY_HOUR:按小时后付费</li><li>SPOTPAID:竞价付费</li>",
4537
- "example": "",
4565
+ "example": "POSTPAID_BY_HOUR",
4538
4566
  "member": "string",
4539
4567
  "name": "InstanceChargeType",
4540
4568
  "output_required": true,
@@ -4554,7 +4582,7 @@
4554
4582
  {
4555
4583
  "disabled": false,
4556
4584
  "document": "实例机型列表。",
4557
- "example": "",
4585
+ "example": "[\"SA2.MEDIUM2\"]",
4558
4586
  "member": "string",
4559
4587
  "name": "InstanceTypes",
4560
4588
  "output_required": true,
@@ -4584,7 +4612,7 @@
4584
4612
  {
4585
4613
  "disabled": false,
4586
4614
  "document": "版本号。",
4587
- "example": "",
4615
+ "example": "1",
4588
4616
  "member": "int64",
4589
4617
  "name": "VersionNumber",
4590
4618
  "output_required": true,
@@ -4594,7 +4622,7 @@
4594
4622
  {
4595
4623
  "disabled": false,
4596
4624
  "document": "更新时间。",
4597
- "example": "",
4625
+ "example": "2023-09-04T11:42:46Z",
4598
4626
  "member": "datetime_iso",
4599
4627
  "name": "UpdatedTime",
4600
4628
  "output_required": true,
@@ -4604,7 +4632,7 @@
4604
4632
  {
4605
4633
  "disabled": false,
4606
4634
  "document": "CAM角色名称。可通过DescribeRoleList接口返回值中的roleName获取。",
4607
- "example": "",
4635
+ "example": "TestRole",
4608
4636
  "member": "string",
4609
4637
  "name": "CamRoleName",
4610
4638
  "output_required": true,
@@ -4614,7 +4642,7 @@
4614
4642
  {
4615
4643
  "disabled": false,
4616
4644
  "document": "上次操作时,InstanceTypesCheckPolicy 取值。",
4617
- "example": "",
4645
+ "example": "ANY",
4618
4646
  "member": "string",
4619
4647
  "name": "LastOperationInstanceTypesCheckPolicy",
4620
4648
  "output_required": true,
@@ -4654,7 +4682,7 @@
4654
4682
  {
4655
4683
  "disabled": false,
4656
4684
  "document": "云盘类型选择策略。取值范围:<li>ORIGINAL:使用设置的云盘类型</li><li>AUTOMATIC:自动选择当前可用区下可用的云盘类型</li>",
4657
- "example": "",
4685
+ "example": "ORIGINAL",
4658
4686
  "member": "string",
4659
4687
  "name": "DiskTypePolicy",
4660
4688
  "output_required": true,
@@ -4664,7 +4692,7 @@
4664
4692
  {
4665
4693
  "disabled": false,
4666
4694
  "document": "高性能计算集群ID。<br>\n注意:此字段默认为空。",
4667
- "example": "",
4695
+ "example": "hpc-abcd0123",
4668
4696
  "member": "string",
4669
4697
  "name": "HpcClusterId",
4670
4698
  "output_required": true,
@@ -643,7 +643,7 @@
643
643
  },
644
644
  {
645
645
  "disabled": false,
646
- "document": "任务状态0初始 1运行中 2已完成 3结束中 4已结束",
646
+ "document": "任务状态:\n0初始:任务创建,呼叫未开始\n1运行中\n2 已完成:任务中所有呼叫完成\n3结束中:任务到期,但仍有部分呼叫未结束\n4已结束:任务到期终止",
647
647
  "example": "1",
648
648
  "member": "uint64",
649
649
  "name": "State",
@@ -6507,6 +6507,16 @@
6507
6507
  "output_required": true,
6508
6508
  "type": "int",
6509
6509
  "value_allowed_null": true
6510
+ },
6511
+ {
6512
+ "disabled": false,
6513
+ "document": "技能组内线号码\n注意:此字段可能返回 null,表示取不到有效值。",
6514
+ "example": "6666",
6515
+ "member": "string",
6516
+ "name": "Alias",
6517
+ "output_required": true,
6518
+ "type": "string",
6519
+ "value_allowed_null": true
6510
6520
  }
6511
6521
  ],
6512
6522
  "usage": "out"
@@ -300,7 +300,7 @@
300
300
  {
301
301
  "document": "获取技能组列表示例",
302
302
  "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSkillGroupInfoList\n<公共请求参数>\n\n{\n \"PageSize\": 10,\n \"PageNumber\": 0,\n \"ModifiedTime\": 1590147606,\n \"SdkAppId\": 1400000000,\n \"SkillGroupId\": 12\n}",
303
- "output": "{\n \"Response\": {\n \"RequestId\": \"5ac74e13-ef15-41a6-9639-f1bc8c9896bd\",\n \"TotalCount\": 2,\n \"SkillGroupList\": [\n {\n \"SkillGroupId\": 1115,\n \"SkillGroupName\": \"luluttt\",\n \"SkillGroupType\": 1,\n \"Type\": \"TEL\",\n \"RoutePolicy\": \"firstCreate\",\n \"UsingLastSeat\": 0,\n \"MaxConcurrency\": 1,\n \"LastModifyTimestamp\": 1613976392\n }\n ]\n }\n}",
303
+ "output": "{\n \"Response\": {\n \"RequestId\": \"5ac74e13-ef15-41a6-9639-f1bc8c9896bd\",\n \"TotalCount\": 2,\n \"SkillGroupList\": [\n {\n \"SkillGroupId\": 1115,\n \"SkillGroupName\": \"luluttt\",\n \"SkillGroupType\": 1,\n \"Type\": \"TEL\",\n \"RoutePolicy\": \"firstCreate\",\n \"UsingLastSeat\": 0,\n \"MaxConcurrency\": 1,\n \"LastModifyTimestamp\": 1613976392,\n \"Alias\": \"6666\"\n }\n ]\n }\n}",
304
304
  "title": "获取技能组列表示例"
305
305
  }
306
306
  ],
@@ -1163,7 +1163,7 @@
1163
1163
  "status": "online"
1164
1164
  },
1165
1165
  "UpgradeDBInstanceEngineVersion": {
1166
- "document": "本接口(UpgradeDBInstanceEngineVersion)用于升级云数据库实例版本,实例类型支持主实例、灾备实例和只读实例。",
1166
+ "document": "本接口(UpgradeDBInstanceEngineVersion)用于升级云数据库实例版本,实例类型支持主实例、灾备实例和只读实例等。",
1167
1167
  "input": "UpgradeDBInstanceEngineVersionRequest",
1168
1168
  "name": "升级实例版本",
1169
1169
  "output": "UpgradeDBInstanceEngineVersionResponse",
@@ -6172,7 +6172,7 @@
6172
6172
  },
6173
6173
  {
6174
6174
  "disabled": false,
6175
- "document": "是否只预检此次请求。true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制等。如果检查不通过,则返回对应错误码;如果检查通过,则返回RequestId.默认为false:发送正常请求,通过检查后直接创建实例。",
6175
+ "document": "是否只预检此次请求。true:发送检查请求,不会创建实例。检查项包括是否填写了必需参数,请求格式,业务限制等。如果检查不通过,则返回对应错误码;如果检查通过,则返回 RequestIdfalse:发送正常请求,通过检查后直接创建实例。\n默认为 false。",
6176
6176
  "example": "true",
6177
6177
  "member": "bool",
6178
6178
  "name": "DryRun",
@@ -20316,6 +20316,15 @@
20316
20316
  "name": "MaxDelayTime",
20317
20317
  "required": false,
20318
20318
  "type": "int"
20319
+ },
20320
+ {
20321
+ "disabled": false,
20322
+ "document": "版本升级支持指定参数",
20323
+ "example": "无",
20324
+ "member": "UpgradeEngineVersionParams",
20325
+ "name": "ParamList",
20326
+ "required": false,
20327
+ "type": "list"
20319
20328
  }
20320
20329
  ],
20321
20330
  "type": "object"
@@ -20533,6 +20542,34 @@
20533
20542
  ],
20534
20543
  "type": "object"
20535
20544
  },
20545
+ "UpgradeEngineVersionParams": {
20546
+ "document": "5.7升级8.0指定参数的结构",
20547
+ "members": [
20548
+ {
20549
+ "disabled": false,
20550
+ "document": "参数名称\n注意:此字段可能返回 null,表示取不到有效值。",
20551
+ "example": "default_collation_for_utf8mb4",
20552
+ "member": "string",
20553
+ "name": "Name",
20554
+ "output_required": false,
20555
+ "required": false,
20556
+ "type": "string",
20557
+ "value_allowed_null": true
20558
+ },
20559
+ {
20560
+ "disabled": false,
20561
+ "document": "参数值\n注意:此字段可能返回 null,表示取不到有效值。",
20562
+ "example": "utf8mb4_0900_ai_ci",
20563
+ "member": "string",
20564
+ "name": "Value",
20565
+ "output_required": false,
20566
+ "required": false,
20567
+ "type": "string",
20568
+ "value_allowed_null": true
20569
+ }
20570
+ ],
20571
+ "usage": "both"
20572
+ },
20536
20573
  "UploadInfo": {
20537
20574
  "document": "文件上传描述",
20538
20575
  "members": [
@@ -797,7 +797,7 @@ def doDescribeDatahubGroupOffsets(args, parsed_globals):
797
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
798
 
799
799
 
800
- def doCreateCdcCluster(args, parsed_globals):
800
+ def doDescribeDatahubTask(args, parsed_globals):
801
801
  g_param = parse_global_arg(parsed_globals)
802
802
 
803
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +826,11 @@ def doCreateCdcCluster(args, parsed_globals):
826
826
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
827
827
  client._sdkVersion += ("_CLI_" + __version__)
828
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.CreateCdcClusterRequest()
829
+ model = models.DescribeDatahubTaskRequest()
830
830
  model.from_json_string(json.dumps(args))
831
831
  start_time = time.time()
832
832
  while True:
833
- rsp = client.CreateCdcCluster(model)
833
+ rsp = client.DescribeDatahubTask(model)
834
834
  result = rsp.to_json_string()
835
835
  try:
836
836
  json_obj = json.loads(result)
@@ -1629,6 +1629,58 @@ def doDeleteInstancePost(args, parsed_globals):
1629
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1630
 
1631
1631
 
1632
+ def doModifyPassword(args, parsed_globals):
1633
+ g_param = parse_global_arg(parsed_globals)
1634
+
1635
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1636
+ cred = credential.CVMRoleCredential()
1637
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1638
+ cred = credential.STSAssumeRoleCredential(
1639
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1640
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1641
+ )
1642
+ 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):
1643
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1644
+ else:
1645
+ cred = credential.Credential(
1646
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1647
+ )
1648
+ http_profile = HttpProfile(
1649
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1650
+ reqMethod="POST",
1651
+ endpoint=g_param[OptionsDefine.Endpoint],
1652
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1653
+ )
1654
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1655
+ if g_param[OptionsDefine.Language]:
1656
+ profile.language = g_param[OptionsDefine.Language]
1657
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1658
+ client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
1659
+ client._sdkVersion += ("_CLI_" + __version__)
1660
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
+ model = models.ModifyPasswordRequest()
1662
+ model.from_json_string(json.dumps(args))
1663
+ start_time = time.time()
1664
+ while True:
1665
+ rsp = client.ModifyPassword(model)
1666
+ result = rsp.to_json_string()
1667
+ try:
1668
+ json_obj = json.loads(result)
1669
+ except TypeError as e:
1670
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1671
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1672
+ break
1673
+ cur_time = time.time()
1674
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1675
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1676
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1677
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1678
+ else:
1679
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1680
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1681
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
+
1683
+
1632
1684
  def doDescribeACL(args, parsed_globals):
1633
1685
  g_param = parse_global_arg(parsed_globals)
1634
1686
 
@@ -2253,7 +2305,7 @@ def doCreateConnectResource(args, parsed_globals):
2253
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
2306
 
2255
2307
 
2256
- def doDescribeDatahubTask(args, parsed_globals):
2308
+ def doModifyRoutineMaintenanceTask(args, parsed_globals):
2257
2309
  g_param = parse_global_arg(parsed_globals)
2258
2310
 
2259
2311
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2282,11 +2334,11 @@ def doDescribeDatahubTask(args, parsed_globals):
2282
2334
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
2283
2335
  client._sdkVersion += ("_CLI_" + __version__)
2284
2336
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2285
- model = models.DescribeDatahubTaskRequest()
2337
+ model = models.ModifyRoutineMaintenanceTaskRequest()
2286
2338
  model.from_json_string(json.dumps(args))
2287
2339
  start_time = time.time()
2288
2340
  while True:
2289
- rsp = client.DescribeDatahubTask(model)
2341
+ rsp = client.ModifyRoutineMaintenanceTask(model)
2290
2342
  result = rsp.to_json_string()
2291
2343
  try:
2292
2344
  json_obj = json.loads(result)
@@ -4177,7 +4229,7 @@ def doDeleteTopic(args, parsed_globals):
4177
4229
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4178
4230
 
4179
4231
 
4180
- def doModifyPassword(args, parsed_globals):
4232
+ def doCreateCdcCluster(args, parsed_globals):
4181
4233
  g_param = parse_global_arg(parsed_globals)
4182
4234
 
4183
4235
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4206,11 +4258,11 @@ def doModifyPassword(args, parsed_globals):
4206
4258
  client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
4207
4259
  client._sdkVersion += ("_CLI_" + __version__)
4208
4260
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4209
- model = models.ModifyPasswordRequest()
4261
+ model = models.CreateCdcClusterRequest()
4210
4262
  model.from_json_string(json.dumps(args))
4211
4263
  start_time = time.time()
4212
4264
  while True:
4213
- rsp = client.ModifyPassword(model)
4265
+ rsp = client.CreateCdcCluster(model)
4214
4266
  result = rsp.to_json_string()
4215
4267
  try:
4216
4268
  json_obj = json.loads(result)
@@ -4359,7 +4411,7 @@ ACTION_MAP = {
4359
4411
  "SendMessage": doSendMessage,
4360
4412
  "DescribeUser": doDescribeUser,
4361
4413
  "DescribeDatahubGroupOffsets": doDescribeDatahubGroupOffsets,
4362
- "CreateCdcCluster": doCreateCdcCluster,
4414
+ "DescribeDatahubTask": doDescribeDatahubTask,
4363
4415
  "CreateTopicIpWhiteList": doCreateTopicIpWhiteList,
4364
4416
  "DeleteConnectResource": doDeleteConnectResource,
4365
4417
  "DescribeGroup": doDescribeGroup,
@@ -4375,6 +4427,7 @@ ACTION_MAP = {
4375
4427
  "FetchMessageListByOffset": doFetchMessageListByOffset,
4376
4428
  "CreateDatahubTopic": doCreateDatahubTopic,
4377
4429
  "DeleteInstancePost": doDeleteInstancePost,
4430
+ "ModifyPassword": doModifyPassword,
4378
4431
  "DescribeACL": doDescribeACL,
4379
4432
  "DescribeDatahubTopics": doDescribeDatahubTopics,
4380
4433
  "DescribeTopicDetail": doDescribeTopicDetail,
@@ -4387,7 +4440,7 @@ ACTION_MAP = {
4387
4440
  "DescribeConsumerGroup": doDescribeConsumerGroup,
4388
4441
  "DescribeTopicSubscribeGroup": doDescribeTopicSubscribeGroup,
4389
4442
  "CreateConnectResource": doCreateConnectResource,
4390
- "DescribeDatahubTask": doDescribeDatahubTask,
4443
+ "ModifyRoutineMaintenanceTask": doModifyRoutineMaintenanceTask,
4391
4444
  "CheckCdcCluster": doCheckCdcCluster,
4392
4445
  "DescribeTopicFlowRanking": doDescribeTopicFlowRanking,
4393
4446
  "DeleteRouteTriggerTime": doDeleteRouteTriggerTime,
@@ -4424,7 +4477,7 @@ ACTION_MAP = {
4424
4477
  "DescribeConnectResources": doDescribeConnectResources,
4425
4478
  "DescribeTopic": doDescribeTopic,
4426
4479
  "DeleteTopic": doDeleteTopic,
4427
- "ModifyPassword": doModifyPassword,
4480
+ "CreateCdcCluster": doCreateCdcCluster,
4428
4481
  "InquireCkafkaPrice": doInquireCkafkaPrice,
4429
4482
  "ModifyTopicAttributes": doModifyTopicAttributes,
4430
4483
 
@@ -560,6 +560,13 @@
560
560
  "output": "ModifyPasswordResponse",
561
561
  "status": "online"
562
562
  },
563
+ "ModifyRoutineMaintenanceTask": {
564
+ "document": "设置自动化运维属性",
565
+ "input": "ModifyRoutineMaintenanceTaskRequest",
566
+ "name": "设置自动化运维属性",
567
+ "output": "ModifyRoutineMaintenanceTaskResponse",
568
+ "status": "online"
569
+ },
563
570
  "ModifyTopicAttributes": {
564
571
  "document": "本接口用于修改主题属性。",
565
572
  "input": "ModifyTopicAttributesRequest",
@@ -13421,6 +13428,133 @@
13421
13428
  ],
13422
13429
  "type": "object"
13423
13430
  },
13431
+ "ModifyRoutineMaintenanceTaskRequest": {
13432
+ "document": "ModifyRoutineMaintenanceTask请求参数结构体",
13433
+ "members": [
13434
+ {
13435
+ "disabled": false,
13436
+ "document": "实例id",
13437
+ "example": "ckafka-pkbw2qkq",
13438
+ "member": "string",
13439
+ "name": "InstanceId",
13440
+ "required": true,
13441
+ "type": "string"
13442
+ },
13443
+ {
13444
+ "disabled": false,
13445
+ "document": "自动化运维类别",
13446
+ "example": "QUOTA",
13447
+ "member": "string",
13448
+ "name": "MaintenanceType",
13449
+ "required": true,
13450
+ "type": "string"
13451
+ },
13452
+ {
13453
+ "disabled": false,
13454
+ "document": "自动化运维子类别",
13455
+ "example": "INSTANCE_STORAGE_CAPACITY",
13456
+ "member": "string",
13457
+ "name": "MaintenanceSubtype",
13458
+ "required": true,
13459
+ "type": "string"
13460
+ },
13461
+ {
13462
+ "disabled": false,
13463
+ "document": "主题名称",
13464
+ "example": "test",
13465
+ "member": "string",
13466
+ "name": "TopicName",
13467
+ "required": false,
13468
+ "type": "string"
13469
+ },
13470
+ {
13471
+ "disabled": false,
13472
+ "document": "任务触发阈值",
13473
+ "example": "60",
13474
+ "member": "int64",
13475
+ "name": "ConfigureThreshold",
13476
+ "required": false,
13477
+ "type": "int"
13478
+ },
13479
+ {
13480
+ "disabled": false,
13481
+ "document": "任务调整步长",
13482
+ "example": "30",
13483
+ "member": "int64",
13484
+ "name": "ConfigureStepSize",
13485
+ "required": false,
13486
+ "type": "int"
13487
+ },
13488
+ {
13489
+ "disabled": false,
13490
+ "document": "任务调整上限",
13491
+ "example": "70",
13492
+ "member": "int64",
13493
+ "name": "ConfigureLimit",
13494
+ "required": false,
13495
+ "type": "int"
13496
+ },
13497
+ {
13498
+ "disabled": false,
13499
+ "document": "任务预期触发时间,存储从当日 0AM 开始偏移的秒数",
13500
+ "example": "9600",
13501
+ "member": "int64",
13502
+ "name": "PlannedTime",
13503
+ "required": false,
13504
+ "type": "int"
13505
+ },
13506
+ {
13507
+ "disabled": false,
13508
+ "document": "任务额外信息",
13509
+ "example": "{\"key\":\"value\"}",
13510
+ "member": "string",
13511
+ "name": "ExtraConfig",
13512
+ "required": false,
13513
+ "type": "string"
13514
+ },
13515
+ {
13516
+ "disabled": false,
13517
+ "document": "任务状态",
13518
+ "example": "1",
13519
+ "member": "int64",
13520
+ "name": "Status",
13521
+ "required": false,
13522
+ "type": "int"
13523
+ },
13524
+ {
13525
+ "disabled": false,
13526
+ "document": "执行week day",
13527
+ "example": "1,2,3,4,5,6,7",
13528
+ "member": "string",
13529
+ "name": "Week",
13530
+ "required": false,
13531
+ "type": "string"
13532
+ }
13533
+ ],
13534
+ "type": "object"
13535
+ },
13536
+ "ModifyRoutineMaintenanceTaskResponse": {
13537
+ "document": "ModifyRoutineMaintenanceTask返回参数结构体",
13538
+ "members": [
13539
+ {
13540
+ "disabled": false,
13541
+ "document": "返回结果",
13542
+ "example": "无",
13543
+ "member": "JgwOperateResponse",
13544
+ "name": "Result",
13545
+ "output_required": true,
13546
+ "type": "object",
13547
+ "value_allowed_null": false
13548
+ },
13549
+ {
13550
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
13551
+ "member": "string",
13552
+ "name": "RequestId",
13553
+ "type": "string"
13554
+ }
13555
+ ],
13556
+ "type": "object"
13557
+ },
13424
13558
  "ModifyTopicAttributesRequest": {
13425
13559
  "document": "ModifyTopicAttributes请求参数结构体",
13426
13560
  "members": [