tccli 3.0.1158.1__py2.py3-none-any.whl → 3.0.1160.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 (59) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +11 -14
  3. tccli/services/ams/v20201229/api.json +314 -56
  4. tccli/services/ams/v20201229/examples.json +2 -2
  5. tccli/services/bi/v20220105/api.json +1 -1
  6. tccli/services/cat/v20180409/api.json +9 -0
  7. tccli/services/cdb/v20170320/api.json +33 -4
  8. tccli/services/cdn/v20180606/api.json +86 -0
  9. tccli/services/cfg/cfg_client.py +224 -12
  10. tccli/services/cfg/v20210820/api.json +897 -32
  11. tccli/services/cfg/v20210820/examples.json +32 -0
  12. tccli/services/cfw/cfw_client.py +53 -0
  13. tccli/services/cfw/v20190904/api.json +255 -2
  14. tccli/services/cfw/v20190904/examples.json +8 -0
  15. tccli/services/cls/v20201016/api.json +11 -1
  16. tccli/services/cme/v20191029/api.json +9 -9
  17. tccli/services/cme/v20191029/examples.json +1 -1
  18. tccli/services/csip/csip_client.py +53 -0
  19. tccli/services/csip/v20221121/api.json +134 -0
  20. tccli/services/csip/v20221121/examples.json +8 -0
  21. tccli/services/cwp/v20180228/api.json +66 -46
  22. tccli/services/cwp/v20180228/examples.json +1 -1
  23. tccli/services/cynosdb/v20190107/api.json +91 -0
  24. tccli/services/dnspod/v20210323/api.json +1 -1
  25. tccli/services/ecm/v20190719/api.json +23 -5
  26. tccli/services/emr/emr_client.py +53 -0
  27. tccli/services/emr/v20190103/api.json +351 -98
  28. tccli/services/emr/v20190103/examples.json +11 -3
  29. tccli/services/ess/v20201111/api.json +1 -1
  30. tccli/services/ess/v20201111/examples.json +6 -6
  31. tccli/services/essbasic/v20210526/api.json +10 -1
  32. tccli/services/essbasic/v20210526/examples.json +7 -1
  33. tccli/services/hunyuan/v20230901/api.json +114 -3
  34. tccli/services/iotexplorer/v20190423/api.json +25 -25
  35. tccli/services/iotexplorer/v20190423/examples.json +10 -4
  36. tccli/services/lcic/lcic_client.py +57 -4
  37. tccli/services/lcic/v20220817/api.json +52 -0
  38. tccli/services/lcic/v20220817/examples.json +8 -0
  39. tccli/services/live/v20180801/api.json +1 -1
  40. tccli/services/lke/v20231130/api.json +7 -7
  41. tccli/services/ocr/v20181119/api.json +10 -0
  42. tccli/services/tke/tke_client.py +53 -0
  43. tccli/services/tke/v20180525/api.json +188 -0
  44. tccli/services/tke/v20180525/examples.json +8 -0
  45. tccli/services/trtc/trtc_client.py +53 -0
  46. tccli/services/trtc/v20190722/api.json +76 -0
  47. tccli/services/trtc/v20190722/examples.json +8 -0
  48. tccli/services/vclm/v20240523/api.json +136 -0
  49. tccli/services/vclm/v20240523/examples.json +46 -0
  50. tccli/services/vclm/vclm_client.py +106 -0
  51. tccli/services/vm/v20201229/api.json +209 -45
  52. tccli/services/vm/v20201229/examples.json +1 -1
  53. tccli/services/vm/v20210922/api.json +25 -25
  54. tccli/services/vpc/v20170312/api.json +1 -1
  55. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/METADATA +2 -2
  56. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/RECORD +59 -59
  57. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/WHEEL +0 -0
  58. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/entry_points.txt +0 -0
  59. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "actions": {
3
+ "CreateTaskFromAction": [
4
+ {
5
+ "document": "",
6
+ "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateTaskFromAction\n<公共请求参数>\n\n\n\n\n{\n\t\"TaskActionId\": 127,\n\t\"TaskInstances\": [\n\t\t\"ins-87bfr32q\"\n\t]\n\n}",
7
+ "output": "{\n \"Response\": {\n \"RequestId\": \"f0aee8ac-2ed3-4a7f-a25b-f0d7d228dd30\",\n \"TaskId\": 50\n }\n}",
8
+ "title": "从动作创建演练"
9
+ }
10
+ ],
3
11
  "CreateTaskFromTemplate": [
4
12
  {
5
13
  "document": "通过预创建好的经验模板生成常规化的演练持续使用",
@@ -16,6 +24,30 @@
16
24
  "title": "删除任务"
17
25
  }
18
26
  ],
27
+ "DescribeActionFieldConfigList": [
28
+ {
29
+ "document": "",
30
+ "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeActionFieldConfigList\n<公共请求参数>\n\n{\n \"ObjectTypeId\": \"1\",\n \"ActionIds\": [\n \"1\"\n ]\n}",
31
+ "output": "{\n \"Response\": {\n \"RequestId\": \"f3433a9a-e8fd-40b9-88e7-dd8b3f1a181f\",\n \"Common\": [\n {\n \"ActionId\": 1,\n \"ActionName\": \"关机\",\n \"ConfigDetail\": [\n {\n \"Type\": \"input\",\n \"Lable\": \"动作别名\",\n \"Field\": \"AliasTitle\",\n \"DefaultValue\": \"\",\n \"Config\": \"{}\",\n \"Required\": 0,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"前置等待时间(s)\",\n \"Field\": \"PreTimeWait\",\n \"DefaultValue\": \"0\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"仅限用于自动推进模式\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"后置等待时间(s)\",\n \"Field\": \"AfterTimeWait\",\n \"DefaultValue\": \"0\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"仅限用于自动推进模式\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n },\n {\n \"Type\": \"number\",\n \"Lable\": \"动作超时时间(s)\",\n \"Field\": \"ActionTimeout\",\n \"DefaultValue\": \"1800\",\n \"Config\": \"{\\\"max\\\": 86400, \\\"min\\\": 0, \\\"tooltip\\\": \\\"动作的超时时间\\\"}\",\n \"Required\": 1,\n \"Validate\": \"{}\",\n \"Visible\": \"{}\"\n }\n ]\n }\n ],\n \"Results\": []\n }\n}",
32
+ "title": "示例"
33
+ }
34
+ ],
35
+ "DescribeActionLibraryList": [
36
+ {
37
+ "document": "动作库列表数据查询",
38
+ "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeActionLibraryList\n<公共请求参数>\n\n{\n \"Limit\": 10,\n \"Offset\": 0,\n \"Filters\": [\n {\n \"Keyword\": \"a_type\",\n \"Values\": [\n \"1\"\n ]\n }\n ],\n \"ObjectType\": 1,\n \"Attribute\": [\n 1\n ]\n}",
39
+ "output": "{\n \"Response\": {\n \"RequestId\": \"cZ6m0xYnnDreBNJm\",\n \"Results\": [\n {\n \"ActionName\": \"关机(测试)\",\n \"Desc\": \"对CVM进行关机操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-07-04 11:20:43\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-07-04 11:20:43\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 1,\n \"AttributeId\": 1,\n \"RelationActionId\": 2,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api StopInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"<p>调用云api <a href=\\\"https://cloud.tencent.com/document/product/213/15743\\\">StopInstances</a>关机</p>\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://cloud.tencent.com/document/product/1500/74357\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": [\n 614,\n 615\n ]\n },\n {\n \"ActionName\": \"开机\",\n \"Desc\": \"对CVM进行开机操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 2,\n \"AttributeId\": 2,\n \"RelationActionId\": 1,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api StartInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"<p>调用云api <a href=\\\"https://cloud.tencent.com/document/product/213/15735\\\">StartInstances</a>开机</p>\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"重启\",\n \"Desc\": \"重启\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-05-24 15:33:39\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-05-24 15:33:39\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 3,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"调用云api RebootInstances\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": \"<p>调用云api <a href=\\\"https://cloud.tencent.com/document/product/213/15742\\\">RebootInstances</a>重启</p>\",\n \"ResourceType\": \"服务器资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://tcloud4api.woa.com/document/product/1607/88863?!preview&!document=1\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"CPU利用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 4,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nelse\\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nelse\\n stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发stress-ng命令进行压测</p>\\n<p>命令内容:stress-ng -c 0 -l {{percentage}} --timeout {{timeout}}</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\\n<p><a href=\\\"https://wiki.ubuntu.com/Kernel/Reference/stress-ng\\\">stress-ng官方文档</a></p>\\n\",\n \"ResourceType\": \"CPU资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内存利用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 7,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\\nelse\\n avaliable_mem=$(awk '/^MemAvailable:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n free_mem=$(awk '/^MemFree:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n buffer=$(awk '/^Buffers:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n cache=$(awk '/^Cached:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n if [ -n \\\"$avaliable_mem\\\" ]\\n then\\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n else\\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n fi\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}\\nelse\\n avaliable_mem=$(awk '/^MemAvailable:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n free_mem=$(awk '/^MemFree:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n buffer=$(awk '/^Buffers:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n cache=$(awk '/^Cached:/{printf \\\"%d\\\\n\\\", $2;}' < /proc/meminfo)\\n if [ -n \\\"$avaliable_mem\\\" ]\\n then\\n stress-ng --vm-bytes $[$avaliable_mem*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n else\\n stress-ng --vm-bytes $[($free_mem+$buffer+$cache)*{{percentage}}/100]k --vm-keep -m 1 -t {{timeout}}\\n fi\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发stress-ng命令进行压测</p>\\n<p>命令内容:stress-ng --vm-bytes $(awk '/MemAvailable/{printf \\\"%d\\\\n\\\", $2 * 0.01*{{percentage}};}' < /proc/meminfo)k --vm-keep -m 1 -t {{timeout}}</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\\n<p><a href=\\\"https://wiki.ubuntu.com/Kernel/Reference/stress-ng\\\">stress-ng官方文档</a></p>\",\n \"ResourceType\": \"内存资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"磁盘分区使用率高\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 8,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nelse\\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n cd {{dir}} && docker run --rm alexeiled/stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nelse\\n cd {{dir}} && stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发stress-ng命令进行压测</p>\\n<p>命令内容:stress-ng --iomix 1 --iomix-bytes `df -k {{dir}} | awk 'NR==2{printf(\\\"%d\\\\n\\\", ($3+$4)*0.01*{{percentage}}-$3)}'`k -t {{timeout}}</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\\n<p><a href=\\\"https://wiki.ubuntu.com/Kernel/Reference/stress-ng\\\">stress-ng官方文档</a></p>\\n\",\n \"ResourceType\": \"磁盘资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内核故障\",\n \"Desc\": \"会触发实例重启\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 9,\n \"AttributeId\": 1,\n \"RelationActionId\": 24,\n \"ActionCommand\": \"echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo 'inject kernel error success!' && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && sleep 5 && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo c > /proc/sysrq-trigger &\",\n \"ActionContent\": \"echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo 'inject kernel error success!' && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && sleep 5 && echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\" && echo c > /proc/sysrq-trigger &\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发内核故障命令</p>\\n<p>命令内容:echo c > /proc/sysrq-trigger</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\",\n \"ResourceType\": \"CPU资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"磁盘IO负载\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 10,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nelse\\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nelse\\n stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}\\nfi\\n\\nif [[ !$? -eq 0 ]]\\nthen\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Failed\\\"\\n exit 1\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Completed\\\"\\n exit 0\\nfi\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发stress-ng命令进行压测</p>\\n<p>命令内容:stress-ng --vm-bytes {{bytes_num}}{{bytes_unit}} --hdd {{io_process_num}} --vm-keep -t {{timeout}}</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\",\n \"ResourceType\": \"IO资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"内存OOM\",\n \"Desc\": \"使用stress-ng压测工具压测,支持的linux发行版:Centos7.2及以上,CoreOS 1745.5.0及以上,Debian9.0及以上,Ubuntu 16.04.1及以上\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2023-07-04 11:20:43\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2023-07-04 11:20:43\",\n \"RiskDesc\": \"高风险\",\n \"ActionId\": 11,\n \"AttributeId\": 1,\n \"RelationActionId\": 0,\n \"ActionCommand\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nelse\\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nfi\\necho \\\"Completed\\\"\\n\\n\",\n \"ActionContent\": \"#!/bin/bash\\n\\nuser=$(whoami)\\nif [ !$user == 'root' ]\\nthen\\n sudo -i\\nfi\\n\\nfunction command_exists(){\\n if command -v $1 > /dev/null 2>&1; then\\n return 1\\n else\\n return 0\\n fi\\n}\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n\\nos_desc=$(cat /etc/*release)\\n# echo $os_desc\\n\\ndeclare -A os_dic\\nos_dic=([CentOS]=\\\"yum install stress-ng -y\\\" \\\\\\n [CoreOS]=\\\"docker pull alexeiled/stress-ng\\\" \\\\\\n [Debian]=\\\"apt-get install -y stress-ng\\\" \\\\\\n [Ubuntu]=\\\"apt-get install -y stress-ng\\\")\\n\\nos_name='N/A'\\n\\nfor key in $(echo ${!os_dic[*]})\\ndo\\n if [[ $os_desc =~ $key ]]\\n then\\n os_name=$key\\n echo $key\\n fi\\ndone\\n\\nif [ $os_name == 'N/A' ]\\nthen\\n echo \\\"Unsupported Linux distributions\\\"\\n exit 1\\nfi\\n\\n# os_name=$(cat /etc/*release | awk 'NR==1{print($1)}')\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"installing stress-ng...\\\"\\ncommand_exists stress-ng\\n\\nif [[ $? -eq 0 ]]\\nthen\\n ${os_dic[$os_name]}\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Checking the installation status...\\\"\\n command_exists stress-ng\\n if [[ $? -eq 0 && $os_name != 'CoreOS' ]]\\n then\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"Fail to install\\\"\\n exit 1\\n else\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\n fi\\nelse\\n echo -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\n echo \\\"stress-ng has already installed\\\"\\nfi\\n\\necho -e \\\"[\\\"`date +\\\"%Y-%m-%d %H:%M:%S\\\"`\\\"] \\\\c\\\"\\necho \\\"Starting to perform stress test.\\\"\\nif [ $os_name == \\\"CoreOS\\\" ]\\nthen\\n docker run --rm alexeiled/stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nelse\\n stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}\\nfi\\necho \\\"Completed\\\"\\n\\n\",\n \"ActionCommandType\": 0,\n \"ActionDetail\": \"<p>使用tat通道下发stress-ng命令进行压测</p>\\n<p>命令内容:stress-ng --bigheap 10 --bigheap-growth 4K -t {{timeout}}</p>\\n<p><a href=\\\"https://cloud.tencent.com/document/api/1340/52676\\\">tat官方文档</a></p>\",\n \"ResourceType\": \"内存资源\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"https://cloud.tencent.com/document/product/1500/81504\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n },\n {\n \"ActionName\": \"空操作\",\n \"Desc\": \"空操作,用于测试流程,不做实际注入操作\",\n \"ActionType\": \"平台\",\n \"CreateTime\": \"2022-11-29 18:08:46\",\n \"Creator\": \"系统\",\n \"UpdateTime\": \"2022-11-29 18:08:46\",\n \"RiskDesc\": \"低风险\",\n \"ActionId\": 12,\n \"AttributeId\": 1,\n \"RelationActionId\": 13,\n \"ActionCommand\": \"调用腾讯云对应产品的API接口\",\n \"ActionContent\": \"空操作\",\n \"ActionCommandType\": 1,\n \"ActionDetail\": null,\n \"ResourceType\": \"其他\",\n \"IsAllowed\": true,\n \"ActionBestCase\": \"\",\n \"ObjectType\": \"CVM\",\n \"MetricIdList\": []\n }\n ],\n \"Total\": 45\n }\n}",
40
+ "title": "动作库列表查询"
41
+ }
42
+ ],
43
+ "DescribeObjectTypeList": [
44
+ {
45
+ "document": "",
46
+ "input": "POST / HTTP/1.1\nHost: cfg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeObjectTypeList\n<公共请求参数>\n\n{}",
47
+ "output": "{\n \"Response\": {\n \"ObjectTypeList\": [\n {\n \"ObjectTypeId\": 0,\n \"ObjectTypeTitle\": \"abc\",\n \"ObjectTypeLevelOne\": \"abc\",\n \"ObjectTypeParams\": {\n \"Key\": \"abc\",\n \"Fields\": [\n {\n \"Key\": \"abc\",\n \"Header\": \"abc\",\n \"Transfer\": \"abc\",\n \"JsonParse\": \"abc\"\n }\n ]\n },\n \"ObjectTypeJsonParse\": {\n \"NameSpace\": \"abc\",\n \"WorkloadName\": \"abc\"\n }\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
48
+ "title": "请求对象类型列表"
49
+ }
50
+ ],
19
51
  "DescribeTask": [
20
52
  {
21
53
  "document": "",
@@ -1369,6 +1369,58 @@ def doDescribeBlockByIpTimesList(args, parsed_globals):
1369
1369
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
1370
 
1371
1371
 
1372
+ def doDescribeNatFwDnatRule(args, parsed_globals):
1373
+ g_param = parse_global_arg(parsed_globals)
1374
+
1375
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1376
+ cred = credential.CVMRoleCredential()
1377
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1378
+ cred = credential.STSAssumeRoleCredential(
1379
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1380
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1381
+ )
1382
+ 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):
1383
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1384
+ else:
1385
+ cred = credential.Credential(
1386
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1387
+ )
1388
+ http_profile = HttpProfile(
1389
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1390
+ reqMethod="POST",
1391
+ endpoint=g_param[OptionsDefine.Endpoint],
1392
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1393
+ )
1394
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1395
+ if g_param[OptionsDefine.Language]:
1396
+ profile.language = g_param[OptionsDefine.Language]
1397
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1398
+ client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
1399
+ client._sdkVersion += ("_CLI_" + __version__)
1400
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1401
+ model = models.DescribeNatFwDnatRuleRequest()
1402
+ model.from_json_string(json.dumps(args))
1403
+ start_time = time.time()
1404
+ while True:
1405
+ rsp = client.DescribeNatFwDnatRule(model)
1406
+ result = rsp.to_json_string()
1407
+ try:
1408
+ json_obj = json.loads(result)
1409
+ except TypeError as e:
1410
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1411
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1412
+ break
1413
+ cur_time = time.time()
1414
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1415
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1416
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1417
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1418
+ else:
1419
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1420
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1421
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1422
+
1423
+
1372
1424
  def doDescribeEnterpriseSGRuleProgress(args, parsed_globals):
1373
1425
  g_param = parse_global_arg(parsed_globals)
1374
1426
 
@@ -5930,6 +5982,7 @@ ACTION_MAP = {
5930
5982
  "ModifyBlockIgnoreRuleNew": doModifyBlockIgnoreRuleNew,
5931
5983
  "ModifyEdgeIpSwitch": doModifyEdgeIpSwitch,
5932
5984
  "DescribeBlockByIpTimesList": doDescribeBlockByIpTimesList,
5985
+ "DescribeNatFwDnatRule": doDescribeNatFwDnatRule,
5933
5986
  "DescribeEnterpriseSGRuleProgress": doDescribeEnterpriseSGRuleProgress,
5934
5987
  "DescribeNatFwInfoCount": doDescribeNatFwInfoCount,
5935
5988
  "DescribeNatFwVpcDnsLst": doDescribeNatFwVpcDnsLst,
@@ -350,6 +350,13 @@
350
350
  "output": "DescribeNatAcRuleResponse",
351
351
  "status": "online"
352
352
  },
353
+ "DescribeNatFwDnatRule": {
354
+ "document": "查询Nat防火墙Dnat规则",
355
+ "input": "DescribeNatFwDnatRuleRequest",
356
+ "name": "查询Nat防火墙Dnat规则",
357
+ "output": "DescribeNatFwDnatRuleResponse",
358
+ "status": "online"
359
+ },
353
360
  "DescribeNatFwInfoCount": {
354
361
  "document": "获取当前用户接入nat防火墙的所有子网数及natfw实例个数",
355
362
  "input": "DescribeNatFwInfoCountRequest",
@@ -4338,6 +4345,122 @@
4338
4345
  "output_required": false,
4339
4346
  "type": "string",
4340
4347
  "value_allowed_null": true
4348
+ },
4349
+ {
4350
+ "disabled": false,
4351
+ "document": "规则最近命中时间\n注意:此字段可能返回 null,表示取不到有效值。",
4352
+ "example": "无",
4353
+ "member": "string",
4354
+ "name": "LastHitTime",
4355
+ "output_required": false,
4356
+ "type": "string",
4357
+ "value_allowed_null": true
4358
+ }
4359
+ ],
4360
+ "usage": "out"
4361
+ },
4362
+ "DescNatDnatRule": {
4363
+ "document": "NAT防火墙Dnat规则列表",
4364
+ "members": [
4365
+ {
4366
+ "disabled": false,
4367
+ "document": "id\n注意:此字段可能返回 null,表示取不到有效值。",
4368
+ "example": "100",
4369
+ "member": "int64",
4370
+ "name": "Id",
4371
+ "output_required": false,
4372
+ "type": "int",
4373
+ "value_allowed_null": true
4374
+ },
4375
+ {
4376
+ "disabled": false,
4377
+ "document": "网络协议,可选值:TCP、UDP。\n注意:此字段可能返回 null,表示取不到有效值。",
4378
+ "example": "TCP",
4379
+ "member": "string",
4380
+ "name": "IpProtocol",
4381
+ "output_required": true,
4382
+ "type": "string",
4383
+ "value_allowed_null": true
4384
+ },
4385
+ {
4386
+ "disabled": false,
4387
+ "document": "弹性IP。\n注意:此字段可能返回 null,表示取不到有效值。",
4388
+ "example": "175.27.187.125",
4389
+ "member": "string",
4390
+ "name": "PublicIpAddress",
4391
+ "output_required": true,
4392
+ "type": "string",
4393
+ "value_allowed_null": true
4394
+ },
4395
+ {
4396
+ "disabled": false,
4397
+ "document": "公网端口。\n注意:此字段可能返回 null,表示取不到有效值。",
4398
+ "example": "80",
4399
+ "member": "int64",
4400
+ "name": "PublicPort",
4401
+ "output_required": true,
4402
+ "type": "int",
4403
+ "value_allowed_null": true
4404
+ },
4405
+ {
4406
+ "disabled": false,
4407
+ "document": "内网地址。\n注意:此字段可能返回 null,表示取不到有效值。",
4408
+ "example": "10.10.1.1",
4409
+ "member": "string",
4410
+ "name": "PrivateIpAddress",
4411
+ "output_required": true,
4412
+ "type": "string",
4413
+ "value_allowed_null": true
4414
+ },
4415
+ {
4416
+ "disabled": false,
4417
+ "document": "内网端口。\n注意:此字段可能返回 null,表示取不到有效值。",
4418
+ "example": "80",
4419
+ "member": "int64",
4420
+ "name": "PrivatePort",
4421
+ "output_required": true,
4422
+ "type": "int",
4423
+ "value_allowed_null": true
4424
+ },
4425
+ {
4426
+ "disabled": false,
4427
+ "document": "NAT防火墙转发规则描述。\n注意:此字段可能返回 null,表示取不到有效值。",
4428
+ "example": "test",
4429
+ "member": "string",
4430
+ "name": "Description",
4431
+ "output_required": false,
4432
+ "type": "string",
4433
+ "value_allowed_null": true
4434
+ },
4435
+ {
4436
+ "disabled": false,
4437
+ "document": "是否被关联引用,如被远程运维使用\n注意:此字段可能返回 null,表示取不到有效值。",
4438
+ "example": "0",
4439
+ "member": "int64",
4440
+ "name": "IsReferenced",
4441
+ "output_required": false,
4442
+ "type": "int",
4443
+ "value_allowed_null": true
4444
+ },
4445
+ {
4446
+ "disabled": false,
4447
+ "document": "所属防火墙实例id\n注意:此字段可能返回 null,表示取不到有效值。",
4448
+ "example": "cfwnat-xxx",
4449
+ "member": "string",
4450
+ "name": "FwInsId",
4451
+ "output_required": false,
4452
+ "type": "string",
4453
+ "value_allowed_null": true
4454
+ },
4455
+ {
4456
+ "disabled": false,
4457
+ "document": "关联的nat网关Id\n注意:此字段可能返回 null,表示取不到有效值。",
4458
+ "example": "nat-xxx",
4459
+ "member": "string",
4460
+ "name": "NatGwId",
4461
+ "output_required": false,
4462
+ "type": "string",
4463
+ "value_allowed_null": true
4341
4464
  }
4342
4465
  ],
4343
4466
  "usage": "out"
@@ -4753,7 +4876,7 @@
4753
4876
  },
