tccli 3.0.1283.1__py2.py3-none-any.whl → 3.0.1285.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 (104) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/acp/v20220105/api.json +23 -23
  3. tccli/services/acp/v20220105/examples.json +2 -8
  4. tccli/services/advisor/v20200721/api.json +4 -2
  5. tccli/services/apm/v20210622/api.json +1 -1
  6. tccli/services/autoscaling/v20180419/api.json +88 -86
  7. tccli/services/bh/bh_client.py +53 -0
  8. tccli/services/bh/v20230418/api.json +199 -0
  9. tccli/services/bh/v20230418/examples.json +8 -0
  10. tccli/services/cdn/v20180606/api.json +4 -2
  11. tccli/services/cdwch/v20200915/api.json +19 -9
  12. tccli/services/cdwch/v20200915/examples.json +1 -1
  13. tccli/services/cdwdoris/v20211228/api.json +18 -0
  14. tccli/services/cfg/v20210820/api.json +48 -24
  15. tccli/services/cfg/v20210820/examples.json +8 -2
  16. tccli/services/clb/v20180317/api.json +21 -3
  17. tccli/services/cmq/v20190304/api.json +92 -92
  18. tccli/services/cynosdb/v20190107/api.json +389 -379
  19. tccli/services/dbbrain/v20191016/api.json +17 -17
  20. tccli/services/dbbrain/v20210527/api.json +22 -22
  21. tccli/services/dcdb/v20180411/api.json +14 -4
  22. tccli/services/dcdb/v20180411/examples.json +1 -1
  23. tccli/services/dlc/v20210125/api.json +130 -58
  24. tccli/services/dlc/v20210125/examples.json +5 -5
  25. tccli/services/domain/v20180808/api.json +160 -160
  26. tccli/services/dsgc/v20190723/api.json +2 -2
  27. tccli/services/dts/v20180330/api.json +19 -19
  28. tccli/services/dts/v20211206/api.json +829 -818
  29. tccli/services/emr/emr_client.py +53 -0
  30. tccli/services/emr/v20190103/api.json +247 -0
  31. tccli/services/emr/v20190103/examples.json +8 -0
  32. tccli/services/es/v20180416/api.json +13 -3
  33. tccli/services/es/v20180416/examples.json +2 -2
  34. tccli/services/ess/ess_client.py +53 -0
  35. tccli/services/ess/v20201111/api.json +122 -1
  36. tccli/services/ess/v20201111/examples.json +26 -0
  37. tccli/services/essbasic/essbasic_client.py +57 -4
  38. tccli/services/essbasic/v20210526/api.json +163 -0
  39. tccli/services/essbasic/v20210526/examples.json +26 -0
  40. tccli/services/fmu/fmu_client.py +8 -167
  41. tccli/services/fmu/v20191213/api.json +0 -292
  42. tccli/services/fmu/v20191213/examples.json +0 -24
  43. tccli/services/goosefs/v20220519/api.json +26 -24
  44. tccli/services/goosefs/v20220519/examples.json +2 -2
  45. tccli/services/iotcloud/v20210408/api.json +27 -27
  46. tccli/services/iotcloud/v20210408/examples.json +6 -6
  47. tccli/services/iotexplorer/iotexplorer_client.py +0 -106
  48. tccli/services/iotexplorer/v20190423/api.json +0 -274
  49. tccli/services/iotexplorer/v20190423/examples.json +0 -16
  50. tccli/services/iss/v20230517/api.json +547 -537
  51. tccli/services/iss/v20230517/examples.json +2 -2
  52. tccli/services/kms/v20190118/api.json +20 -0
  53. tccli/services/lcic/lcic_client.py +114 -8
  54. tccli/services/lcic/v20220817/api.json +108 -0
  55. tccli/services/lcic/v20220817/examples.json +16 -0
  56. tccli/services/lke/v20231130/api.json +8 -8
  57. tccli/services/lke/v20231130/examples.json +1 -1
  58. tccli/services/lowcode/v20210108/api.json +165 -165
  59. tccli/services/lowcode/v20210108/examples.json +5 -5
  60. tccli/services/mariadb/v20170312/api.json +12 -2
  61. tccli/services/mariadb/v20170312/examples.json +4 -4
  62. tccli/services/mongodb/mongodb_client.py +57 -4
  63. tccli/services/mongodb/v20190725/api.json +63 -0
  64. tccli/services/mongodb/v20190725/examples.json +14 -0
  65. tccli/services/monitor/v20180724/api.json +36 -36
  66. tccli/services/monitor/v20180724/examples.json +10 -10
  67. tccli/services/ocr/v20181119/api.json +2 -2
  68. tccli/services/ocr/v20181119/examples.json +2 -2
  69. tccli/services/organization/organization_client.py +53 -0
  70. tccli/services/organization/v20210331/api.json +61 -0
  71. tccli/services/organization/v20210331/examples.json +8 -0
  72. tccli/services/redis/v20180412/api.json +11 -2
  73. tccli/services/redis/v20180412/examples.json +1 -1
  74. tccli/services/scf/v20180416/api.json +40 -0
  75. tccli/services/svp/svp_client.py +57 -4
  76. tccli/services/svp/v20240125/api.json +319 -0
  77. tccli/services/svp/v20240125/examples.json +8 -0
  78. tccli/services/tdmq/tdmq_client.py +4 -57
  79. tccli/services/tdmq/v20200217/api.json +118 -212
  80. tccli/services/tdmq/v20200217/examples.json +0 -8
  81. tccli/services/tds/v20220801/api.json +2 -2
  82. tccli/services/tione/v20211111/api.json +41 -1
  83. tccli/services/trtc/v20190722/api.json +16 -5
  84. tccli/services/tse/v20201207/api.json +207 -104
  85. tccli/services/tsf/tsf_client.py +53 -0
  86. tccli/services/tsf/v20180326/api.json +48 -4
  87. tccli/services/tsf/v20180326/examples.json +8 -0
  88. tccli/services/vclm/v20240523/api.json +20 -2
  89. tccli/services/vdb/v20230616/api.json +62 -62
  90. tccli/services/vdb/v20230616/examples.json +2 -2
  91. tccli/services/vpc/v20170312/api.json +54 -0
  92. tccli/services/vpc/v20170312/examples.json +8 -0
  93. tccli/services/vpc/vpc_client.py +53 -0
  94. tccli/services/waf/v20180125/api.json +143 -0
  95. tccli/services/waf/v20180125/examples.json +16 -0
  96. tccli/services/waf/waf_client.py +106 -0
  97. tccli/services/wedata/v20210820/api.json +1220 -5
  98. tccli/services/wedata/v20210820/examples.json +32 -8
  99. tccli/services/wedata/wedata_client.py +159 -0
  100. {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/METADATA +2 -2
  101. {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/RECORD +104 -104
  102. {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/WHEEL +0 -0
  103. {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/entry_points.txt +0 -0
  104. {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/license_files/LICENSE +0 -0
@@ -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
  ],
@@ -853,8 +853,8 @@
853
853
  "DescribePrometheusConfig": [
854
854
  {
855
855
  "document": "拉取prometheus配置",
856
- "input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusConfig\r\n&InstanceId=prom-xxx\r\n&ClusterType=tke\r\n&ClusterId=cls-xxx\r\n&<公共请求参数>",
857
- "output": "{\n \"Response\": {\n \"Config\": \"abc\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"test-rawjob\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"Probes\": [\n {\n \"Name\": \"test-probe\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ImageNeedUpdate\": true,\n \"RequestId\": \"abc\"\n }\n}",
856
+ "input": "https://monitor.tencentcloudapi.com/?Action=DescribePrometheusConfig\n&InstanceId=prom-fdfasasf\n&ClusterType=tke\n&ClusterId=cls-gdgdge\n&<公共请求参数>",
857
+ "output": "{\n \"Response\": {\n \"Config\": \"global:\\n scrape_interval: 15s\",\n \"ServiceMonitors\": [\n {\n \"Name\": \"test-sm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"PodMonitors\": [\n {\n \"Name\": \"test-pm\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"RawJobs\": [\n {\n \"Name\": \"test-rawjob\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"Probes\": [\n {\n \"Name\": \"test-probe\",\n \"Config\": \"scrape_interval:5s\\n\",\n \"TemplateId\": \"temp-akdj\",\n \"Targets\": {\n \"Total\": 1,\n \"Up\": 1,\n \"Down\": 1,\n \"Unknown\": 1\n }\n }\n ],\n \"ImageNeedUpdate\": true,\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
858
858
  "title": "拉取prometheus配置"
859
859
  }
860
860
  ],
@@ -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
  ],
@@ -603,7 +603,7 @@
603
603
  "status": "online"
604
604
  },
605
605
  "VerifyOfdVatInvoiceOCR": {
606
- "document": "本接口支持OFD格式的 增值税电子普通发票、增值税电子专用发票、电子发票(普通发票)、电子发票(增值税专用发票)、电子发票(铁路电子客票)、电子发票(航空运输电子客票行程单)识别,返回发票代码、发票号码、开票日期、验证码、机器编号、密码区,购买方和销售方信息,包括名称、纳税人识别号、地址电话、开户行及账号,以及价税合计、开票人、收款人、复核人、税额、不含税金额等字段信息。",
606
+ "document": "本接口支持OFD格式的增值税电子普通发票、增值税电子专用发票、电子发票(普通发票)、电子发票(增值税专用发票)、电子发票(铁路电子客票)、电子发票(航空运输电子客票行程单)识别,返回发票代码、发票号码、开票日期、验证码、机器编号、密码区,购买方和销售方信息,包括名称、纳税人识别号、地址电话、开户行及账号,以及价税合计、开票人、收款人、复核人、税额、不含税金额等字段信息。",
607
607
  "input": "VerifyOfdVatInvoiceOCRRequest",
608
608
  "name": "OFD发票识别",
609
609
  "output": "VerifyOfdVatInvoiceOCRResponse",
@@ -22972,7 +22972,7 @@
22972
22972
  },
22973
22973
  {
22974
22974
  "disabled": false,
22975
- "document": "OFD文件的 Base64 值。\nOfdFileUrl 和 OfdFileBase64 必传其一,若两者都传,只解析OfdFileBase64。",
22975
+ "document": "OFD文件的 Base64 值。OfdFileUrl 和 OfdFileBase64 必传其一,若两者都传,只使用OfdFileUrl。",
22976
22976
  "example": "/9j/4AAQSkZJRg.....s97n//2Q==",
22977
22977
  "member": "string",
22978
22978
  "name": "OfdFileBase64",
@@ -198,10 +198,10 @@
198
198
  ],
199
199
  "GeneralEfficientOCR": [
200
200
  {
201
- "document": "通用印刷体识别(精简版)示例",
201
+ "document": "通用印刷体识别(精简版)示例 , [ 前往调试工具](https://console.cloud.tencent.com/api/explorer?Product=ocr&Action=GeneralEfficientOCR)",
202
202
  "input": "POST / HTTP/1.1\nHost: ocr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GeneralEfficientOCR\n<公共请求参数>\n\n{\n \"ImageUrl\": \"https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/general/GeneralBasicOCR/GeneralBasicOCR1.jpg\"\n}",
203
203
  "output": "{\n \"Response\": {\n \"Angle\": 0,\n \"Angel\": 0,\n \"RequestId\": \"389c588f-ae23-42f9-a34c-c5dfafc8fdd1\",\n \"TextDetections\": [\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":1}}\",\n \"Confidence\": 99,\n \"DetectedText\": \"Sun\",\n \"ItemPolygon\": {\n \"Height\": 35,\n \"Width\": 71,\n \"X\": 467,\n \"Y\": 104\n },\n \"Polygon\": [\n {\n \"X\": 467,\n \"Y\": 104\n },\n {\n \"X\": 537,\n \"Y\": 104\n },\n {\n \"X\": 537,\n \"Y\": 138\n },\n {\n \"X\": 467,\n \"Y\": 138\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":1}}\",\n \"Confidence\": 99,\n \"DetectedText\": \"1月8日\",\n \"ItemPolygon\": {\n \"Height\": 19,\n \"Width\": 55,\n \"X\": 474,\n \"Y\": 142\n },\n \"Polygon\": [\n {\n \"X\": 474,\n \"Y\": 142\n },\n {\n \"X\": 528,\n \"Y\": 142\n },\n {\n \"X\": 528,\n \"Y\": 160\n },\n {\n \"X\": 474,\n \"Y\": 160\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":2}}\",\n \"Confidence\": 99,\n \"DetectedText\": \"八色鸫\",\n \"ItemPolygon\": {\n \"Height\": 29,\n \"Width\": 81,\n \"X\": 66,\n \"Y\": 443\n },\n \"Polygon\": [\n {\n \"X\": 66,\n \"Y\": 443\n },\n {\n \"X\": 146,\n \"Y\": 443\n },\n {\n \"X\": 146,\n \"Y\": 471\n },\n {\n \"X\": 66,\n \"Y\": 471\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":3}}\",\n \"Confidence\": 86,\n \"DetectedText\": \"Pilta nympha\",\n \"ItemPolygon\": {\n \"Height\": 19,\n \"Width\": 95,\n \"X\": 63,\n \"Y\": 482\n },\n \"Polygon\": [\n {\n \"X\": 63,\n \"Y\": 482\n },\n {\n \"X\": 157,\n \"Y\": 482\n },\n {\n \"X\": 157,\n \"Y\": 500\n },\n {\n \"X\": 63,\n \"Y\": 500\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":4}}\",\n \"Confidence\": 93,\n \"DetectedText\": \"八色鸫雌鸟和雄鸟样漂亮。它经常在亚热带的森林地面上走动,捕\",\n \"ItemPolygon\": {\n \"Height\": 20,\n \"Width\": 424,\n \"X\": 63,\n \"Y\": 505\n },\n \"Polygon\": [\n {\n \"X\": 63,\n \"Y\": 505\n },\n {\n \"X\": 486,\n \"Y\": 505\n },\n {\n \"X\": 486,\n \"Y\": 524\n },\n {\n \"X\": 63,\n \"Y\": 524\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":4}}\",\n \"Confidence\": 98,\n \"DetectedText\": \"食落叶下的昆虫和蜥蜴等小动物,唱歌时会飞到树上。因为森林砍伐\",\n \"ItemPolygon\": {\n \"Height\": 20,\n \"Width\": 426,\n \"X\": 61,\n \"Y\": 529\n },\n \"Polygon\": [\n {\n \"X\": 61,\n \"Y\": 529\n },\n {\n \"X\": 486,\n \"Y\": 529\n },\n {\n \"X\": 486,\n \"Y\": 548\n },\n {\n \"X\": 61,\n \"Y\": 548\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n },\n {\n \"AdvancedInfo\": \"{\\\"Parag\\\":{\\\"ParagNo\\\":4}}\",\n \"Confidence\": 98,\n \"DetectedText\": \"和非法的玩赏鸟贸易,现在它的数量已明显减少。\",\n \"ItemPolygon\": {\n \"Height\": 18,\n \"Width\": 309,\n \"X\": 59,\n \"Y\": 555\n },\n \"Polygon\": [\n {\n \"X\": 59,\n \"Y\": 555\n },\n {\n \"X\": 367,\n \"Y\": 555\n },\n {\n \"X\": 367,\n \"Y\": 572\n },\n {\n \"X\": 59,\n \"Y\": 572\n }\n ],\n \"WordCoordPoint\": [],\n \"Words\": []\n }\n ]\n }\n}",
