tccli 3.0.1348.1__py2.py3-none-any.whl → 3.0.1349.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 (172) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +0 -76
  3. tccli/services/ai3d/v20250513/api.json +1 -1
  4. tccli/services/aiart/v20221229/api.json +3 -3
  5. tccli/services/autoscaling/v20180419/api.json +11 -0
  6. tccli/services/batch/v20170312/api.json +44 -0
  7. tccli/services/cdb/v20170320/api.json +8 -8
  8. tccli/services/cdb/v20170320/examples.json +1 -1
  9. tccli/services/cdn/v20180606/api.json +5 -5
  10. tccli/services/cdwdoris/v20211228/api.json +145 -7
  11. tccli/services/cfg/v20210820/api.json +20 -0
  12. tccli/services/cfs/v20190719/api.json +10 -10
  13. tccli/services/cfw/cfw_client.py +53 -0
  14. tccli/services/cfw/v20190904/api.json +272 -0
  15. tccli/services/cfw/v20190904/examples.json +8 -0
  16. tccli/services/csip/csip_client.py +833 -144
  17. tccli/services/csip/v20221121/api.json +3304 -1436
  18. tccli/services/csip/v20221121/examples.json +104 -0
  19. tccli/services/cvm/v20170312/api.json +1 -1
  20. tccli/services/cwp/v20180228/api.json +9 -0
  21. tccli/services/cwp/v20180228/examples.json +6 -0
  22. tccli/services/emr/v20190103/api.json +217 -2
  23. tccli/services/es/v20250101/api.json +22 -0
  24. tccli/services/ess/v20201111/api.json +10 -1
  25. tccli/services/essbasic/v20210526/api.json +3 -3
  26. tccli/services/gs/v20191118/api.json +38 -0
  27. tccli/services/igtm/igtm_client.py +159 -0
  28. tccli/services/igtm/v20231024/api.json +577 -0
  29. tccli/services/igtm/v20231024/examples.json +24 -0
  30. tccli/services/iotexplorer/v20190423/api.json +3 -3
  31. tccli/services/lcic/lcic_client.py +53 -0
  32. tccli/services/lcic/v20220817/api.json +53 -0
  33. tccli/services/lcic/v20220817/examples.json +8 -0
  34. tccli/services/live/v20180801/api.json +203 -1
  35. tccli/services/live/v20180801/examples.json +1 -1
  36. tccli/services/lke/v20231130/api.json +248 -2
  37. tccli/services/lke/v20231130/examples.json +1 -1
  38. tccli/services/lkeap/v20240522/api.json +1 -1
  39. tccli/services/mrs/v20200910/api.json +10 -0
  40. tccli/services/nlp/nlp_client.py +4 -322
  41. tccli/services/nlp/v20190408/api.json +0 -459
  42. tccli/services/nlp/v20190408/examples.json +0 -48
  43. tccli/services/ocr/v20181119/api.json +60 -5
  44. tccli/services/omics/v20221128/api.json +38 -0
  45. tccli/services/redis/v20180412/api.json +6 -6
  46. tccli/services/redis/v20180412/examples.json +1 -1
  47. tccli/services/ses/v20201002/api.json +100 -5
  48. tccli/services/tcb/v20180608/api.json +1 -1
  49. tccli/services/tcb/v20180608/examples.json +1 -1
  50. tccli/services/tdmq/v20200217/api.json +19 -0
  51. tccli/services/teo/teo_client.py +281 -16
  52. tccli/services/teo/v20220901/api.json +611 -6
  53. tccli/services/teo/v20220901/examples.json +48 -2
  54. tccli/services/tione/v20211111/api.json +16 -0
  55. tccli/services/tke/tke_client.py +57 -4
  56. tccli/services/tke/v20180525/api.json +24 -24
  57. tccli/services/tke/v20220501/api.json +52 -0
  58. tccli/services/tke/v20220501/examples.json +8 -0
  59. tccli/services/tmt/v20180321/api.json +4 -4
  60. tccli/services/tsf/v20180326/api.json +4 -4
  61. tccli/services/vclm/v20240523/api.json +3 -3
  62. tccli/services/vod/v20180717/api.json +5 -5
  63. tccli/services/vod/v20180717/examples.json +9 -9
  64. tccli/services/vpc/v20170312/api.json +1 -1
  65. tccli/services/vrs/v20200824/api.json +1 -1
  66. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/METADATA +2 -2
  67. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/RECORD +70 -172
  68. tccli/services/cis/__init__.py +0 -4
  69. tccli/services/cis/cis_client.py +0 -525
  70. tccli/services/cis/v20180408/api.json +0 -737
  71. tccli/services/cis/v20180408/examples.json +0 -93
  72. tccli/services/dataintegration/__init__.py +0 -4
  73. tccli/services/dataintegration/dataintegration_client.py +0 -207
  74. tccli/services/dataintegration/v20220613/api.json +0 -87
  75. tccli/services/dataintegration/v20220613/examples.json +0 -13
  76. tccli/services/dtf/__init__.py +0 -4
  77. tccli/services/dtf/dtf_client.py +0 -207
  78. tccli/services/dtf/v20200506/api.json +0 -274
  79. tccli/services/dtf/v20200506/examples.json +0 -13
  80. tccli/services/gpm/__init__.py +0 -4
  81. tccli/services/gpm/gpm_client.py +0 -1108
  82. tccli/services/gpm/v20200820/api.json +0 -1959
  83. tccli/services/gpm/v20200820/examples.json +0 -149
  84. tccli/services/gse/__init__.py +0 -4
  85. tccli/services/gse/gse_client.py +0 -4076
  86. tccli/services/gse/v20191112/api.json +0 -7095
  87. tccli/services/gse/v20191112/examples.json +0 -615
  88. tccli/services/iecp/__init__.py +0 -4
  89. tccli/services/iecp/iecp_client.py +0 -4500
  90. tccli/services/iecp/v20210914/api.json +0 -9770
  91. tccli/services/iecp/v20210914/examples.json +0 -691
  92. tccli/services/iir/__init__.py +0 -4
  93. tccli/services/iir/iir_client.py +0 -207
  94. tccli/services/iir/v20200417/api.json +0 -204
  95. tccli/services/iir/v20200417/examples.json +0 -13
  96. tccli/services/iottid/__init__.py +0 -4
  97. tccli/services/iottid/iottid_client.py +0 -631
  98. tccli/services/iottid/v20190411/api.json +0 -553
  99. tccli/services/iottid/v20190411/examples.json +0 -95
  100. tccli/services/mgobe/__init__.py +0 -4
  101. tccli/services/mgobe/mgobe_client.py +0 -530
  102. tccli/services/mgobe/v20190929/api.json +0 -52
  103. tccli/services/mgobe/v20190929/examples.json +0 -13
  104. tccli/services/mgobe/v20201014/api.json +0 -671
  105. tccli/services/mgobe/v20201014/examples.json +0 -61
  106. tccli/services/mvj/__init__.py +0 -4
  107. tccli/services/mvj/mvj_client.py +0 -207
  108. tccli/services/mvj/v20190926/api.json +0 -123
  109. tccli/services/mvj/v20190926/examples.json +0 -19
  110. tccli/services/pds/__init__.py +0 -4
  111. tccli/services/pds/pds_client.py +0 -260
  112. tccli/services/pds/v20210701/api.json +0 -193
  113. tccli/services/pds/v20210701/examples.json +0 -21
  114. tccli/services/smpn/__init__.py +0 -4
  115. tccli/services/smpn/smpn_client.py +0 -260
  116. tccli/services/smpn/v20190822/api.json +0 -191
  117. tccli/services/smpn/v20190822/examples.json +0 -21
  118. tccli/services/solar/__init__.py +0 -4
  119. tccli/services/solar/solar_client.py +0 -1055
  120. tccli/services/solar/v20181011/api.json +0 -1760
  121. tccli/services/solar/v20181011/examples.json +0 -125
  122. tccli/services/tan/__init__.py +0 -4
  123. tccli/services/tan/tan_client.py +0 -207
  124. tccli/services/tan/v20220420/api.json +0 -65
  125. tccli/services/tan/v20220420/examples.json +0 -19
  126. tccli/services/tav/__init__.py +0 -4
  127. tccli/services/tav/tav_client.py +0 -366
  128. tccli/services/tav/v20190118/api.json +0 -262
  129. tccli/services/tav/v20190118/examples.json +0 -37
  130. tccli/services/tbm/__init__.py +0 -4
  131. tccli/services/tbm/tbm_client.py +0 -631
  132. tccli/services/tbm/v20180129/api.json +0 -1037
  133. tccli/services/tbm/v20180129/examples.json +0 -77
  134. tccli/services/tcex/__init__.py +0 -4
  135. tccli/services/tcex/tcex_client.py +0 -260
  136. tccli/services/tcex/v20200727/api.json +0 -158
  137. tccli/services/tcex/v20200727/examples.json +0 -21
  138. tccli/services/tci/__init__.py +0 -4
  139. tccli/services/tci/tci_client.py +0 -2327
  140. tccli/services/tci/v20190318/api.json +0 -4958
  141. tccli/services/tci/v20190318/examples.json +0 -333
  142. tccli/services/tic/__init__.py +0 -4
  143. tccli/services/tic/tic_client.py +0 -843
  144. tccli/services/tic/v20201117/api.json +0 -1067
  145. tccli/services/tic/v20201117/examples.json +0 -121
  146. tccli/services/ticm/__init__.py +0 -4
  147. tccli/services/ticm/ticm_client.py +0 -313
  148. tccli/services/ticm/v20181127/api.json +0 -1391
  149. tccli/services/ticm/v20181127/examples.json +0 -53
  150. tccli/services/tics/__init__.py +0 -4
  151. tccli/services/tics/tics_client.py +0 -366
  152. tccli/services/tics/v20181115/api.json +0 -694
  153. tccli/services/tics/v20181115/examples.json +0 -37
  154. tccli/services/tiems/__init__.py +0 -4
  155. tccli/services/tiems/tiems_client.py +0 -1479
  156. tccli/services/tiems/v20190416/api.json +0 -3144
  157. tccli/services/tiems/v20190416/examples.json +0 -217
  158. tccli/services/trdp/__init__.py +0 -4
  159. tccli/services/trdp/trdp_client.py +0 -207
  160. tccli/services/trdp/v20220726/api.json +0 -843
  161. tccli/services/trdp/v20220726/examples.json +0 -13
  162. tccli/services/ump/__init__.py +0 -4
  163. tccli/services/ump/ump_client.py +0 -1055
  164. tccli/services/ump/v20200918/api.json +0 -2168
  165. tccli/services/ump/v20200918/examples.json +0 -141
  166. tccli/services/youmall/__init__.py +0 -4
  167. tccli/services/youmall/v20180228/api.json +0 -3572
  168. tccli/services/youmall/v20180228/examples.json +0 -313
  169. tccli/services/youmall/youmall_client.py +0 -1797
  170. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/WHEEL +0 -0
  171. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/entry_points.txt +0 -0
  172. {tccli-3.0.1348.1.dist-info → tccli-3.0.1349.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,217 +0,0 @@
1
- {
2
- "actions": {
3
- "CreateJob": [
4
- {
5
- "document": "",
6
- "input": "https://tiems.tencentcloudapi.com/?Action=CreateJob\r\n&Name=test\r\n&Description=job\r\n&WorkerCount=1\r\n&ConfigId=asjcqn7wtdgrd7gt\r\n&ResourceGroupId=ap-beijing\r\n&Cpu=100\r\n&Memory=100\r\n&PredictInput.InputDataFormat=json\r\n&PredictInput.OutputDataFormat=json\r\n&PredictInput.InputPath=cos://data-test-1255502019.cos.ap-guangzhou.myqcloud.com/test/pmminput\r\n&PredictInput.OutputPath=cos://data-test-1255502019.cos.ap-guangzhou.myqcloud.com/test/\r\n&PredictInput.BatchSize=32\r\n&<公共请求参数>",
7
- "output": "{\n \"Response\": {\n \"RequestId\": \"0448ae0a-d593-4a48-a025-bede58e1f841\",\n \"Job\": {\n \"Id\": \"aktwbxqmfkr8g44v\",\n \"Cluster\": \"ap-beijing\",\n \"Region\": \"ap-beijing\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"Description\": \"job\",\n \"ConfigId\": \"asjcqn7wtdgrd7gt\",\n \"PredictInput\": {\n \"InputDataFormat\": \"json\",\n \"OutputDataFormat\": \"json\",\n \"InputPath\": \"cos://data-test-1255502019.cos.ap-guangzhou.myqcloud.com/test/pmminput\",\n \"OutputPath\": \"cos://data-test-1255502019.cos.ap-guangzhou.myqcloud.com/test/\",\n \"BatchSize\": 32,\n \"SignatureName\": \"\"\n },\n \"Status\": {\n \"DesiredWorkers\": 0,\n \"CurrentWorkers\": 0,\n \"Replicas\": [],\n \"Status\": \"Waiting\",\n \"Message\": \"\"\n },\n \"CreateTime\": \"2019-11-07T15:41:35+08:00\",\n \"StartTime\": \"\",\n \"EndTime\": \"\",\n \"CancelTime\": \"\",\n \"ResourceGroupId\": \"ap-beijing\",\n \"ResourceGroupName\": \"公共资源组\",\n \"Cpu\": 100,\n \"Memory\": 100,\n \"Gpu\": 0,\n \"GpuMemory\": 0,\n \"GpuType\": \"\",\n \"ConfigName\": \"test1\",\n \"ConfigVersion\": \"1.0\"\n }\n }\n}",
8
- "title": "创建任务"
9
- }
10
- ],
11
- "CreateRsgAsGroup": [
12
- {
13
- "document": "",
14
- "input": "https://tiems.tencentcloudapi.com/?Action=CreateRsgAsGroup\r\n&Cluster=ap-beijing\r\n&RsgId=rsg-xxxxxxxx\r\n&Name=asg-xxxxxxxx\r\n&MaxSize=5\r\n&MinSize=0\r\n&InstanceType=sv_tiems_instance_8c32g1t4\r\n&<公共请求参数>",
15
- "output": "{\n \"Response\": {\n \"RequestId\": \"3d96e8c0-97a9-43a2-8268-99ff505fbd84\",\n \"RsgAsGroup\": {\n \"Id\": \"asg-xxxxxxxx\",\n \"Region\": \"ap-beijing\",\n \"Zone\": \"ap-beijing-5\",\n \"Cluster\": \"ap-beijing\",\n \"RsgId\": \"rsg-xxxxxxxx\",\n \"Name\": \"xxxx\",\n \"MaxSize\": 5,\n \"MinSize\": 0,\n \"CreateTime\": \"2019-12-24T17:39:40+08:00\",\n \"UpdateTime\": \"2019-12-24T17:39:40+08:00\",\n \"Status\": \"Enabled\",\n \"InstanceType\": \"sv_tiems_instance_8c32g1t4\",\n \"InstanceCount\": 0\n }\n }\n}",
16
- "title": "创建资源组的伸缩组"
17
- }
18
- ],
19
- "CreateRuntime": [
20
- {
21
- "document": "",
22
- "input": "https://tiems.tencentcloudapi.com/?Action=CreateRuntime\r\n&Name=test\r\n&Framework=test\r\n&Image=ccr.ccs.tencentyun.com/testrepo/testimage:v1\r\n&Description=test\r\n&HealthCheckOn=false\r\n&<公共请求参数>",
23
- "output": "{\n \"Response\": {\n \"RequestId\": \"e8717195-6b62-4fcc-99fe-e29d2aecb21e\",\n \"Runtime\": {\n \"Name\": \"test\",\n \"Framework\": \"test\",\n \"Description\": \"字符串\",\n \"Public\": false,\n \"HealthCheckOn\": false,\n \"Image\": \"ccr.ccs.tencentyun.com/testrepo/testimage:v1\",\n \"CreateTime\": \"2019-11-07T14:47:49+08:00\"\n }\n }\n}",
24
- "title": "创建自定义运行环境"
25
- }
26
- ],
27
- "CreateService": [
28
- {
29
- "document": "",
30
- "input": "https://tiems.tencentcloudapi.com/?Action=CreateService\r\n&ServiceConfigId=asjcqn7wtdgrd7gt\r\n&Name=test\r\n&ScaleMode=MANUAL\r\n&ResourceGroupId=ap-beijing\r\n&Cpu=100\r\n&Memory=100\r\n&Description=test\r\n&Scaler.StartReplicas=1\r\n&<公共请求参数>",
31
- "output": "{\n \"Response\": {\n \"RequestId\": \"48d37fb1-15fa-4320-9c59-d673c653e0d4\",\n \"Service\": {\n \"Id\": \"ank95gbm4dwfhmds\",\n \"Cluster\": \"ap-beijing\",\n \"Region\": \"ap-beijing\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"ModelUri\": \"cos://ti-ems-12502019.cos.ap-beijing.myqcloud.com/models/pmml/\",\n \"Cpu\": 100,\n \"Memory\": 100,\n \"Gpu\": 0,\n \"GpuMemory\": 0,\n \"CreateTime\": \"2019-11-07T15:14:19+08:00\",\n \"UpdateTime\": \"2019-11-07T15:14:19+08:00\",\n \"ScaleMode\": \"MANUAL\",\n \"Scaler\": {\n \"MaxReplicas\": 1,\n \"MinReplicas\": 1,\n \"StartReplicas\": 1,\n \"HpaMetrics\": []\n },\n \"Status\": {\n \"DesiredReplicas\": 0,\n \"CurrentReplicas\": 1,\n \"Replicas\": [],\n \"Status\": \"Waiting\",\n \"Message\": \"\",\n \"Conditions\": []\n },\n \"AccessToken\": \"\",\n \"ConfigName\": \"test1\",\n \"ConfigVersion\": \"1.0\",\n \"ServeSeconds\": 1,\n \"ConfigId\": \"asjcqn7wtdgrd7gt\",\n \"ResourceGroupId\": \"ap-beijing\",\n \"ResourceGroupName\": \"公共资源组\",\n \"Exposes\": [],\n \"Description\": \"test\",\n \"GpuType\": \"\"\n }\n }\n}",
32
- "title": "创建服务"
33
- }
34
- ],
35
- "CreateServiceConfig": [
36
- {
37
- "document": "",
38
- "input": "https://tiems.tencentcloudapi.com/?Action=CreateServiceConfig\r\n&Name=test\r\n&Runtime=pmml\r\n&ModelUri=cos://ti-example-125550209.cos.ap-beijing.myqcloud.com/models/pmml/\r\n&Description=test\r\n&<公共请求参数>",
39
- "output": "{\n \"Response\": {\n \"RequestId\": \"63dccc5a-0084-4a3e-a9ae-cefb019fce9d\",\n \"ServiceConfig\": {\n \"Id\": \"aktst2r9fkmtpdf8\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"ModelUri\": \"cos://ti-example-125550209.cos.ap-beijing.myqcloud.com/models/pmml/\",\n \"CreateTime\": \"2019-11-07T15:01:12+08:00\",\n \"UpdateTime\": \"2019-11-07T15:01:12+08:00\",\n \"Version\": \"1.0\",\n \"Description\": \"test\"\n }\n }\n}",
40
- "title": "创建服务配置"
41
- }
42
- ],
43
- "DeleteInstance": [
44
- {
45
- "document": "",
46
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteInstance\r\n&InstanceId=ins-xxxxxxxx\r\n&<公共请求参数>",
47
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\"\n }\n}",
48
- "title": "删除节点"
49
- }
50
- ],
51
- "DeleteJob": [
52
- {
53
- "document": "",
54
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteJob\r\n&JobId=aktwbxqmfkr8g44v\r\n&<公共请求参数>",
55
- "output": "{\n \"Response\": {\n \"RequestId\": \"f478e4dd-02e5-4468-9a5d-baf762b8e36d\"\n }\n}",
56
- "title": "删除任务"
57
- }
58
- ],
59
- "DeleteResourceGroup": [
60
- {
61
- "document": "",
62
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteResourceGroup\r\n&ResourceGroupId=rsg-xxxxxxxx\r\n&<公共请求参数>",
63
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\"\n }\n}",
64
- "title": "删除资源组"
65
- }
66
- ],
67
- "DeleteRsgAsGroup": [
68
- {
69
- "document": "",
70
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteRsgAsGroup\r\n&Id=asg-xxxxxxxx\r\n&<公共请求参数>",
71
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\"\n }\n}",
72
- "title": "删除资源组的伸缩组"
73
- }
74
- ],
75
- "DeleteRuntime": [
76
- {
77
- "document": "",
78
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteRuntime\r\n&Runtime=test\r\n&<公共请求参数>",
79
- "output": "{\n \"Response\": {\n \"RequestId\": \"754a8f06-3e10-4282-8c77-b0efc6fbb132\"\n }\n}",
80
- "title": "删除运行环境"
81
- }
82
- ],
83
- "DeleteService": [
84
- {
85
- "document": "",
86
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteServiceConfig\r\n&ServiceId=xxxx\r\n&<公共请求参数>",
87
- "output": "{\n \"Response\": {\n \"RequestId\": \"bb70a498-78e1-4905-bc73-170b66edabb9\"\n }\n}",
88
- "title": "删除服务"
89
- }
90
- ],
91
- "DeleteServiceConfig": [
92
- {
93
- "document": "",
94
- "input": "https://tiems.tencentcloudapi.com/?Action=DeleteServiceConfig\r\n&ServiceConfigName=test\r\n&<公共请求参数>",
95
- "output": "{\n \"Response\": {\n \"RequestId\": \"9120fa1d-f19c-4b11-a9af-956911fbc85b\"\n }\n}",
96
- "title": "删除服务配置"
97
- }
98
- ],
99
- "DescribeInstances": [
100
- {
101
- "document": "",
102
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeInstances\r\n&<公共请求参数>",
103
- "output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"AbnormalReason\": \"\",\n \"Cpu\": 24,\n \"CpuRequested\": 0,\n \"Created\": \"2019-11-06T16:18:22+08:00\",\n \"DeadlineTime\": \"2020-02-06T16:18:36+08:00\",\n \"Gpu\": 0,\n \"GpuRequested\": 0,\n \"Id\": \"ins-19a065ev\",\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceType\": \"sv_tiems_instance_24c48g\",\n \"Memory\": 48,\n \"MemoryRequested\": 0,\n \"Region\": \"ap-beijing\",\n \"RenewFlag\": \"DISABLE_NOTIFY_AND_MANUAL_RENEW\",\n \"ResourceGroupId\": \"fl2hrhgp97jcg8pf\",\n \"State\": \"Running\",\n \"Updated\": \"2019-11-07T20:50:34+08:00\",\n \"Zone\": \"ap-beijing-2\"\n },\n {\n \"AbnormalReason\": \"\",\n \"Cpu\": 24,\n \"CpuRequested\": 0,\n \"Created\": \"2019-11-06T16:18:22+08:00\",\n \"DeadlineTime\": \"2020-02-06T16:18:29+08:00\",\n \"Gpu\": 0,\n \"GpuRequested\": 0,\n \"Id\": \"ins-19a066i9\",\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceType\": \"sv_tiems_instance_24c48g\",\n \"Memory\": 48,\n \"MemoryRequested\": 0,\n \"Region\": \"ap-beijing\",\n \"RenewFlag\": \"DISABLE_NOTIFY_AND_MANUAL_RENEW\",\n \"ResourceGroupId\": \"pf2kdwlmn9s2wq5m\",\n \"State\": \"Running\",\n \"Updated\": \"2019-11-07T20:50:34+08:00\",\n \"Zone\": \"ap-beijing-2\"\n }\n ],\n \"RequestId\": \"675e9ba8-f0ad-4727-83cc-384ee8089ac6\",\n \"TotalCount\": 2\n }\n}",
104
- "title": "展示用户当前地域下所有节点"
105
- },
106
- {
107
- "document": "",
108
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeInstances\r\n&ResourceGroupId=pf2kdwlmn9s2wq5m\r\n&<公共请求参数>",
109
- "output": "{\n \"Response\": {\n \"Instances\": [\n {\n \"AbnormalReason\": \"\",\n \"Cpu\": 24,\n \"CpuRequested\": 0,\n \"Created\": \"2019-11-06T16:18:22+08:00\",\n \"DeadlineTime\": \"2020-02-06T16:18:29+08:00\",\n \"Gpu\": 0,\n \"GpuRequested\": 0,\n \"Id\": \"ins-19a066i9\",\n \"InstanceChargeType\": \"PREPAID\",\n \"InstanceType\": \"sv_tiems_instance_24c48g\",\n \"Memory\": 48,\n \"MemoryRequested\": 0,\n \"Region\": \"ap-beijing\",\n \"RenewFlag\": \"DISABLE_NOTIFY_AND_MANUAL_RENEW\",\n \"ResourceGroupId\": \"pf2kdwlmn9s2wq5m\",\n \"State\": \"Running\",\n \"Updated\": \"2019-11-07T20:50:34+08:00\",\n \"Zone\": \"ap-beijing-2\"\n }\n ],\n \"RequestId\": \"6c6ebb92-5ede-491e-ab88-d49cb3dc22a1\",\n \"TotalCount\": 1\n }\n}",
110
- "title": "展示用户当前地域下某资源组的所有节点"
111
- }
112
- ],
113
- "DescribeResourceGroups": [
114
- {
115
- "document": "",
116
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeResourceGroups\r\n&<公共请求参数>",
117
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\",\n \"ResourceGroups\": [\n {\n \"Region\": \"ap-beijing\",\n \"Cluster\": \"ap-beijing\",\n \"Id\": \"ap-beijing\",\n \"Name\": \"公共资源组\",\n \"Description\": \"公共资源组\",\n \"Created\": \"\",\n \"Updated\": \"\",\n \"InstanceCount\": 0,\n \"ServiceCount\": 0,\n \"JobCount\": 0,\n \"InstanceType\": \"sv_tiems_instance_4c20g1p4\",\n \"Gpu\": 0,\n \"Cpu\": 0,\n \"Memory\": 0,\n \"Status\": \"Ready\",\n \"Zone\": \"ap-beijing-4\",\n \"GpuType\": [\n \"P4\"\n ],\n \"Public\": true\n },\n {\n \"Cluster\": \"ap-beijing\",\n \"Cpu\": 336,\n \"Created\": \"2019-10-22T22:32:38+08:00\",\n \"Description\": \"\",\n \"Gpu\": 0,\n \"GpuType\": [],\n \"Id\": \"kd8rgp2qpxf5h46f\",\n \"InstanceCount\": 14,\n \"InstanceType\": \"sv_tiems_instance_24c48g\",\n \"JobCount\": 2,\n \"Memory\": 0,\n \"Name\": \"rsg-kd8rgp2qpxf5h46f\",\n \"Public\": false,\n \"Region\": \"ap-beijing\",\n \"ServiceCount\": 10,\n \"Status\": \"Ready\",\n \"Updated\": \"2019-10-22T22:32:38+08:00\",\n \"Zone\": \"ap-beijing-2\"\n }\n ],\n \"TotalCount\": 2\n }\n}",
118
- "title": "展示用户当前地域下的可用资源组(包括公共资源组)"
119
- },
120
- {
121
- "document": "",
122
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeResourceGroups\r\n&Filters.0.Name=public\r\n&<公共请求参数>",
123
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\",\n \"ResourceGroups\": [\n {\n \"Cluster\": \"ap-beijing\",\n \"Cpu\": 336,\n \"Created\": \"2019-10-22T22:32:38+08:00\",\n \"Description\": \"\",\n \"Gpu\": 0,\n \"GpuType\": [],\n \"Id\": \"kd8rgp2qpxf5h46f\",\n \"InstanceCount\": 14,\n \"InstanceType\": \"sv_tiems_instance_24c48g\",\n \"JobCount\": 2,\n \"Memory\": 0,\n \"Name\": \"rsg-kd8rgp2qpxf5h46f\",\n \"Public\": false,\n \"Region\": \"ap-beijing\",\n \"ServiceCount\": 10,\n \"Status\": \"Ready\",\n \"Updated\": \"2019-10-22T22:32:38+08:00\",\n \"Zone\": \"ap-beijing-2\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
124
- "title": "展示用户当前地域下的可用资源组(不包括公共资源组)"
125
- }
126
- ],
127
- "DescribeRsgAsGroupActivities": [
128
- {
129
- "document": "",
130
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeRsgAsGroupActivities\r\n&Id=asg-xxxxxxxx\r\n&<公共请求参数>",
131
- "output": "{\n \"Response\": {\n \"RequestId\": \"206bf53c-c658-44cb-b50a-5eb9904c49fd\",\n \"RsgAsGroupActivitySet\": [\n {\n \"Id\": \"asa-xxxxxxxx\",\n \"RsgAsGroupId\": \"asg-xxxxxxxx\",\n \"ActivityType\": \"SCALE_OUT\",\n \"StatusCode\": \"FAILED\",\n \"StatusMessage\": \"选择的机型在当前可用区已售罄\",\n \"Cause\": \"因匹配期望实例数\",\n \"Description\": \"因匹配期望实例数,扩容1台\",\n \"StartTime\": \"2019-12-30T10:11:26+08:00\",\n \"EndTime\": \"2019-12-30T10:11:27+08:00\",\n \"CreateTime\": \"2019-12-30T10:11:26+08:00\",\n \"StatusMessageSimplified\": \"云主机售罄\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
132
- "title": "查询伸缩组活动"
133
- }
134
- ],
135
- "DescribeRsgAsGroups": [
136
- {
137
- "document": "",
138
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeRsgAsGroups\r\nFilters.0.Name=rsg_id\r\n&Filters.0.Values.0=rsg-xxxxxxxx\r\n&<公共请求参数>",
139
- "output": "{\n \"Response\": {\n \"RequestId\": \"3d96e8c0-97a9-43a2-8268-99ff505fbd84\",\n \"RsgAsGroupSet\": [\n {\n \"Id\": \"asg-xxxxxxxx\",\n \"Region\": \"ap-beijing\",\n \"Zone\": \"ap-beijing-5\",\n \"Cluster\": \"ap-beijing\",\n \"RsgId\": \"rsg-xxxxxxxx\",\n \"Name\": \"rsg-xxxxxxxx\",\n \"MaxSize\": 3,\n \"MinSize\": 0,\n \"CreateTime\": \"2019-12-24T17:39:40+08:00\",\n \"UpdateTime\": \"2019-12-24T17:39:40+08:00\",\n \"Status\": \"Enabled\",\n \"InstanceType\": \"sv_tiems_instance_8c32g1t4\",\n \"InstanceCount\": 1\n }\n ],\n \"TotalCount\": 1\n }\n}",
140
- "title": "查询资源组的伸缩组信息"
141
- }
142
- ],
143
- "DescribeRuntimes": [
144
- {
145
- "document": "",
146
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeRuntimes\r\n&<公共请求参数>",
147
- "output": "{\n \"Response\": {\n \"RequestId\": \"efcdba3f-080f-4913-a7a2-5f47e0baf67a\",\n \"Runtimes\": [\n {\n \"Name\": \"pmml\",\n \"Framework\": \"pmml\",\n \"Description\": \"pmml-description\",\n \"Public\": true,\n \"HealthCheckOn\": true,\n \"Image\": \"**\",\n \"CreateTime\": \"2019-11-01T17:03:26+08:00\"\n },\n {\n \"Name\": \"angel\",\n \"Framework\": \"angel\",\n \"Description\": \"angel-description\",\n \"Public\": true,\n \"HealthCheckOn\": true,\n \"Image\": \"**\",\n \"CreateTime\": \"2019-11-01T17:03:26+08:00\"\n },\n {\n \"Name\": \"tfserving\",\n \"Framework\": \"tfserving\",\n \"Description\": \"tfserving-description\",\n \"Public\": true,\n \"HealthCheckOn\": true,\n \"Image\": \"**\",\n \"CreateTime\": \"2019-11-01T17:03:26+08:00\"\n },\n {\n \"Name\": \"test\",\n \"Framework\": \"test\",\n \"Description\": \"字符串\",\n \"Public\": false,\n \"HealthCheckOn\": false,\n \"Image\": \"ccr.ccs.tencentyun.com/mla-library/tool\",\n \"CreateTime\": \"2019-11-07T14:47:49+08:00\"\n }\n ],\n \"UserAccess\": 1\n }\n}",
148
- "title": "描述服务运行环境"
149
- }
150
- ],
151
- "DescribeServiceConfigs": [
152
- {
153
- "document": "",
154
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeServiceConfigs\r\n&<公共请求参数>",
155
- "output": "{\n \"Response\": {\n \"RequestId\": \"4a3d63f8-fb12-4dd5-b444-02c0a91af0d2\",\n \"ServiceConfigs\": [\n {\n \"Id\": \"asjcqn7wtdgrd7t\",\n \"Name\": \"test1\",\n \"Runtime\": \"pmml\",\n \"ModelUri\": \"cos://ti-ems-example.cos.ap-beijing.myqcloud.com/models/pmml/\",\n \"CreateTime\": \"2019-11-04T17:34:58+08:00\",\n \"UpdateTime\": \"2019-11-04T17:34:58+08:00\",\n \"Version\": \"1.0\",\n \"Description\": \"字符串\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
156
- "title": "描述服务配置"
157
- }
158
- ],
159
- "DescribeServices": [
160
- {
161
- "document": "",
162
- "input": "https://tiems.tencentcloudapi.com/?Action=DescribeServices\r\n&Limit=1\r\n&<公共请求参数>",
163
- "output": "{\n \"Response\": {\n \"RequestId\": \"7bf9843d-9153-4647-99a0-05c70ba47603\",\n \"Services\": [\n {\n \"Id\": \"ank95gbm4dwfhmds\",\n \"Cluster\": \"ap-beijing\",\n \"Region\": \"ap-beijing\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"ModelUri\": \"cos://ti-ems-125502019.cos.ap-beijing.myqcloud.com/models/pmml/\",\n \"Cpu\": 100,\n \"Memory\": 100,\n \"Gpu\": 0,\n \"GpuMemory\": 0,\n \"CreateTime\": \"2019-11-07T15:14:19+08:00\",\n \"UpdateTime\": \"2019-11-07T15:14:19+08:00\",\n \"ScaleMode\": \"MANUAL\",\n \"Scaler\": {\n \"MaxReplicas\": 2,\n \"MinReplicas\": 0,\n \"StartReplicas\": 2,\n \"HpaMetrics\": []\n },\n \"Status\": {\n \"DesiredReplicas\": 2,\n \"CurrentReplicas\": 2,\n \"Replicas\": [\n \"ank95gbm4dwfhmds-fccc99cdd-ftff5\",\n \"ank95gbm4dwfhmds-fccc99cdd-fvskl\"\n ],\n \"Status\": \"Normal\",\n \"Message\": \"\",\n \"Conditions\": []\n },\n \"AccessToken\": \"\",\n \"ConfigName\": \"test1\",\n \"ConfigVersion\": \"1.0\",\n \"ServeSeconds\": 470,\n \"ConfigId\": \"asjcqn7wtdgrd7gt\",\n \"ResourceGroupId\": \"ap-beijing\",\n \"ResourceGroupName\": \"公共资源组\",\n \"Exposes\": [],\n \"Description\": \"test\",\n \"GpuType\": \"\"\n }\n ],\n \"TotalCount\": 2\n }\n}",
164
- "title": "描述服务"
165
- }
166
- ],
167
- "DisableRsgAsGroup": [
168
- {
169
- "document": "",
170
- "input": "https://tiems.tencentcloudapi.com/?Action=DisableRsgAsGroup\r\n&Id=asg-xxxxxxxx\r\n&<公共请求参数>",
171
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\"\n }\n}",
172
- "title": "停用资源组的伸缩组"
173
- }
174
- ],
175
- "EnableRsgAsGroup": [
176
- {
177
- "document": "",
178
- "input": "https://tiems.tencentcloudapi.com/?Action=EnableRsgAsGroup\r\n&Id=asg-xxxxxxxx\r\n&<公共请求参数>",
179
- "output": "{\n \"Response\": {\n \"RequestId\": \"0e21c605-3d85-4fc0-bc91-4c61ca250ad5\"\n }\n}",
180
- "title": "启用资源组的伸缩组"
181
- }
182
- ],
183
- "ExposeService": [
184
- {
185
- "document": "",
186
- "input": "https://tiems.tencentcloudapi.com/?Action=ExposeService\r\n&ServiceId=ank95gbm4dwfhmds\r\n&ExposeType=EXTERNAL\r\n&<公共请求参数>",
187
- "output": "{\n \"Response\": {\n \"RequestId\": \"2b6049dc-f99a-47e9-99fa-f701ecc4b76a\",\n \"Expose\": {\n \"ExposeType\": \"EXTERNAL\",\n \"VpcId\": \"\",\n \"SubnetId\": \"\",\n \"Ip\": \"pending\"\n }\n }\n}",
188
- "title": "暴露模型服务"
189
- }
190
- ],
191
- "UpdateJob": [
192
- {
193
- "document": "",
194
- "input": "https://tiems.tencentcloudapi.com/?Action=UpdateJob\r\n&JobId=aktwbxqmfkr8g44v\r\n&Description=123\r\n&<公共请求参数>",
195
- "output": "{\n \"Response\": {\n \"RequestId\": \"a31293c1-d8ba-4dbb-828e-6f16016fbb88\",\n \"Job\": {\n \"Id\": \"aktwbxqmfkr8g44v\",\n \"Cluster\": \"ap-beijing\",\n \"Region\": \"ap-beijing\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"Description\": \"123\",\n \"ConfigId\": \"0\",\n \"PredictInput\": {\n \"InputDataFormat\": \"json\",\n \"OutputDataFormat\": \"json\",\n \"InputPath\": \"cos://data-test-125502019.cos.ap-guangzhou.myqcloud.com/test/pmminput\",\n \"OutputPath\": \"cos://data-test-125502019.cos.ap-guangzhou.myqcloud.com/test/\",\n \"BatchSize\": 32,\n \"SignatureName\": \"\"\n },\n \"Status\": {\n \"DesiredWorkers\": 1,\n \"CurrentWorkers\": 1,\n \"Replicas\": [\n \"aktwbxqmfkr8g44v-mwjbb\"\n ],\n \"Status\": \"Cancelled\",\n \"Message\": \"\"\n },\n \"CreateTime\": \"2019-11-07T15:41:35+08:00\",\n \"StartTime\": \"2019-11-07T15:41:35+08:00\",\n \"EndTime\": \"\",\n \"CancelTime\": \"\",\n \"ResourceGroupId\": \"ap-beijing\",\n \"ResourceGroupName\": \"公共资源组\",\n \"Cpu\": 100,\n \"Memory\": 100,\n \"Gpu\": 0,\n \"GpuMemory\": 0,\n \"GpuType\": \"\",\n \"ConfigName\": \"test1\",\n \"ConfigVersion\": \"1.0\"\n }\n }\n}",
196
- "title": "更新任务"
197
- }
198
- ],
199
- "UpdateRsgAsGroup": [
200
- {
201
- "document": "",
202
- "input": "https://tiems.tencentcloudapi.com/?Action=UpdateRsgAsGroup\r\n&Id=asg-xxxxxxxx\r\n$Name=<name>\r\n&<公共请求参数>",
203
- "output": "{\n \"Response\": {\n \"RequestId\": \"3d96e8c0-97a9-43a2-8268-99ff505fbd84\",\n \"RsgAsGroup\": {\n \"Id\": \"asg-xxxxxxxx\",\n \"Region\": \"ap-beijing\",\n \"Zone\": \"ap-beijing-5\",\n \"Cluster\": \"ap-beijing\",\n \"RsgId\": \"rsg-xxxxxxxx\",\n \"Name\": \"<name>\",\n \"MaxSize\": 5,\n \"MinSize\": 0,\n \"CreateTime\": \"2019-12-24T17:39:40+08:00\",\n \"UpdateTime\": \"2019-12-24T17:39:40+08:00\",\n \"Status\": \"Enabled\",\n \"InstanceType\": \"sv_tiems_instance_8c32g1t4\",\n \"InstanceCount\": 1\n }\n }\n}",
204
- "title": "更新资源组的伸缩组"
205
- }
206
- ],
207
- "UpdateService": [
208
- {
209
- "document": "",
210
- "input": "https://tiems.tencentcloudapi.com/?Action=UpdateService\r\n&ServiceId=ank95gbm4dwfhmds\r\n&Scaler.StartReplicas=2\r\n&Scaler.MaxReplicas=2\r\n&<公共请求参数>",
211
- "output": "{\n \"Response\": {\n \"RequestId\": \"9c7e1137-91a3-4c3b-8ff8-d695276a9b13\",\n \"Service\": {\n \"Id\": \"ank95gbm4dwfhmds\",\n \"Cluster\": \"ap-beijing\",\n \"Region\": \"ap-beijing\",\n \"Name\": \"test\",\n \"Runtime\": \"pmml\",\n \"ModelUri\": \"cos://ti-ems-125502019.cos.ap-beijing.myqcloud.com/models/pmml/\",\n \"Cpu\": 100,\n \"Memory\": 100,\n \"Gpu\": 0,\n \"GpuMemory\": 0,\n \"CreateTime\": \"2019-11-07T15:14:19+08:00\",\n \"UpdateTime\": \"2019-11-07T15:14:19+08:00\",\n \"ScaleMode\": \"MANUAL\",\n \"Scaler\": {\n \"MaxReplicas\": 2,\n \"MinReplicas\": 0,\n \"StartReplicas\": 2,\n \"HpaMetrics\": []\n },\n \"Status\": {\n \"DesiredReplicas\": 1,\n \"CurrentReplicas\": 1,\n \"Replicas\": [\n \"ank95gbm4dwfhmds-fccc99cdd-ftff5\"\n ],\n \"Status\": \"Normal\",\n \"Message\": \"\",\n \"Conditions\": []\n },\n \"AccessToken\": \"\",\n \"ConfigName\": \"test1\",\n \"ConfigVersion\": \"1.0\",\n \"ServeSeconds\": 307,\n \"ConfigId\": \"asjcqn7wtdgrd7gt\",\n \"ResourceGroupId\": \"ap-beijing\",\n \"ResourceGroupName\": \"公共资源组\",\n \"Exposes\": [],\n \"Description\": \"test\",\n \"GpuType\": \"\"\n }\n }\n}",
212
- "title": "更新服务"
213
- }
214
- ]
215
- },
216
- "version": "1.0"
217
- }
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.trdp.trdp_client import action_caller
4
-
@@ -1,207 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- import os
3
- import sys
4
- import six
5
- import json
6
- import tccli.options_define as OptionsDefine
7
- import tccli.format_output as FormatOutput
8
- from tccli import __version__
9
- from tccli.utils import Utils
10
- from tccli.exceptions import ConfigurationError, ClientError, ParamError
11
- from tencentcloud.common import credential
12
- from tencentcloud.common.profile.http_profile import HttpProfile
13
- from tencentcloud.common.profile.client_profile import ClientProfile
14
- from tencentcloud.trdp.v20220726 import trdp_client as trdp_client_v20220726
15
- from tencentcloud.trdp.v20220726 import models as models_v20220726
16
-
17
- from jmespath import search
18
- import time
19
-
20
- def doEvaluateUserRisk(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.TrdpClient(cred, g_param[OptionsDefine.Region], profile)
47
- client._sdkVersion += ("_CLI_" + __version__)
48
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.EvaluateUserRiskRequest()
50
- model.from_json_string(json.dumps(args))
51
- start_time = time.time()
52
- while True:
53
- rsp = client.EvaluateUserRisk(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
-
72
- CLIENT_MAP = {
73
- "v20220726": trdp_client_v20220726,
74
-
75
- }
76
-
77
- MODELS_MAP = {
78
- "v20220726": models_v20220726,
79
-
80
- }
81
-
82
- ACTION_MAP = {
83
- "EvaluateUserRisk": doEvaluateUserRisk,
84
-
85
- }
86
-
87
- AVAILABLE_VERSION_LIST = [
88
- "v20220726",
89
-
90
- ]
91
-
92
-
93
- def action_caller():
94
- return ACTION_MAP
95
-
96
-
97
- def parse_global_arg(parsed_globals):
98
- g_param = parsed_globals
99
- cvm_role_flag = True
100
- for param in parsed_globals.keys():
101
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
102
- OptionsDefine.RoleSessionName]:
103
- if parsed_globals[param] is not None:
104
- cvm_role_flag = False
105
- break
106
- is_exist_profile = True
107
- if not parsed_globals["profile"]:
108
- is_exist_profile = False
109
- g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
110
-
111
- configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
112
- is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
113
- is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
114
-
115
- conf = {}
116
- cred = {}
117
-
118
- if is_conf_exist:
119
- conf = Utils.load_json_msg(conf_path)
120
- if is_cred_exist:
121
- cred = Utils.load_json_msg(cred_path)
122
-
123
- if not (isinstance(conf, dict) and isinstance(cred, dict)):
124
- raise ConfigurationError(
125
- "file: %s or %s is not json format"
126
- % (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
127
-
128
- if OptionsDefine.Token not in cred:
129
- cred[OptionsDefine.Token] = None
130
-
131
- if not is_exist_profile:
132
- if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
133
- cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
134
- cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
135
- cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
136
- cvm_role_flag = False
137
-
138
- if os.environ.get(OptionsDefine.ENV_REGION):
139
- conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
140
-
141
- if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
142
- cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
143
- cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
144
- cvm_role_flag = False
145
-
146
- if cvm_role_flag:
147
- if "type" in cred and cred["type"] == "cvm-role":
148
- g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
149
-
150
- for param in g_param.keys():
151
- if g_param[param] is None:
152
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
153
- if param in cred:
154
- g_param[param] = cred[param]
155
- elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
156
- or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
157
- raise ConfigurationError("%s is invalid" % param)
158
- elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
159
- if param in conf[OptionsDefine.SysParam]:
160
- g_param[param] = conf[OptionsDefine.SysParam][param]
161
- elif param != OptionsDefine.Language:
162
- raise ConfigurationError("%s is invalid" % param)
163
- elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
164
- if param.replace('_', '-') in cred:
165
- g_param[param] = cred[param.replace('_', '-')]
166
-
167
- try:
168
- if g_param[OptionsDefine.ServiceVersion]:
169
- g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
170
- else:
171
- version = conf["trdp"][OptionsDefine.Version]
172
- g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
173
-
174
- if g_param[OptionsDefine.Endpoint] is None:
175
- g_param[OptionsDefine.Endpoint] = conf["trdp"][OptionsDefine.Endpoint]
176
- g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
177
- except Exception as err:
178
- raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
179
-
180
- if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
181
- raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
182
-
183
- if g_param[OptionsDefine.Waiter]:
184
- param = eval(g_param[OptionsDefine.Waiter])
185
- if 'expr' not in param:
186
- raise Exception('`expr` in `--waiter` must be defined')
187
- if 'to' not in param:
188
- raise Exception('`to` in `--waiter` must be defined')
189
- if 'timeout' not in param:
190
- if 'waiter' in conf and 'timeout' in conf['waiter']:
191
- param['timeout'] = conf['waiter']['timeout']
192
- else:
193
- param['timeout'] = 180
194
- if 'interval' not in param:
195
- if 'waiter' in conf and 'interval' in conf['waiter']:
196
- param['interval'] = conf['waiter']['interval']
197
- else:
198
- param['interval'] = 5
199
- param['interval'] = min(param['interval'], param['timeout'])
200
- g_param['OptionsDefine.WaiterInfo'] = param
201
-
202
- if six.PY2:
203
- for key, value in g_param.items():
204
- if isinstance(value, six.text_type):
205
- g_param[key] = value.encode('utf-8')
206
- return g_param
207
-