tccli 3.0.1284.1__py2.py3-none-any.whl → 3.0.1286.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 (65) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/v20180419/api.json +88 -86
  3. tccli/services/bh/bh_client.py +53 -0
  4. tccli/services/bh/v20230418/api.json +199 -0
  5. tccli/services/bh/v20230418/examples.json +8 -0
  6. tccli/services/cdwch/v20200915/api.json +19 -9
  7. tccli/services/cdwch/v20200915/examples.json +1 -1
  8. tccli/services/cfg/v20210820/api.json +43 -19
  9. tccli/services/cfg/v20210820/examples.json +8 -2
  10. tccli/services/clb/v20180317/api.json +1 -1
  11. tccli/services/cmq/v20190304/api.json +92 -92
  12. tccli/services/cynosdb/v20190107/api.json +379 -379
  13. tccli/services/dlc/dlc_client.py +61 -8
  14. tccli/services/dlc/v20210125/api.json +254 -3
  15. tccli/services/dlc/v20210125/examples.json +11 -3
  16. tccli/services/domain/v20180808/api.json +157 -157
  17. tccli/services/dsgc/v20190723/api.json +2 -2
  18. tccli/services/dts/v20180330/api.json +3 -3
  19. tccli/services/dts/v20211206/api.json +336 -330
  20. tccli/services/emr/emr_client.py +53 -0
  21. tccli/services/emr/v20190103/api.json +247 -0
  22. tccli/services/emr/v20190103/examples.json +8 -0
  23. tccli/services/es/v20180416/api.json +10 -0
  24. tccli/services/es/v20180416/examples.json +1 -1
  25. tccli/services/fmu/fmu_client.py +8 -167
  26. tccli/services/fmu/v20191213/api.json +0 -292
  27. tccli/services/fmu/v20191213/examples.json +0 -24
  28. tccli/services/iotcloud/v20210408/api.json +27 -27
  29. tccli/services/iotcloud/v20210408/examples.json +6 -6
  30. tccli/services/iotexplorer/iotexplorer_client.py +0 -106
  31. tccli/services/iotexplorer/v20190423/api.json +0 -274
  32. tccli/services/iotexplorer/v20190423/examples.json +0 -16
  33. tccli/services/iss/v20230517/api.json +547 -537
  34. tccli/services/iss/v20230517/examples.json +2 -2
  35. tccli/services/kms/v20190118/api.json +20 -0
  36. tccli/services/lcic/lcic_client.py +114 -8
  37. tccli/services/lcic/v20220817/api.json +108 -0
  38. tccli/services/lcic/v20220817/examples.json +16 -0
  39. tccli/services/mongodb/mongodb_client.py +57 -4
  40. tccli/services/mongodb/v20190725/api.json +63 -0
  41. tccli/services/mongodb/v20190725/examples.json +14 -0
  42. tccli/services/monitor/v20180724/api.json +29 -29
  43. tccli/services/monitor/v20180724/examples.json +8 -8
  44. tccli/services/rum/v20210622/api.json +2 -2
  45. tccli/services/svp/svp_client.py +57 -4
  46. tccli/services/svp/v20240125/api.json +319 -0
  47. tccli/services/svp/v20240125/examples.json +8 -0
  48. tccli/services/tiw/tiw_client.py +91 -1416
  49. tccli/services/tiw/v20190919/api.json +351 -2897
  50. tccli/services/tiw/v20190919/examples.json +6 -206
  51. tccli/services/trtc/v20190722/api.json +16 -5
  52. tccli/services/tsf/tsf_client.py +53 -0
  53. tccli/services/tsf/v20180326/api.json +48 -4
  54. tccli/services/tsf/v20180326/examples.json +8 -0
  55. tccli/services/vpc/v20170312/api.json +54 -0
  56. tccli/services/vpc/v20170312/examples.json +8 -0
  57. tccli/services/vpc/vpc_client.py +53 -0
  58. tccli/services/wedata/v20210820/api.json +383 -0
  59. tccli/services/wedata/v20210820/examples.json +8 -0
  60. tccli/services/wedata/wedata_client.py +53 -0
  61. {tccli-3.0.1284.1.dist-info → tccli-3.0.1286.1.dist-info}/METADATA +2 -2
  62. {tccli-3.0.1284.1.dist-info → tccli-3.0.1286.1.dist-info}/RECORD +65 -65
  63. {tccli-3.0.1284.1.dist-info → tccli-3.0.1286.1.dist-info}/WHEEL +0 -0
  64. {tccli-3.0.1284.1.dist-info → tccli-3.0.1286.1.dist-info}/entry_points.txt +0 -0
  65. {tccli-3.0.1284.1.dist-info → tccli-3.0.1286.1.dist-info}/license_files/LICENSE +0 -0