204
- "title": "通用印刷体识别(精简版)示例代码 [ 前往调试工具](https://console.cloud.tencent.com/api/explorer?Product=ocr&Action=GeneralEfficientOCR)"
204
+ "title": "通用印刷体识别(精简版)示例代码"
205
205
  }
206
206
  ],
207
207
  "GeneralFastOCR": [
@@ -3711,6 +3711,58 @@ def doDeletePolicy(args, parsed_globals):
3711
3711
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3712
3712
 
3713
3713
 
3714
+ def doUpdateOrganizationMembersPolicy(args, parsed_globals):
3715
+ g_param = parse_global_arg(parsed_globals)
3716
+
3717
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3718
+ cred = credential.CVMRoleCredential()
3719
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3720
+ cred = credential.STSAssumeRoleCredential(
3721
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3722
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3723
+ )
3724
+ 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):
3725
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3726
+ else:
3727
+ cred = credential.Credential(
3728
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3729
+ )
3730
+ http_profile = HttpProfile(
3731
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3732
+ reqMethod="POST",
3733
+ endpoint=g_param[OptionsDefine.Endpoint],
3734
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3735
+ )
3736
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3737
+ if g_param[OptionsDefine.Language]:
3738
+ profile.language = g_param[OptionsDefine.Language]
3739
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3740
+ client = mod.OrganizationClient(cred, g_param[OptionsDefine.Region], profile)
3741
+ client._sdkVersion += ("_CLI_" + __version__)
3742
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3743
+ model = models.UpdateOrganizationMembersPolicyRequest()
3744
+ model.from_json_string(json.dumps(args))
3745
+ start_time = time.time()
3746
+ while True:
3747
+ rsp = client.UpdateOrganizationMembersPolicy(model)
3748
+ result = rsp.to_json_string()
3749
+ try:
3750
+ json_obj = json.loads(result)
3751
+ except TypeError as e:
3752
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3753
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3754
+ break
3755
+ cur_time = time.time()
3756
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3757
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3758
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3759
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3760
+ else:
3761
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3762
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3763
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3764
+
3765
+
3714
3766
  def doCreateGroup(args, parsed_globals):