4754
4877
  {
4755
4878
  "disabled": false,
4756
- "document": "已使用的地址模版数",
4879
+ "document": "已使用的地址模板数",
4757
4880
  "example": "0",
4758
4881
  "member": "int64",
4759
4882
  "name": "UsedTemplateCount",
@@ -4763,7 +4886,7 @@
4763
4886
  },
4764
4887
  {
4765
4888
  "disabled": false,
4766
- "document": "地址模版配额数量",
4889
+ "document": "地址模板配额数量",
4767
4890
  "example": "10",
4768
4891
  "member": "int64",
4769
4892
  "name": "TemplateQuotaCount",
@@ -6270,6 +6393,116 @@
6270
6393
  ],
6271
6394
  "type": "object"
6272
6395
  },
6396
+ "DescribeNatFwDnatRuleRequest": {
6397
+ "document": "DescribeNatFwDnatRule请求参数结构体",
6398
+ "members": [
6399
+ {
6400
+ "disabled": false,
6401
+ "document": "需要查询的索引,特定场景使用,可不填",
6402
+ "example": "无",
6403
+ "member": "string",
6404
+ "name": "Index",
6405
+ "required": false,
6406
+ "type": "string"
6407
+ },
6408
+ {
6409
+ "disabled": false,
6410
+ "document": "过滤条件组合",
6411
+ "example": "无",
6412
+ "member": "CommonFilter",
6413
+ "name": "Filters",
6414
+ "required": false,
6415
+ "type": "list"
6416
+ },
6417
+ {
6418
+ "disabled": false,
6419
+ "document": "每页条数",
6420
+ "example": "20",
6421
+ "member": "uint64",
6422
+ "name": "Limit",
6423
+ "required": false,
6424
+ "type": "int"
6425
+ },
6426
+ {
6427
+ "disabled": false,
6428
+ "document": "偏移值",
6429
+ "example": "0",
6430
+ "member": "uint64",
6431
+ "name": "Offset",
6432
+ "required": false,
6433
+ "type": "int"
6434
+ },
6435
+ {
6436
+ "disabled": false,
6437
+ "document": "检索的起始时间,可不传",
6438
+ "example": "无",
6439
+ "member": "string",
6440
+ "name": "StartTime",
6441
+ "required": false,
6442
+ "type": "string"
6443
+ },
6444
+ {
6445
+ "disabled": false,
6446
+ "document": "检索的截止时间,可不传",
6447
+ "example": "无",
6448
+ "member": "string",
6449
+ "name": "EndTime",
6450
+ "required": false,
6451
+ "type": "string"
6452
+ },
6453
+ {
6454
+ "disabled": false,
6455
+ "document": "desc:降序;asc:升序。根据By字段的值进行排序,这里传参的话则By也必须有值",
6456
+ "example": "desc",
6457
+ "member": "string",
6458
+ "name": "Order",
6459
+ "required": false,
6460
+ "type": "string"
6461
+ },
6462
+ {
6463
+ "disabled": false,
6464
+ "document": "排序所用到的字段",
6465
+ "example": "id",
6466
+ "member": "string",
6467
+ "name": "By",
6468
+ "required": false,
6469
+ "type": "string"
6470
+ }
6471
+ ],
6472
+ "type": "object"
6473
+ },
6474
+ "DescribeNatFwDnatRuleResponse": {
6475
+ "document": "DescribeNatFwDnatRule返回参数结构体",
6476
+ "members": [
6477
+ {
6478
+ "disabled": false,
6479
+ "document": "Dnat规则列表\n注意:此字段可能返回 null,表示取不到有效值。",
6480
+ "example": "无",
6481
+ "member": "DescNatDnatRule",
6482
+ "name": "Data",
6483
+ "output_required": false,
6484
+ "type": "list",
6485
+ "value_allowed_null": true
6486
+ },
6487
+ {
6488
+ "disabled": false,
6489
+ "document": "列表总数",
6490
+ "example": "1",
6491
+ "member": "uint64",
6492
+ "name": "Total",
6493
+ "output_required": true,
6494
+ "type": "int",
6495
+ "value_allowed_null": false
6496
+ },
6497
+ {
6498
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6499
+ "member": "string",
6500
+ "name": "RequestId",
6501
+ "type": "string"
6502
+ }
6503
+ ],
6504
+ "type": "object"
6505
+ },
6273
6506
  "DescribeNatFwInfoCountRequest": {
6274
6507
  "document": "DescribeNatFwInfoCount请求参数结构体",
6275
6508
  "members": [],
@@ -13754,6 +13987,26 @@
13754
13987
  "output_required": true,
13755
13988
  "type": "string",
13756
13989
  "value_allowed_null": true
13990
+ },
13991
+ {
13992
+ "disabled": false,
13993
+ "document": "云联网模式下,当前实例是否需要开启重叠路由开关,1:需要开启,0:不需要开启\n注意:此字段可能返回 null,表示取不到有效值。",
13994
+ "example": "0",
13995
+ "member": "int64",
13996
+ "name": "NeedSwitchCcnOverlap",
13997
+ "output_required": false,
13998
+ "type": "int",
13999
+ "value_allowed_null": true
14000
+ },
14001
+ {
14002
+ "disabled": false,
14003
+ "document": "云联网模式下,实例关联的云联网id\n注意:此字段可能返回 null,表示取不到有效值。",
14004
+ "example": "ccn-xxx",
14005
+ "member": "string",
14006
+ "name": "CcnId",
14007
+ "output_required": false,
14008
+ "type": "string",
14009
+ "value_allowed_null": true
13757
14010
  }