@@ -2426,7 +2426,7 @@
2426
2426
  "example": "CPU使用率",
2427
2427
  "member": "string",
2428
2428
  "name": "Description",
2429
- "output_required": true,
2429
+ "output_required": false,
2430
2430
  "required": false,
2431
2431
  "type": "string",
2432
2432
  "value_allowed_null": true
@@ -2437,7 +2437,7 @@
2437
2437
  "example": "%",
2438
2438
  "member": "string",
2439
2439
  "name": "Unit",
2440
- "output_required": true,
2440
+ "output_required": false,
2441
2441
  "required": false,
2442
2442
  "type": "string",
2443
2443
  "value_allowed_null": true
@@ -2459,7 +2459,7 @@
2459
2459
  "example": "0",
2460
2460
  "member": "int64",
2461
2461
  "name": "IsAdvanced",
2462
- "output_required": true,
2462
+ "output_required": false,
2463
2463
  "required": false,
2464
2464
  "type": "int",
2465
2465
  "value_allowed_null": true
@@ -2470,7 +2470,7 @@
2470
2470
  "example": "0",
2471
2471
  "member": "int64",
2472
2472
  "name": "IsOpen",
2473
- "output_required": true,
2473
+ "output_required": false,
2474
2474
  "required": false,
2475
2475
  "type": "int",
2476
2476
  "value_allowed_null": true
@@ -2481,7 +2481,7 @@
2481
2481
  "example": "cvm",
2482
2482
  "member": "string",
2483
2483
  "name": "ProductId",
2484
- "output_required": true,
2484
+ "output_required": false,
2485
2485
  "required": false,
2486
2486
  "type": "string",
2487
2487
  "value_allowed_null": true
@@ -2492,7 +2492,7 @@
2492
2492
  "example": "0",
2493
2493
  "member": "float",
2494
2494
  "name": "ValueMax",
2495
- "output_required": true,
2495
+ "output_required": false,
2496
2496
  "required": false,
2497
2497
  "type": "float",
2498
2498
  "value_allowed_null": true
@@ -2503,7 +2503,7 @@
2503
2503
  "example": "0",
2504
2504
  "member": "float",
2505
2505
  "name": "ValueMin",
2506
- "output_required": true,
2506
+ "output_required": false,
2507
2507
  "required": false,
2508
2508
  "type": "float",
2509
2509
  "value_allowed_null": true
@@ -2525,7 +2525,7 @@
2525
2525
  "example": "1",
2526
2526
  "member": "int64",
2527
2527
  "name": "IsLatenessMetric",
2528
- "output_required": true,
2528
+ "output_required": false,
2529
2529
  "required": false,
2530
2530
  "type": "int",
2531
2531
  "value_allowed_null": true