3715
3767
  g_param = parse_global_arg(parsed_globals)
3716
3768
 
@@ -7279,6 +7331,7 @@ ACTION_MAP = {
7279
7331
  "AddPermissionPolicyToRoleConfiguration": doAddPermissionPolicyToRoleConfiguration,
7280
7332
  "DeleteOrganizationMembersPolicy": doDeleteOrganizationMembersPolicy,
7281
7333
  "DeletePolicy": doDeletePolicy,
7334
+ "UpdateOrganizationMembersPolicy": doUpdateOrganizationMembersPolicy,
7282
7335
  "CreateGroup": doCreateGroup,
7283
7336
  "DescribeShareUnitMembers": doDescribeShareUnitMembers,
7284
7337
  "DismantleRoleConfiguration": doDismantleRoleConfiguration,
@@ -812,6 +812,13 @@
812
812
  "output": "UpdateOrganizationMemberEmailBindResponse",
813
813
  "status": "online"
814
814
  },
815
+ "UpdateOrganizationMembersPolicy": {
816
+ "document": "修改组织成员访问策略",
817
+ "input": "UpdateOrganizationMembersPolicyRequest",
818
+ "name": "修改组织成员访问策略",
819
+ "output": "UpdateOrganizationMembersPolicyResponse",
820
+ "status": "online"
821
+ },
815
822
  "UpdateOrganizationNode": {
816
823
  "document": "更新企业组织节点",
817
824
  "input": "UpdateOrganizationNodeRequest",
@@ -11618,6 +11625,60 @@
11618
11625
  ],