13758
14011
  ],
13759
14012
  "usage": "out"
@@ -418,6 +418,14 @@
418
418
  "title": "查询NAT访问控制列表"
419
419
  }
420
420
  ],
421
+ "DescribeNatFwDnatRule": [
422
+ {
423
+ "document": "查询Nat防火墙Dnat规则",
424
+ "input": "POST / HTTP/1.1\nHost: cfw.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNatFwDnatRule\n<公共请求参数>\n\n{\n \"Index\": \"abc\",\n \"Filters\": [\n {\n \"Name\": \"abc\",\n \"Values\": [\n \"abc\"\n ],\n \"OperatorType\": 0\n }\n ],\n \"Limit\": 1,\n \"Offset\": 1,\n \"StartTime\": \"abc\",\n \"EndTime\": \"abc\",\n \"Order\": \"abc\",\n \"By\": \"abc\"\n}",
425
+ "output": "{\n \"Response\": {\n \"Data\": [\n {\n \"Id\": 0,\n \"IpProtocol\": \"abc\",\n \"PublicIpAddress\": \"abc\",\n \"PublicPort\": 0,\n \"PrivateIpAddress\": \"abc\",\n \"PrivatePort\": 0,\n \"Description\": \"abc\",\n \"IsReferenced\": 0,\n \"FwInsId\": \"abc\",\n \"NatGwId\": \"abc\"\n }\n ],\n \"Total\": 1,\n \"RequestId\": \"abc\"\n }\n}",
426
+ "title": "查询Nat防火墙Dnat规则"
427
+ }
428
+ ],
421
429
  "DescribeNatFwInfoCount": [
422
430
  {
423
431
  "document": "",
@@ -5398,6 +5398,16 @@
5398
5398
  "output_required": true,
5399
5399
  "type": "string",
5400
5400
  "value_allowed_null": false
5401
+ },
5402
+ {
5403
+ "disabled": false,
5404
+ "document": "数据加工类型。0:标准加工任务;1:前置加工任务。\n注意:此字段可能返回 null,表示取不到有效值。",
5405
+ "example": "0",
5406
+ "member": "uint64",
5407
+ "name": "DataTransformType",
5408
+ "output_required": false,
5409
+ "type": "int",
5410
+ "value_allowed_null": true
5401
5411
  }
5402
5412
  ],