@@ -3420,7 +3420,7 @@
3420
3420
  {
3421
3421
  "disabled": false,
3422
3422
  "document": "触发条件模板 Id,该参数与 Condition 参数二选一。如果策略绑定触发条件模板,则传该参数;否则不传该参数,而是传 Condition 参数。触发条件模板 Id 可以从 [DescribeConditionsTemplateList](https://cloud.tencent.com/document/api/248/70250) 接口获取。",
3423
- "example": "",
3423
+ "example": "9674169",
3424
3424
  "member": "int64",
3425
3425
  "name": "ConditionTemplateId",
3426
3426
  "required": false,
@@ -3528,7 +3528,7 @@
3528
3528
  {
3529
3529
  "disabled": false,
3530
3530
  "document": "附加告警内容",
3531
- "example": "",
3531
+ "example": "1 AND 2",
3532
3532
  "member": "string",
3533
3533
  "name": "AdditionalAlarmContent",
3534
3534
  "required": false,
@@ -3710,7 +3710,7 @@
3710
3710
  {
3711
3711
  "disabled": false,
3712
3712
  "document": "屏蔽规则的描述",
3713
- "example": "描述",
3713
+ "example": "实例下线,告警策略不再需要",
3714
3714
  "member": "string",
3715
3715
  "name": "Description",
3716
3716
  "required": false,
@@ -4074,7 +4074,7 @@
4074
4074
  {
4075
4075
  "disabled": false,
4076
4076
  "document": "集成配置",
4077
- "example": "[]",
4077
+ "example": "{\\\"kind\\\":\\\"tencent-cloud-kong\\\",\\\"spec\\\":{\\\"dataSourceSpec\\\":{\\\"name\\\":\\\"prometheus-kong\\\",\\\"url\\\":\\\"http://10.0.0.0:9090/\\\",\\\"user\\\":\\\"user\\\",\\\"password\\\":\\\"password\\\",\\\"labels\\\":{\\\"label\\\":\\\"test\\\"}},\\\"grafanaSpec\\\":{\\\"organizationIds\\\":[\\\"2\\\"]}}}",
4078
4078
  "member": "string",
4079
4079
  "name": "Content",
4080
4080
  "required": true,
@@ -4129,7 +4129,7 @@
4129
4129
  {
4130
4130
  "disabled": false,
4131
4131
  "document": "接受告警通道 ID 数组,值为告警管理/基础配置/通知模板中的模板 ID ",
4132
- "example": "[]",
4132
+ "example": "[“notice-7k7q3qzr”]",
4133
4133
  "member": "string",
4134
4134
  "name": "Receivers",
4135
4135
  "required": true,
@@ -4147,7 +4147,7 @@
4147
4147
  {
4148
4148
  "disabled": false,
4149
4149
  "document": "额外组织 ID 数组,已废弃,请使用 OrganizationIds",
4150
- "example": "[]",
4150
+ "example": "[“out_field”]",
4151
4151
  "member": "string",
4152
4152
  "name": "ExtraOrgIds",
4153
4153
  "required": false,
@@ -4156,7 +4156,7 @@
4156
4156
  {
4157
4157
  "disabled": false,
4158
4158
  "document": "生效的所有组织 ID 数组,默认为 [\"1\"]",
4159
- "example": "[\"1\"]",
4159
+ "example": "[\"111324\"]",
4160
4160
  "member": "string",
4161
4161
  "name": "OrganizationIds",
4162
4162
  "required": false,
@@ -4361,7 +4361,7 @@
4361
4361
  {
4362
4362
  "disabled": false,
4363
4363
  "document": "模板策略组Id, 通过模板创建时才需要传",
4364
- "example": "123",
4364
+ "example": "15500623",
4365
4365
  "member": "int64",
4366
4366
  "name": "ConditionTempGroupId",
4367
4367
  "required": false,
@@ -4442,7 +4442,7 @@
4442
4442
  "example": "1288099",
4443
4443
  "member": "int64",
4444
4444
  "name": "GroupId",
4445
- "required": true,
4445
+ "output_required": true,
4446
4446
  "type": "int",
4447
4447
  "value_allowed_null": false
4448
4448
  },
@@ -6451,7 +6451,7 @@
6451
6451
  {
6452
6452
  "disabled": false,
6453
6453
  "document": "根据项目ID过滤,-1=无项目 0=默认项目\n可在此页面查询 [项目管理](https://console.cloud.tencent.com/project)",
6454
- "example": "",
6454
+ "example": "[130034]",
6455
6455
  "member": "int64",
6456
6456
  "name": "ProjectIds",
6457
6457
  "required": false,
@@ -6460,7 +6460,7 @@
6460
6460
  {
6461
6461
  "disabled": false,
6462
6462
  "document": "根据实例组ID过滤",
6463
- "example": "",
6463
+ "example": "[1217862]",
6464
6464
  "member": "int64",
6465
6465
  "name": "InstanceGroupIds",
6466
6466
  "required": false,
@@ -6487,7 +6487,7 @@
6487
6487
  {
6488
6488
  "disabled": false,
6489
6489
  "document": "根据策略名称模糊搜索,不支持大小写区分",
6490
- "example": "",
6490
+ "example": "\"系统预设通知模板\"",
6491
6491
  "member": "string",
6492
6492
  "name": "PolicyName",
6493
6493
  "required": false,
@@ -6496,7 +6496,7 @@
6496
6496
  {
6497
6497
  "disabled": false,
6498
6498
  "document": "根据告警内容模糊搜索",
6499
- "example": "",
6499
+ "example": "CPU利用率",
6500
6500
  "member": "string",
6501
6501
  "name": "Content",
6502
6502
  "required": false,
@@ -6505,7 +6505,7 @@
6505
6505
  {
6506
6506
  "disabled": false,
6507
6507
  "document": "根据接收人搜索,可以使用“访问管理”的 [拉取子用户 ListUsers](https://cloud.tencent.com/document/product/598/34587) 接口获取用户列表 或 [查询子用户 GetUser](https://cloud.tencent.com/document/product/598/34590) 接口查询子用户详情,此处填入返回结果中的 `Uid` 字段",
6508
- "example": "",
6508
+ "example": "[11053412,16090421]",
6509
6509
  "member": "int64",
6510
6510
  "name": "ReceiverUids",
6511
6511
  "required": false,
@@ -6514,7 +6514,7 @@
6514
6514
  {
6515
6515
  "disabled": false,
6516
6516
  "document": "根据接收组搜索,可以使用“访问管理”的 [查询用户组列表 ListGroups](https://cloud.tencent.com/document/product/598/34589) 接口获取用户组列表 或 [列出用户关联的用户组 ListGroupsForUser](https://cloud.tencent.com/document/product/598/34588) 查询某个子用户所在的用户组列表 ,此处填入返回结果中的 `GroupId ` 字段",
6517
- "example": "",
6517
+ "example": "[143785,144016]",
6518
6518
  "member": "int64",
6519
6519
  "name": "ReceiverGroups",
6520
6520
  "required": false,
@@ -6523,7 +6523,7 @@
6523
6523
  {
6524
6524
  "disabled": false,
6525
6525
  "document": "根据告警策略 Id 列表搜索",
6526
- "example": "policy-abcedf",
6526
+ "example": "[policy-abtvedf]",
6527
6527
  "member": "string",
6528
6528
  "name": "PolicyIds",
6529
6529
  "required": false,
@@ -20633,7 +20633,7 @@
20633
20633
  {
20634
20634
  "disabled": false,
20635
20635
  "document": "策略组id,如传入 PolicyId 则该字段被忽略可传入任意值如 0",
20636
- "example": "11111",
20636
+ "example": "11106331",
20637
20637
  "member": "int64",
20638
20638
  "name": "GroupId",
20639
20639
  "required": true,
@@ -21120,7 +21120,7 @@
21120
21120
  {
21121
21121
  "disabled": false,
21122
21122
  "document": "JSON 序列化后的环境变量字符串,如 \"{\\\"key1\\\":\\\"key2\\\"}\"\n",
21123
- "example": "{}",
21123
+ "example": "\"{\\\"key_1\\\":\\\"value_1\\\"}\"\t",
21124
21124
  "member": "string",
21125
21125
  "name": "Envs",
21126
21126
  "required": true,
@@ -21219,7 +21219,7 @@
21219
21219
  {
21220
21220
  "disabled": false,
21221
21221
  "document": "接受告警通道 ID 数组",
21222
- "example": "[]",
21222
+ "example": "[“test-Receivers”]",
21223
21223
  "member": "string",
21224
21224
  "name": "Receivers",
21225
21225
  "required": true,
@@ -21237,7 +21237,7 @@
21237
21237
  {
21238
21238
  "disabled": false,
21239
21239
  "document": "已废弃,请使用 OrganizationIds",
21240
- "example": "[]",
21240
+ "example": "[\"test-ExtraOrgIds\"]",
21241
21241
  "member": "string",
21242
21242
  "name": "ExtraOrgIds",
21243
21243
  "required": false,
@@ -21653,7 +21653,7 @@
21653
21653
  {
21654
21654
  "disabled": false,
21655
21655
  "document": "备注",
21656
- "example": "xxx",
21656
+ "example": "授权该用户",
21657
21657
  "member": "string",
21658
21658
  "name": "Notes",
21659
21659
  "required": false,
@@ -44,7 +44,7 @@
44
44
  {
45
45
  "document": "策略类型为“云服务器-基础监控”,触发指标为CPU使用率大于等于99.9%,触发事件为“ping不可达”,绑定两个通知规则,绑定一个弹性伸缩策略",
46
46
  "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAlarmPolicy\n<公共请求参数>\n\n{\n \"Module\": \"monitor\",\n \"PolicyName\": \"云服务器告警策略\",\n \"Remark\": \"这是一句备注\",\n \"MonitorType\": \"MT_QCE\",\n \"Enable\": 1,\n \"ProjectId\": 0,\n \"Namespace\": \"cvm_device\",\n \"Condition\": {\n \"IsUnionRule\": 1,\n \"Rules\": [\n {\n \"MetricName\": \"CvmDiskUsage\",\n \"Period\": 60,\n \"Operator\": \"ge\",\n \"Value\": \"99.9\",\n \"ContinuePeriod\": 1,\n \"NoticeFrequency\": 3600,\n \"IsPowerNotice\": 0\n }\n ]\n },\n \"EventCondition\": {\n \"Rules\": [\n {\n \"MetricName\": \"ping_unreach\"\n }\n ]\n },\n \"NoticeIds\": [\n \"notice-bv9b4ghqbg\",\n \"notice-gj2n9wnt29\"\n ],\n \"TriggerTasks\": [\n {\n \"Type\": \"AS\",\n \"TaskConfig\": \"{\\\"Region\\\":\\\"ap-guangzhou\\\",\\\"Group\\\":\\\"asg-0zhspjx\\\",\\\"Policy\\\":\\\"asp-ganig28\\\"}\"\n }\n ]\n}",
47
- "output": "{\n \"Response\": {\n \"RequestId\": \"29ghj2hh-45-h53h234h-23\",\n \"PolicyId\": \"policy-hi498gw3h2\",\n \"OriginId\": \"1234556\"\n }\n}",
47
+ "output": "{\n \"Response\": {\n \"RequestId\": \"29ghj2hh-45-h53h234h-23\",\n \"PolicyId\": \"policy-hi498gw3h2\",\n \"OriginId\": \"123477556\"\n }\n}",
48
48
  "title": "创建告警策略"
49
49
  }
50
50
  ],
@@ -217,8 +217,8 @@
217
217
  "CreateGrafanaNotificationChannel": [
218
218
  {
219
219
  "document": "创建 Grafana 告警通道",
220
- "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateGrafanaNotificationChannel\n<公共请求参数>\n\n{\n \"InstanceId\": \"grafana-abcdefgh\",\n \"ChannelName\": \"test\",\n \"OrgId\": 0,\n \"Receivers\": [\n \"abc\"\n ]\n}",
221
- "output": "{\n \"Response\": {\n \"ChannelId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
220
+ "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateGrafanaNotificationChannel\n<公共请求参数>\n\n{\n \"InstanceId\": \"grafana-abcdefgh\",\n \"ChannelName\": \"test\",\n \"OrgId\": 0,\n \"Receivers\": [\n \"notice-7k7q3qzr\"\n ]\n}",
221
+ "output": "{\n \"Response\": {\n \"ChannelId\": \"99434792\",\n \"RequestId\": \"e3adaaf0-7266-4949-be41-bed713136876\"\n }\n}",
222
222
  "title": "创建 Grafana 告警通道"
223
223
  }
224
224
  ],
@@ -518,13 +518,13 @@
518
518
  {
519
519
  "document": "",
520
520
  "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAlarmHistories\n<公共请求参数>\n\n{\n \"Module\": \"monitor\",\n \"PageNumber\": 1,\n \"PageSize\": 10,\n \"StartTime\": 1598976507,\n \"EndTime\": 1599019707\n}",
521
- "output": "{\n \"Response\": {\n \"TotalCount\": 0,\n \"Histories\": [\n {\n \"AlarmId\": \"abc\",\n \"MonitorType\": \"abc\",\n \"Namespace\": \"abc\",\n \"AlarmObject\": \"abc\",\n \"Content\": \"abc\",\n \"FirstOccurTime\": 0,\n \"LastOccurTime\": 0,\n \"AlarmStatus\": \"abc\",\n \"PolicyId\": \"abc\",\n \"PolicyName\": \"abc\",\n \"VPC\": \"abc\",\n \"ProjectId\": 0,\n \"ProjectName\": \"abc\",\n \"InstanceGroup\": [\n {\n \"Id\": 0,\n \"Name\": \"abc\"\n }\n ],\n \"ReceiverUids\": [\n 0\n ],\n \"ReceiverGroups\": [\n 0\n ],\n \"NoticeWays\": [\n \"abc\"\n ],\n \"OriginId\": \"abc\",\n \"AlarmType\": \"abc\",\n \"EventId\": 0,\n \"Region\": \"abc\",\n \"PolicyExists\": 0,\n \"MetricsInfo\": [\n {\n \"QceNamespace\": \"abc\",\n \"MetricName\": \"abc\",\n \"Period\": 0,\n \"Value\": \"abc\",\n \"Description\": \"abc\"\n }\n ],\n \"Dimensions\": \"abc\",\n \"AlarmLevel\": \"abc\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
521
+ "output": "{\n \"Response\": {\n \"TotalCount\": 10,\n \"Histories\": [\n {\n \"AlarmId\": \"23456789-12ab-45cd-8ef0-123456789\",\n \"MonitorType\": \"cvm\",\n \"Namespace\": \"cvm_device\",\n \"AlarmObject\": \"ins-123456\",\n \"Content\": \"实例 ins-123456 CPU 使用率过高\",\n \"FirstOccurTime\": 1672531200,\n \"LastOccurTime\": 1672534800,\n \"AlarmStatus\": \"2\",\n \"PolicyId\": \"policy-123456\",\n \"PolicyName\": \"云服务器 CPU 使用率告警策略\",\n \"VPC\": \"vpc-123456\",\n \"ProjectId\": 12345,\n \"ProjectName\": \"项目 A\",\n \"InstanceGroup\": [\n {\n \"Id\": 1,\n \"Name\": \"生产环境实例组\"\n }\n ],\n \"ReceiverUids\": [\n 1001,\n 1002\n ],\n \"ReceiverGroups\": [\n 2001\n ],\n \"NoticeWays\": [\n \"sms\",\n \"email\"\n ],\n \"OriginId\": \"1234567890\",\n \"AlarmType\": \"metric_alarm\",\n \"EventId\": 123456,\n \"Region\": \"ap-guangzhou\",\n \"PolicyExists\": 1,\n \"MetricsInfo\": [\n {\n \"QceNamespace\": \"qce/cvm\",\n \"MetricName\": \"cpu_utilization\",\n \"Period\": 60,\n \"Value\": \"80\",\n \"Description\": \"云服务器 CPU 使用率指标\"\n }\n ],\n \"Dimensions\": \"{\\\"InstanceId\\\":\\\"ins-123456\\\"}\",\n \"AlarmLevel\": \"high\"\n }\n ],\n \"RequestId\": \"1234567890abcdef\"\n }\n}",
522
522
  "title": "查询告警历史"
523
523
  },
524
524
  {
525
525
  "document": "监控类型是一级概念,策略类型是二级概念,因此在 Namespaces 字段中只有在指定监控类型后,策略类型才有意义。\n\n如果要查询“云服务器-基础监控”的告警历史,这里的过滤条件应为:监控类型=“云产品监控”,策略类型=“云服务器-基础监控”\n\nMonitorTypes 作为一级过滤条件应填入 `[\"MT_QCE\"]`\n\nNamespaces 作为二级过滤条件应填入 `[{\"MonitorType\": \"MT_QCE\", \"Namespace\": \"cvm_device\"}]`",
526
526
  "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAlarmHistories\n<公共请求参数>\n\n{\n \"Module\": \"monitor\",\n \"PageNumber\": 1,\n \"PageSize\": 10,\n \"StartTime\": 1598976507,\n \"EndTime\": 1599019707,\n \"MonitorTypes\": [\n \"MT_QCE\"\n ],\n \"Namespaces\": [\n {\n \"MonitorType\": \"MT_QCE\",\n \"Namespace\": \"cvm_device\"\n }\n ]\n}",
527
- "output": "{\n \"Response\": {\n \"TotalCount\": 0,\n \"Histories\": [\n {\n \"AlarmId\": \"abc\",\n \"MonitorType\": \"abc\",\n \"Namespace\": \"abc\",\n \"AlarmObject\": \"abc\",\n \"Content\": \"abc\",\n \"FirstOccurTime\": 0,\n \"LastOccurTime\": 0,\n \"AlarmStatus\": \"abc\",\n \"PolicyId\": \"abc\",\n \"PolicyName\": \"abc\",\n \"VPC\": \"abc\",\n \"ProjectId\": 0,\n \"ProjectName\": \"abc\",\n \"InstanceGroup\": [\n {\n \"Id\": 0,\n \"Name\": \"abc\"\n }\n ],\n \"ReceiverUids\": [\n 0\n ],\n \"ReceiverGroups\": [\n 0\n ],\n \"NoticeWays\": [\n \"abc\"\n ],\n \"OriginId\": \"abc\",\n \"AlarmType\": \"abc\",\n \"EventId\": 0,\n \"Region\": \"abc\",\n \"PolicyExists\": 0,\n \"MetricsInfo\": [\n {\n \"QceNamespace\": \"abc\",\n \"MetricName\": \"abc\",\n \"Period\": 0,\n \"Value\": \"abc\",\n \"Description\": \"abc\"\n }\n ],\n \"Dimensions\": \"abc\",\n \"AlarmLevel\": \"abc\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
527
+ "output": "{\n \"Response\": {\n \"TotalCount\": 10,\n \"Histories\": [\n {\n \"AlarmId\": \"23456789-12ab-45cd-8ef0-123456789\",\n \"MonitorType\": \"cvm\",\n \"Namespace\": \"cvm_device\",\n \"AlarmObject\": \"ins-123456\",\n \"Content\": \"实例 ins-123456 CPU 使用率过高\",\n \"FirstOccurTime\": 1672531200,\n \"LastOccurTime\": 1672534800,\n \"AlarmStatus\": \"2\",\n \"PolicyId\": \"policy-123456\",\n \"PolicyName\": \"云服务器 CPU 使用率告警策略\",\n \"VPC\": \"vpc-123456\",\n \"ProjectId\": 12345,\n \"ProjectName\": \"项目 A\",\n \"InstanceGroup\": [\n {\n \"Id\": 1,\n \"Name\": \"生产环境实例组\"\n }\n ],\n \"ReceiverUids\": [\n 1001,\n 1002\n ],\n \"ReceiverGroups\": [\n 2001\n ],\n \"NoticeWays\": [\n \"sms\",\n \"email\"\n ],\n \"OriginId\": \"1234567890\",\n \"AlarmType\": \"metric_alarm\",\n \"EventId\": 123456,\n \"Region\": \"ap-guangzhou\",\n \"PolicyExists\": 1,\n \"MetricsInfo\": [\n {\n \"QceNamespace\": \"qce/cvm\",\n \"MetricName\": \"cpu_utilization\",\n \"Period\": 60,\n \"Value\": \"80\",\n \"Description\": \"云服务器 CPU 使用率指标\"\n }\n ],\n \"Dimensions\": \"{\\\"InstanceId\\\":\\\"ins-123456\\\"}\",\n \"AlarmLevel\": \"high\"\n }\n ],\n \"RequestId\": \"1234567890abcdef\"\n }\n}",
528
528
  "title": "查询“云服务器-基础监控”的告警历史"
529
529
  }
530
530
  ],
@@ -1285,7 +1285,7 @@
1285
1285
  "UnBindingPolicyObject": [
1286
1286
  {
1287
1287
  "document": "",
1288
- "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UnBindingPolicyObject\n<公共请求参数>\n\n{\n \"UniqueId\": [\n \"3dd5113208fd467b2e5d0c1111111111\"\n ],\n \"GroupId\": 11111,\n \"Module\": \"monitor\"\n}",
1288
+ "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UnBindingPolicyObject\n<公共请求参数>\n\n{\n \"UniqueId\": [\n \"3dd5113208fd467b2e5d0c1111111111\"\n ],\n \"GroupId\": 11106331,\n \"Module\": \"monitor\"\n}",
1289
1289
  "output": "{\n \"Response\": {\n \"RequestId\": \"0dbb66c2-1111-1111-1111-11111111111\"\n }\n}",
1290
1290
  "title": "删除策略的关联对象"
1291
1291
  }
@@ -1385,8 +1385,8 @@
1385
1385
  "UpdateGrafanaNotificationChannel": [
1386
1386
  {
1387
1387
  "document": "更新 Grafana 告警通道",
1388
- "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGrafanaNotificationChannel\n<公共请求参数>\n\n{\n \"InstanceId\": \"grafana-12345678\",\n \"ChannelId\": \"nchannel-abcd1234\",\n \"ChannelName\": \"test\",\n \"Receivers\": [\n \"abc\"\n ]\n}",
1389
- "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
1388
+ "input": "POST / HTTP/1.1\nHost: monitor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGrafanaNotificationChannel\n<公共请求参数>\n\n{\n \"InstanceId\": \"grafana-12345678\",\n \"ChannelId\": \"nchannel-abcd1234\",\n \"ChannelName\": \"test-channel\",\n \"Receivers\": [\n \"test-Receivers\"\n ]\n}",
1389
+ "output": "{\n \"Response\": {\n \"RequestId\": \"e3adaaf0-7266-4949-be41-bed713136876\"\n }\n}",
1390
1390
  "title": "更新 Grafana 告警通道"
1391
1391
  }
1392
1392
  ],
@@ -7080,13 +7080,13 @@
7080
7080
  },
7081
7081
  {
7082
7082
  "disabled": false,
7083
- "document": "kafka旁路配置信息\n注意:此字段可能返回 null,表示取不到有效值。",
7083
+ "document": "kafka旁路配置信息",
7084
7084
  "example": "Kafka",
7085
7085
  "member": "Kafka",
7086
7086
  "name": "Kafka",
7087
7087
  "output_required": false,
7088
7088
  "type": "object",
7089
- "value_allowed_null": true
7089
+ "value_allowed_null": false
7090
7090
  }
7091
7091
  ],
7092
7092
  "usage": "out"
@@ -17,6 +17,58 @@ from tencentcloud.svp.v20240125 import models as models_v20240125
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doCreateSavingPlanOrder(args, parsed_globals):
21
+ g_param = parse_global_arg(parsed_globals)
22
+
23
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
+ cred = credential.CVMRoleCredential()
25
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
+ cred = credential.STSAssumeRoleCredential(
27
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
29
+ )
30
+ 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):
31
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
+ else:
33
+ cred = credential.Credential(
34
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
+ )
36
+ http_profile = HttpProfile(
37
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
+ reqMethod="POST",
39
+ endpoint=g_param[OptionsDefine.Endpoint],
40
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
+ )
42
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
+ if g_param[OptionsDefine.Language]:
44
+ profile.language = g_param[OptionsDefine.Language]
45
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
+ client = mod.SvpClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.CreateSavingPlanOrderRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.CreateSavingPlanOrder(model)
54
+ result = rsp.to_json_string()
55
+ try:
56
+ json_obj = json.loads(result)
57
+ except TypeError as e:
58
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
59
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
+ break
61
+ cur_time = time.time()
62
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
+ else:
67
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
+
71
+
20
72
  def doDescribeSavingPlanUsage(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -121,7 +173,7 @@ def doDescribeSavingPlanOverview(args, parsed_globals):
121
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
174
 
123
175
 
124
- def doCreateSavingPlanOrder(args, parsed_globals):
176
+ def doDescribeSavingPlanCoverage(args, parsed_globals):
125
177
  g_param = parse_global_arg(parsed_globals)
126
178
 
127
179
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +202,11 @@ def doCreateSavingPlanOrder(args, parsed_globals):
150
202
  client = mod.SvpClient(cred, g_param[OptionsDefine.Region], profile)
151
203
  client._sdkVersion += ("_CLI_" + __version__)
152
204
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.CreateSavingPlanOrderRequest()
205
+ model = models.DescribeSavingPlanCoverageRequest()
154
206
  model.from_json_string(json.dumps(args))
155
207
  start_time = time.time()
156
208
  while True:
157
- rsp = client.CreateSavingPlanOrder(model)
209
+ rsp = client.DescribeSavingPlanCoverage(model)
158
210
  result = rsp.to_json_string()
159
211
  try:
160
212
  json_obj = json.loads(result)
@@ -236,9 +288,10 @@ MODELS_MAP = {
236
288
  }
237
289
 
238
290
  ACTION_MAP = {
291
+ "CreateSavingPlanOrder": doCreateSavingPlanOrder,
239
292
  "DescribeSavingPlanUsage": doDescribeSavingPlanUsage,
240
293
  "DescribeSavingPlanOverview": doDescribeSavingPlanOverview,
241
- "CreateSavingPlanOrder": doCreateSavingPlanOrder,
294
+ "DescribeSavingPlanCoverage": doDescribeSavingPlanCoverage,
242
295
  "DescribeSavingPlanDeduct": doDescribeSavingPlanDeduct,
243
296
 
244
297
  }