11619
11626
  "type": "object"
11620
11627
  },
11628
+ "UpdateOrganizationMembersPolicyRequest": {
11629
+ "document": "UpdateOrganizationMembersPolicy请求参数结构体",
11630
+ "members": [
11631
+ {
11632
+ "disabled": false,
11633
+ "document": "成员Uin列表。最多10个",
11634
+ "example": "[111111111111]",
11635
+ "member": "int64",
11636
+ "name": "MemberUins",
11637
+ "required": true,
11638
+ "type": "list"
11639
+ },
11640
+ {
11641
+ "disabled": false,
11642
+ "document": "成员访问策略Id。可通过DescribeOrganizationMemberPolicies获取",
11643
+ "example": "123",
11644
+ "member": "uint64",
11645
+ "name": "PolicyId",
11646
+ "required": true,
11647
+ "type": "int"
11648
+ },
11649
+ {
11650
+ "disabled": false,
11651
+ "document": "成员访问身份ID。可通过ListOrganizationIdentity获取",
11652
+ "example": "11",
11653
+ "member": "int64",
11654
+ "name": "IdentityId",
11655
+ "required": true,
11656
+ "type": "int"
11657
+ },
11658
+ {
11659
+ "disabled": false,
11660
+ "document": "策略描述。最大长度为128个字符",
11661
+ "example": "\"\"",
11662
+ "member": "string",
11663
+ "name": "Description",
11664
+ "required": false,
11665
+ "type": "string"
11666
+ }
11667
+ ],
11668
+ "type": "object"
11669
+ },
11670
+ "UpdateOrganizationMembersPolicyResponse": {
11671
+ "document": "UpdateOrganizationMembersPolicy返回参数结构体",
11672
+ "members": [
11673
+ {
11674
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
11675
+ "member": "string",
11676
+ "name": "RequestId",
11677
+ "type": "string"
11678
+ }
11679
+ ],
11680
+ "type": "object"
11681
+ },
11621
11682
  "UpdateOrganizationNodeRequest": {
11622
11683
  "document": "UpdateOrganizationNode请求参数结构体",
11623
11684
  "members": [
@@ -928,6 +928,14 @@
928
928
  "title": "修改绑定成员邮箱"
929
929
  }
930
930
  ],