5403
5413
  "usage": "out"
@@ -6600,7 +6610,7 @@
6600
6610
  "members": [
6601
6611
  {
6602
6612
  "disabled": false,
6603
- "document": "<br><li> taskName\n\n按照【加工任务名称】进行过滤。\n类型:String\n\n必选:否\n\n<br><li> taskId\n\n按照【加工任务id】进行过滤。\n类型:String\n\n必选:否\n\n<br><li> topicId\n\n按照【源topicId】进行过滤。\n类型:String\n\n必选:否\n\n每次请求的Filters的上限为10,Filter.Values的上限为100。",
6613
+ "document": "- taskName\n按照【加工任务名称】进行过滤。\n类型:String\n必选:否\n\n- taskId\n按照【加工任务id】进行过滤。\n类型:String\n必选:否\n\n- topicId\n按照【源topicId】进行过滤。\n类型:String\n必选:否\n- status\n按照【 任务运行状态】进行过滤。 1:准备中,2:运行中,3:停止中,4:已停止\n类型:String\n必选:否\n- hasServiceLog\n按照【是否开启服务日志】进行过滤。 1:未开启,2:已开启\n类型:String\n必选:否\n- dstTopicType\n按照【目标topic类型】进行过滤。 1:固定,2:动态\n类型:String\n必选:否\n\n每次请求的Filters的上限为10,Filter.Values的上限为100。",
6604
6614
  "example": "无",
6605
6615
  "member": "Filter",
6606
6616
  "name": "Filters",
@@ -8202,30 +8202,30 @@
8202
8202
  {
8203
8203
  "disabled": false,
8204
8204
  "document": "导出的多媒体创作引擎媒体 Id,仅当导出目标为多媒体创作引擎媒体时有效。",
8205
- "example": "",
8205
+ "example": "5f73f8ad54953bce323f",
8206
8206
  "member": "string",
8207
8207
  "name": "MaterialId",
8208
- "required": true,
8208
+ "output_required": true,
8209
8209
  "type": "string",
8210
8210
  "value_allowed_null": false
8211
8211
  },
8212
8212
  {
8213
8213
  "disabled": false,
8214
8214
  "document": "云点播媒资 FileId。",
8215
- "example": "",
8215
+ "example": "2c65f425b86ad532",
8216
8216
  "member": "string",
8217
8217
  "name": "VodFileId",
8218
- "required": true,
8218
+ "output_required": true,
8219
8219
  "type": "string",
8220
8220
  "value_allowed_null": false
8221
8221
  },
8222
8222
  {
8223
8223
  "disabled": false,
8224
8224
  "document": "导出的媒资 URL。",
8225
- "example": "",
8225
+ "example": "http://cme.vod2.myqcloud.com/123/f0.mp4",
8226
8226
  "member": "string",
8227
8227
  "name": "URL",
8228
- "required": true,
8228
+ "output_required": true,
8229
8229
  "type": "string",
8230
8230
  "value_allowed_null": false
8231
8231
  },
@@ -8235,17 +8235,17 @@
8235
8235
  "example": "无",
8236
8236
  "member": "MediaMetaData",
8237
8237
  "name": "MetaData",
8238
- "required": true,
8238
+ "output_required": true,
8239
8239
  "type": "object",
8240
8240
  "value_allowed_null": true
8241
8241
  },
8242
8242
  {
8243
8243
  "disabled": false,
8244
8244
  "document": "导出视频的封面图片 URL。",
8245
- "example": "",
8245
+ "example": "http://cme.vod2.myqcloud.com/123/f0.jpg",
8246
8246
  "member": "string",
8247
8247
  "name": "CoverURL",
8248
- "required": false,
8248
+ "output_required": true,
8249
8249
  "type": "string",
8250
8250
  "value_allowed_null": false
8251
8251
  }
@@ -284,7 +284,7 @@
284
284
  {
285
285
  "document": " 获取任务详情。",
286
286
  "input": "POST / HTTP/1.1\nHost: cme.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskDetail\n<公共请求参数>\n\n{\n \"Platform\": \"test\",\n \"TaskId\": \"181xxxxxxxx9-procedurev2-b718fcee09a72470bf665cf55351d810t0\"\n}",
287
- "output": "{\n \"Response\": {\n \"CreateTime\": \"2020-04-28T18:16:58Z\",\n \"ErrCode\": 0,\n \"ErrMsg\": \"Success.\",\n \"Progress\": 100,\n \"RequestId\": \"85b8cdac-8e18-430a-aeae-08076ac26a11\",\n \"Status\": \"SUCCESS\",\n \"TaskType\": \"VIDEO_EDIT_PROJECT_EXPORT\",\n \"VideoEditProjectOutput\": {\n \"MaterialId\": \"6866c9a7-a2ca-4d\",\n \"MetaData\": {\n \"AudioStreamInfoSet\": [\n {\n \"Bitrate\": 46552,\n \"Codec\": \"aac\",\n \"SamplingRate\": 16000\n }\n ],\n \"Bitrate\": 6917072,\n \"Container\": \"mov,mp4,m4a,3gp,3g2,mj2\",\n \"Duration\": 346.55999755859375,\n \"Height\": 1080,\n \"Rotate\": 0,\n \"Size\": 299688882,\n \"VideoStreamInfoSet\": [\n {\n \"Bitrate\": 6870520,\n \"Codec\": \"h264\",\n \"Fps\": 25,\n \"Height\": 1080,\n \"Width\": 1920\n }\n ],\n \"Width\": 1920\n },\n \"URL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.mp4\",\n \"VodFileId\": \"5285890802029089\"\n }\n }\n}",
287
+ "output": "{\n \"Response\": {\n \"CreateTime\": \"2020-04-28T18:16:58Z\",\n \"ErrCode\": 0,\n \"ErrMsg\": \"Success.\",\n \"Progress\": 100,\n \"RequestId\": \"85b8cdac-8e18-430a-aeae-08076ac26a11\",\n \"Status\": \"SUCCESS\",\n \"TaskType\": \"VIDEO_EDIT_PROJECT_EXPORT\",\n \"VideoEditProjectOutput\": {\n \"MaterialId\": \"6866c9a7-a2ca-4d\",\n \"MetaData\": {\n \"AudioStreamInfoSet\": [\n {\n \"Bitrate\": 46552,\n \"Codec\": \"aac\",\n \"SamplingRate\": 16000\n }\n ],\n \"Bitrate\": 6917072,\n \"Container\": \"mov,mp4,m4a,3gp,3g2,mj2\",\n \"Duration\": 346.55999755859375,\n \"Height\": 1080,\n \"Rotate\": 0,\n \"Size\": 299688882,\n \"VideoStreamInfoSet\": [\n {\n \"Bitrate\": 6870520,\n \"Codec\": \"h264\",\n \"Fps\": 25,\n \"Height\": 1080,\n \"Width\": 1920\n }\n ],\n \"Width\": 1920\n },\n \"URL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.mp4\",\n \"CoverURL\": \"http://cmedemo.vod2.myqcloud.com/xxxxx/cemdemo.jpg\",\n \"VodFileId\": \"5285890802029089\"\n }\n }\n}",
288
288
  "title": "获取任务详情"
289
289
  }
290
290
  ],