931
+ "UpdateOrganizationMembersPolicy": [
932
+ {
933
+ "document": "",
934
+ "input": "POST / HTTP/1.1\nHost: organization.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateOrganizationMembersPolicy\n<公共请求参数>\n\n{\n \"MemberUins\": [\n 111111111111\n ],\n \"PolicyId\": 123,\n \"IdentityId\": 1,\n \"Description\": \"\"\n}",
935
+ "output": "{\n \"Response\": {\n \"RequestId\": \"a4868f21-fa38-4815-8e48-596b17c1b37\"\n }\n}",
936
+ "title": "修改组织成员访问策略"
937
+ }
938
+ ],
931
939
  "UpdateOrganizationNode": [
932
940
  {
933
941
  "document": "",
@@ -12274,8 +12274,8 @@
12274
12274
  "members": [
12275
12275
  {
12276
12276
  "disabled": false,
12277
- "document": "待变更实例 ID。",
12278
- "example": "crs-5qlrlhux",
12277
+ "document": "待变更实例 ID。请登录[Redis控制台](https://console.cloud.tencent.com/redis/instance/list)在实例列表复制实例 ID。",
12278
+ "example": "crs-5qlr****",
12279
12279
  "member": "string",
12280
12280
  "name": "InstanceId",
12281
12281
  "required": true,
@@ -12316,6 +12316,15 @@
12316
12316
  "name": "NodeSet",
12317
12317
  "required": false,
12318
12318
  "type": "list"
12319
+ },
12320
+ {
12321
+ "disabled": false,
12322
+ "document": "切换时间。 \n- 1:维护时间窗操作:在设置的维护时间窗内执行操作。请通过接口[DescribeMaintenanceWindow](https://cloud.tencent.com/document/product/239/46336)查询设置的维护时间窗时间段。缩副本、扩缩分片、扩内存均支持在维护时间窗执行操作。\n- 2:立即操作:默认切换时刻。操作将立即执行,无需等待维护时间窗。",
12323
+ "example": "2",
12324
+ "member": "uint64",
12325
+ "name": "SwitchOption",
12326
+ "required": false,
12327
+ "type": "int"
12319
12328
  }
12320
12329
  ],
12321
12330
  "type": "object"
@@ -841,7 +841,7 @@
841
841
  "UpgradeInstance": [
842
842
  {
843
843
  "document": "变更实例的内存配置",
844
- "input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpgradeInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-5qlr****\",\n \"MemSize\": \"4096\"\n}",
844
+ "input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpgradeInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-5qlr****\",\n \"MemSize\": 4096\n}",
845
845
  "output": "{\n \"Response\": {\n \"DealId\": \"6954227\",\n \"RequestId\": \"4daddc97-0005-45d8-b5b8-38514ec1e97c\"\n }\n}",
846
846
  "title": "变更规格"
847
847
  }
@@ -1105,6 +1105,15 @@
1105
1105
  "name": "WafConfig",
1106
1106
  "required": false,
1107
1107
  "type": "object"
1108
+ },
1109
+ {
1110
+ "disabled": false,
1111
+ "document": "标签",
1112
+ "example": "无",
1113
+ "member": "Tag",
1114
+ "name": "Tags",
1115
+ "required": false,
1116
+ "type": "list"
1108
1117
  }
1109
1118
  ],
1110
1119
  "type": "object"
@@ -2055,6 +2064,17 @@
2055
2064
  "required": false,
2056
2065
  "type": "object",
2057
2066
  "value_allowed_null": false
2067
+ },
2068
+ {
2069
+ "disabled": false,
2070
+ "document": "标签",
2071
+ "example": "无",
2072
+ "member": "Tag",
2073
+ "name": "Tags",
2074
+ "output_required": false,
2075
+ "required": false,
2076
+ "type": "list",
2077
+ "value_allowed_null": false
2058
2078
  }
2059
2079
  ],
2060
2080
  "usage": "both"
@@ -2839,6 +2859,16 @@
2839
2859
  "type": "object",
2840
2860
  "value_allowed_null": false
2841
2861
  },
2862
+ {
2863
+ "disabled": false,
2864
+ "document": "标签",
2865
+ "example": "无",
2866
+ "member": "Tag",
2867
+ "name": "Tags",
2868
+ "output_required": false,
2869
+ "type": "list",
2870
+ "value_allowed_null": false
2871
+ },
2842
2872
  {
2843
2873
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
2844
2874
  "member": "string",
@@ -7086,6 +7116,16 @@
7086
7116
  "output_required": true,
7087
7117
  "type": "string",
7088
7118
  "value_allowed_null": true
7119
+ },
7120
+ {
7121
+ "disabled": false,
7122
+ "document": "与此触发器关联的资源。目前仅函数URL关联的自定义域名会返回",
7123
+ "example": "[{\\\"domain\\\":\\\"test.com\\\",\\\"PathMatch\\\":\\\"/*\\\"}]",
7124
+ "member": "string",
7125
+ "name": "BoundResources",
7126
+ "output_required": false,
7127
+ "type": "string",
7128
+ "value_allowed_null": false
7089
7129
  }
7090
7130
  ],
7091
7131
  "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
  }