tccli 3.0.1347.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 (174) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -76
  3. tccli/services/ai3d/__init__.py +4 -0
  4. tccli/services/{smpn/smpn_client.py → ai3d/ai3d_client.py} +17 -17
  5. tccli/services/ai3d/v20250513/api.json +239 -0
  6. tccli/services/ai3d/v20250513/examples.json +21 -0
  7. tccli/services/aiart/v20221229/api.json +3 -3
  8. tccli/services/autoscaling/v20180419/api.json +11 -0
  9. tccli/services/batch/v20170312/api.json +44 -0
  10. tccli/services/cdb/v20170320/api.json +8 -8
  11. tccli/services/cdb/v20170320/examples.json +1 -1
  12. tccli/services/cdn/v20180606/api.json +5 -5
  13. tccli/services/cdwdoris/v20211228/api.json +145 -7
  14. tccli/services/cfg/v20210820/api.json +20 -0
  15. tccli/services/cfs/v20190719/api.json +10 -10
  16. tccli/services/cfw/cfw_client.py +53 -0
  17. tccli/services/cfw/v20190904/api.json +272 -0
  18. tccli/services/cfw/v20190904/examples.json +8 -0
  19. tccli/services/csip/csip_client.py +833 -144
  20. tccli/services/csip/v20221121/api.json +3304 -1436
  21. tccli/services/csip/v20221121/examples.json +104 -0
  22. tccli/services/cvm/v20170312/api.json +64 -1
  23. tccli/services/cwp/v20180228/api.json +9 -0
  24. tccli/services/cwp/v20180228/examples.json +6 -0
  25. tccli/services/emr/v20190103/api.json +217 -2
  26. tccli/services/es/v20250101/api.json +22 -0
  27. tccli/services/ess/v20201111/api.json +10 -1
  28. tccli/services/essbasic/v20210526/api.json +3 -3
  29. tccli/services/gs/v20191118/api.json +38 -0
  30. tccli/services/igtm/igtm_client.py +159 -0
  31. tccli/services/igtm/v20231024/api.json +577 -0
  32. tccli/services/igtm/v20231024/examples.json +24 -0
  33. tccli/services/iotexplorer/v20190423/api.json +3 -3
  34. tccli/services/lcic/lcic_client.py +53 -0
  35. tccli/services/lcic/v20220817/api.json +53 -0
  36. tccli/services/lcic/v20220817/examples.json +8 -0
  37. tccli/services/live/v20180801/api.json +203 -1
  38. tccli/services/live/v20180801/examples.json +1 -1
  39. tccli/services/lke/v20231130/api.json +248 -2
  40. tccli/services/lke/v20231130/examples.json +1 -1
  41. tccli/services/lkeap/v20240522/api.json +1 -1
  42. tccli/services/mrs/v20200910/api.json +10 -0
  43. tccli/services/nlp/nlp_client.py +4 -322
  44. tccli/services/nlp/v20190408/api.json +0 -459
  45. tccli/services/nlp/v20190408/examples.json +0 -48
  46. tccli/services/ocr/v20181119/api.json +97 -11
  47. tccli/services/omics/v20221128/api.json +38 -0
  48. tccli/services/redis/v20180412/api.json +6 -6
  49. tccli/services/redis/v20180412/examples.json +1 -1
  50. tccli/services/ses/v20201002/api.json +100 -5
  51. tccli/services/tcb/v20180608/api.json +1 -1
  52. tccli/services/tcb/v20180608/examples.json +1 -1
  53. tccli/services/tdmq/v20200217/api.json +19 -0
  54. tccli/services/teo/teo_client.py +281 -16
  55. tccli/services/teo/v20220901/api.json +611 -6
  56. tccli/services/teo/v20220901/examples.json +48 -2
  57. tccli/services/tione/v20211111/api.json +16 -0
  58. tccli/services/tke/tke_client.py +57 -4
  59. tccli/services/tke/v20180525/api.json +24 -24
  60. tccli/services/tke/v20220501/api.json +52 -0
  61. tccli/services/tke/v20220501/examples.json +8 -0
  62. tccli/services/tmt/v20180321/api.json +4 -4
  63. tccli/services/tsf/v20180326/api.json +4 -4
  64. tccli/services/vclm/v20240523/api.json +3 -3
  65. tccli/services/vod/v20180717/api.json +5 -5
  66. tccli/services/vod/v20180717/examples.json +9 -9
  67. tccli/services/vpc/v20170312/api.json +1 -1
  68. tccli/services/vrs/v20200824/api.json +1 -1
  69. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/METADATA +2 -2
  70. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/RECORD +73 -171
  71. tccli/services/cis/__init__.py +0 -4
  72. tccli/services/cis/cis_client.py +0 -525
  73. tccli/services/cis/v20180408/api.json +0 -737
  74. tccli/services/cis/v20180408/examples.json +0 -93
  75. tccli/services/dataintegration/__init__.py +0 -4
  76. tccli/services/dataintegration/dataintegration_client.py +0 -207
  77. tccli/services/dataintegration/v20220613/api.json +0 -87
  78. tccli/services/dataintegration/v20220613/examples.json +0 -13
  79. tccli/services/dtf/__init__.py +0 -4
  80. tccli/services/dtf/dtf_client.py +0 -207
  81. tccli/services/dtf/v20200506/api.json +0 -274
  82. tccli/services/dtf/v20200506/examples.json +0 -13
  83. tccli/services/gpm/__init__.py +0 -4
  84. tccli/services/gpm/gpm_client.py +0 -1108
  85. tccli/services/gpm/v20200820/api.json +0 -1959
  86. tccli/services/gpm/v20200820/examples.json +0 -149
  87. tccli/services/gse/__init__.py +0 -4
  88. tccli/services/gse/gse_client.py +0 -4076
  89. tccli/services/gse/v20191112/api.json +0 -7095
  90. tccli/services/gse/v20191112/examples.json +0 -615
  91. tccli/services/iecp/__init__.py +0 -4
  92. tccli/services/iecp/iecp_client.py +0 -4500
  93. tccli/services/iecp/v20210914/api.json +0 -9770
  94. tccli/services/iecp/v20210914/examples.json +0 -691
  95. tccli/services/iir/__init__.py +0 -4
  96. tccli/services/iir/iir_client.py +0 -207
  97. tccli/services/iir/v20200417/api.json +0 -204
  98. tccli/services/iir/v20200417/examples.json +0 -13
  99. tccli/services/iottid/__init__.py +0 -4
  100. tccli/services/iottid/iottid_client.py +0 -631
  101. tccli/services/iottid/v20190411/api.json +0 -553
  102. tccli/services/iottid/v20190411/examples.json +0 -95
  103. tccli/services/mgobe/__init__.py +0 -4
  104. tccli/services/mgobe/mgobe_client.py +0 -530
  105. tccli/services/mgobe/v20190929/api.json +0 -52
  106. tccli/services/mgobe/v20190929/examples.json +0 -13
  107. tccli/services/mgobe/v20201014/api.json +0 -671
  108. tccli/services/mgobe/v20201014/examples.json +0 -61
  109. tccli/services/mvj/__init__.py +0 -4
  110. tccli/services/mvj/mvj_client.py +0 -207
  111. tccli/services/mvj/v20190926/api.json +0 -123
  112. tccli/services/mvj/v20190926/examples.json +0 -19
  113. tccli/services/pds/__init__.py +0 -4
  114. tccli/services/pds/pds_client.py +0 -260
  115. tccli/services/pds/v20210701/api.json +0 -193
  116. tccli/services/pds/v20210701/examples.json +0 -21
  117. tccli/services/smpn/__init__.py +0 -4
  118. tccli/services/smpn/v20190822/api.json +0 -191
  119. tccli/services/smpn/v20190822/examples.json +0 -21
  120. tccli/services/solar/__init__.py +0 -4
  121. tccli/services/solar/solar_client.py +0 -1055
  122. tccli/services/solar/v20181011/api.json +0 -1760
  123. tccli/services/solar/v20181011/examples.json +0 -125
  124. tccli/services/tan/__init__.py +0 -4
  125. tccli/services/tan/tan_client.py +0 -207
  126. tccli/services/tan/v20220420/api.json +0 -65
  127. tccli/services/tan/v20220420/examples.json +0 -19
  128. tccli/services/tav/__init__.py +0 -4
  129. tccli/services/tav/tav_client.py +0 -366
  130. tccli/services/tav/v20190118/api.json +0 -262
  131. tccli/services/tav/v20190118/examples.json +0 -37
  132. tccli/services/tbm/__init__.py +0 -4
  133. tccli/services/tbm/tbm_client.py +0 -631
  134. tccli/services/tbm/v20180129/api.json +0 -1037
  135. tccli/services/tbm/v20180129/examples.json +0 -77
  136. tccli/services/tcex/__init__.py +0 -4
  137. tccli/services/tcex/tcex_client.py +0 -260
  138. tccli/services/tcex/v20200727/api.json +0 -158
  139. tccli/services/tcex/v20200727/examples.json +0 -21
  140. tccli/services/tci/__init__.py +0 -4
  141. tccli/services/tci/tci_client.py +0 -2327
  142. tccli/services/tci/v20190318/api.json +0 -4958
  143. tccli/services/tci/v20190318/examples.json +0 -333
  144. tccli/services/tic/__init__.py +0 -4
  145. tccli/services/tic/tic_client.py +0 -843
  146. tccli/services/tic/v20201117/api.json +0 -1067
  147. tccli/services/tic/v20201117/examples.json +0 -121
  148. tccli/services/ticm/__init__.py +0 -4
  149. tccli/services/ticm/ticm_client.py +0 -313
  150. tccli/services/ticm/v20181127/api.json +0 -1391
  151. tccli/services/ticm/v20181127/examples.json +0 -53
  152. tccli/services/tics/__init__.py +0 -4
  153. tccli/services/tics/tics_client.py +0 -366
  154. tccli/services/tics/v20181115/api.json +0 -694
  155. tccli/services/tics/v20181115/examples.json +0 -37
  156. tccli/services/tiems/__init__.py +0 -4
  157. tccli/services/tiems/tiems_client.py +0 -1479
  158. tccli/services/tiems/v20190416/api.json +0 -3144
  159. tccli/services/tiems/v20190416/examples.json +0 -217
  160. tccli/services/trdp/__init__.py +0 -4
  161. tccli/services/trdp/trdp_client.py +0 -207
  162. tccli/services/trdp/v20220726/api.json +0 -843
  163. tccli/services/trdp/v20220726/examples.json +0 -13
  164. tccli/services/ump/__init__.py +0 -4
  165. tccli/services/ump/ump_client.py +0 -1055
  166. tccli/services/ump/v20200918/api.json +0 -2168
  167. tccli/services/ump/v20200918/examples.json +0 -141
  168. tccli/services/youmall/__init__.py +0 -4
  169. tccli/services/youmall/v20180228/api.json +0 -3572
  170. tccli/services/youmall/v20180228/examples.json +0 -313
  171. tccli/services/youmall/youmall_client.py +0 -1797
  172. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/WHEEL +0 -0
  173. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/entry_points.txt +0 -0
  174. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,61 +0,0 @@
1
- {
2
- "actions": {
3
- "ChangeRoomPlayerProfile": [
4
- {
5
- "document": "修改房间玩家自定义属性",
6
- "input": "https://mgobe.tencentcloudapi.com/?Action=ChangeRoomPlayerProfile\n&GameId=obg-fr4vwil4\n&PlayerId=joe123455\n&CustomProfile=worker\n&<公共请求参数>",
7
- "output": "{\n \"Response\": {\n \"Room\": {\n \"Name\": \"xx\",\n \"IsForbidJoin\": false,\n \"StartGameTime\": 0,\n \"Owner\": \"xx\",\n \"FrameRate\": 15,\n \"MaxPlayers\": 2,\n \"Teams\": [\n {\n \"MinPlayers\": 1,\n \"Id\": \"xx\",\n \"MaxPlayers\": 1,\n \"Name\": \"xx\"\n },\n {\n \"MinPlayers\": 1,\n \"Id\": \"xx\",\n \"MaxPlayers\": 1,\n \"Name\": \"xx\"\n }\n ],\n \"Players\": [\n {\n \"OpenId\": \"joe123455\",\n \"Name\": \"xx\",\n \"CustomProfile\": \"worker\",\n \"IsRobot\": false,\n \"PlayerId\": \"joe123455\",\n \"CustomPlayerStatus\": 1,\n \"TeamId\": \"xx\"\n },\n {\n \"OpenId\": \"xx\",\n \"Name\": \"xx\",\n \"CustomProfile\": \"xx\",\n \"IsRobot\": false,\n \"PlayerId\": \"xx\",\n \"CustomPlayerStatus\": 1,\n \"TeamId\": \"xx\"\n }\n ],\n \"CreateTime\": 1578494768,\n \"FrameSyncState\": 0,\n \"CreateType\": 2,\n \"CustomProperties\": \"xx\",\n \"IsPrivate\": true,\n \"OwnerOpenId\": \"xx\",\n \"RouteId\": \"xx\",\n \"Type\": \"xx\",\n \"Id\": \"xx\"\n },\n \"RequestId\": \"xx\"\n }\n}",
8
- "title": "修改房间玩家自定义属性"
9
- }
10
- ],
11
- "ChangeRoomPlayerStatus": [
12
- {
13
- "document": "修改房间玩家自定义状态",
14
- "input": "https://mgobe.tencentcloudapi.com/?Action=ChangeRoomPlayerStatus\n&GameId=obg-mqsqod93\n&CustomStatus=123\n&PlayerId=1xqwlevd\n&<公共请求参数>",
15
- "output": "{\n \"Response\": {\n \"RequestId\": \"7d56ee17-e6d7-4faf-8643-db4f0adcd39a\",\n \"Room\": {\n \"CreateTime\": 1610357327,\n \"CreateType\": 0,\n \"CustomProperties\": \"xxxxxxxxx\",\n \"FrameRate\": 15,\n \"FrameSyncState\": 0,\n \"Id\": \"Kefy5lE\",\n \"IsForbidJoin\": false,\n \"IsPrivate\": true,\n \"MaxPlayers\": 10,\n \"Name\": \"测试\",\n \"Owner\": \"1nv49l55\",\n \"OwnerOpenId\": \"\",\n \"Players\": [\n {\n \"CustomPlayerStatus\": 112233,\n \"CustomProfile\": \"测试人员12321\",\n \"IsRobot\": false,\n \"Name\": \"czh007测试\",\n \"OpenId\": \"\",\n \"PlayerId\": \"1nv49l55\",\n \"TeamId\": \"0\"\n },\n {\n \"CustomPlayerStatus\": 123,\n \"CustomProfile\": \"测试人员xxxxxxxxx\",\n \"IsRobot\": false,\n \"Name\": \"测试人员1\",\n \"OpenId\": \"\",\n \"PlayerId\": \"1xqwlevd\",\n \"TeamId\": \"0\"\n }\n ],\n \"RouteId\": \"4hrNbSFqepv7dGq/wLw+jN7E2nvfCNep7N5WO01EktcFJtru+173SH5opwUZOxJK\",\n \"StartGameTime\": 0,\n \"Teams\": [\n {\n \"Id\": \"0\",\n \"MaxPlayers\": 10,\n \"MinPlayers\": 1,\n \"Name\": \"\"\n }\n ],\n \"Type\": \"A\"\n }\n }\n}",
16
- "title": "修改房间玩家自定义状态"
17
- }
18
- ],
19
- "DescribePlayer": [
20
- {
21
- "document": "查询玩家信息",
22
- "input": "https://mgobe.tencentcloudapi.com/?Action=DescribePlayer\n&GameId=obg-fr4vwil4\n&PlayerId=joe123455\n&<公共请求参数>",
23
- "output": "{\n \"Response\": {\n \"Player\": {\n \"OpenId\": \"joe123455\",\n \"Name\": \"xx\",\n \"CustomProfile\": \"worker\",\n \"IsRobot\": false,\n \"PlayerId\": \"joe123455\",\n \"CustomPlayerStatus\": 1,\n \"TeamId\": \"xx\"\n },\n \"RequestId\": \"xx\"\n }\n}",
24
- "title": "查询玩家信息"
25
- }
26
- ],
27
- "DescribeRoom": [
28
- {
29
- "document": "查询房间信息",
30
- "input": "https://mgobe.tencentcloudapi.com/?Action=DescribeRoom\n&GameId=obg-fr4vwil4\n&PlayerId=joe123455\n&<公共请求参数>",
31
- "output": "{\n \"Response\": {\n \"Room\": {\n \"Name\": \"xx\",\n \"IsForbidJoin\": false,\n \"StartGameTime\": 0,\n \"Owner\": \"xx\",\n \"FrameRate\": 15,\n \"MaxPlayers\": 2,\n \"Teams\": [\n {\n \"MinPlayers\": 1,\n \"Id\": \"xx\",\n \"MaxPlayers\": 1,\n \"Name\": \"xx\"\n },\n {\n \"MinPlayers\": 1,\n \"Id\": \"xx\",\n \"MaxPlayers\": 1,\n \"Name\": \"xx\"\n }\n ],\n \"Players\": [\n {\n \"OpenId\": \"joe123455\",\n \"Name\": \"xx\",\n \"CustomProfile\": \"worker\",\n \"IsRobot\": false,\n \"PlayerId\": \"joe123455\",\n \"CustomPlayerStatus\": 1,\n \"TeamId\": \"xx\"\n },\n {\n \"OpenId\": \"xx\",\n \"Name\": \"xx\",\n \"CustomProfile\": \"xx\",\n \"IsRobot\": false,\n \"PlayerId\": \"xx\",\n \"CustomPlayerStatus\": 1,\n \"TeamId\": \"xx\"\n }\n ],\n \"CreateTime\": 1578494768,\n \"FrameSyncState\": 0,\n \"CreateType\": 2,\n \"CustomProperties\": \"xx\",\n \"IsPrivate\": true,\n \"OwnerOpenId\": \"xx\",\n \"RouteId\": \"xx\",\n \"Type\": \"xx\",\n \"Id\": \"xx\"\n },\n \"RequestId\": \"xx\"\n }\n}",
32
- "title": "查询房间信息"
33
- }
34
- ],
35
- "DismissRoom": [
36
- {
37
- "document": "通过game_id、room_id解散房间",
38
- "input": "https://mgobe.tencentcloudapi.com/?Action=DismissRoom\n&GameId=\"obg-hvhvbs\"\n&RoomId=\"Sfsfdf\"\n&<公共请求参数>",
39
- "output": "{\n \"Response\": {\n \"RequestId\": \"f481b4a1-1efd-48fd-a35a-5d544c40b5b2\"\n }\n}",
40
- "title": "解散房间"
41
- }
42
- ],
43
- "ModifyRoom": [
44
- {
45
- "document": "修改房间玩家自定义状态",
46
- "input": "https://mgobe.tencentcloudapi.com/?Action=ModifyRoom\n&GameId=obg-mqsqod93\n&RoomName=我是一个房间名\n&Owner=1xqwlevd\n&CustomProperties=国王乱杀懂?\n&RoomId=Kefy5lE\n&PlayerId=1xqwlevd\n&ChangeRoomOptionList.0=0\n&ChangeRoomOptionList.1=1\n&ChangeRoomOptionList.2=5\n&<公共请求参数>",
47
- "output": "{\n \"Response\": {\n \"RequestId\": \"329991b3-edd5-4fe9-b6d6-b5d108f64f81\",\n \"Room\": {\n \"CreateTime\": 1610357327,\n \"CreateType\": 0,\n \"CustomProperties\": \"国王乱杀懂?\",\n \"FrameRate\": 15,\n \"FrameSyncState\": 0,\n \"Id\": \"Kefy5lE\",\n \"IsForbidJoin\": false,\n \"IsPrivate\": true,\n \"MaxPlayers\": 10,\n \"Name\": \"我是一个房间名\",\n \"Owner\": \"1xqwlevd\",\n \"OwnerOpenId\": \"\",\n \"Players\": [\n {\n \"CustomPlayerStatus\": 112233,\n \"CustomProfile\": \"测试人员12321\",\n \"IsRobot\": false,\n \"Name\": \"czh007测试\",\n \"OpenId\": \"\",\n \"PlayerId\": \"1nv49l55\",\n \"TeamId\": \"0\"\n },\n {\n \"CustomPlayerStatus\": 123,\n \"CustomProfile\": \"测试人员xxxxxxxxx\",\n \"IsRobot\": false,\n \"Name\": \"测试人员1\",\n \"OpenId\": \"\",\n \"PlayerId\": \"1xqwlevd\",\n \"TeamId\": \"0\"\n }\n ],\n \"RouteId\": \"4hrNbSFqepv7dGq/wLw+jN7E2nvfCNep7N5WO01EktcFJtru+173SH5opwUZOxJK\",\n \"StartGameTime\": 0,\n \"Teams\": [\n {\n \"Id\": \"0\",\n \"MaxPlayers\": 10,\n \"MinPlayers\": 1,\n \"Name\": \"\"\n }\n ],\n \"Type\": \"A\"\n }\n }\n}",
48
- "title": "修改房间玩家自定义状态"
49
- }
50
- ],
51
- "RemoveRoomPlayer": [
52
- {
53
- "document": "修改房间玩家自定义状态",
54
- "input": "https://mgobe.tencentcloudapi.com/?Action=RemoveRoomPlayer\n&GameId=obg-mqsqod93\n&RemovePlayerId=1xqwlevd\n&<公共请求参数>",
55
- "output": "{\n \"Response\": {\n \"RequestId\": \"1f7dc756-ad45-40c9-911d-8700c6d63a9d\",\n \"Room\": {\n \"CreateTime\": 1610357327,\n \"CreateType\": 0,\n \"CustomProperties\": \"xxxxxxxxx\",\n \"FrameRate\": 15,\n \"FrameSyncState\": 0,\n \"Id\": \"Kefy5lE\",\n \"IsForbidJoin\": false,\n \"IsPrivate\": true,\n \"MaxPlayers\": 10,\n \"Name\": \"测试\",\n \"Owner\": \"1nv49l55\",\n \"OwnerOpenId\": \"\",\n \"Players\": [\n {\n \"CustomPlayerStatus\": 112233,\n \"CustomProfile\": \"测试人员12321\",\n \"IsRobot\": false,\n \"Name\": \"czh007测试\",\n \"OpenId\": \"\",\n \"PlayerId\": \"1nv49l55\",\n \"TeamId\": \"0\"\n }\n ],\n \"RouteId\": \"4hrNbSFqepv7dGq/wLw+jN7E2nvfCNep7N5WO01EktcFJtru+173SH5opwUZOxJK\",\n \"StartGameTime\": 0,\n \"Teams\": [\n {\n \"Id\": \"0\",\n \"MaxPlayers\": 10,\n \"MinPlayers\": 1,\n \"Name\": \"\"\n }\n ],\n \"Type\": \"A\"\n }\n }\n}",
56
- "title": "修改房间玩家自定义状态"
57
- }
58
- ]
59
- },
60
- "version": "1.0"
61
- }
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.mvj.mvj_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.mvj.v20190926 import mvj_client as mvj_client_v20190926
15
- from tencentcloud.mvj.v20190926 import models as models_v20190926
16
-
17
- from jmespath import search
18
- import time
19
-
20
- def doMarketingValueJudgement(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.MvjClient(cred, g_param[OptionsDefine.Region], profile)
47
- client._sdkVersion += ("_CLI_" + __version__)
48
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.MarketingValueJudgementRequest()
50
- model.from_json_string(json.dumps(args))
51
- start_time = time.time()
52
- while True:
53
- rsp = client.MarketingValueJudgement(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
- "v20190926": mvj_client_v20190926,
74
-
75
- }
76
-
77
- MODELS_MAP = {
78
- "v20190926": models_v20190926,
79
-
80
- }
81
-
82
- ACTION_MAP = {
83
- "MarketingValueJudgement": doMarketingValueJudgement,
84
-
85
- }
86
-
87
- AVAILABLE_VERSION_LIST = [
88
- "v20190926",
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["mvj"][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["mvj"][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
-
@@ -1,123 +0,0 @@
1
- {
2
- "actions": {
3
- "MarketingValueJudgement": {
4
- "document": "欢迎使用营销价值判断(Marketing Value Judgement,简称 MVJ)。\n\n营销价值判断(MVJ)是针对零售场景的风控服务,通过识别高价值顾客,以帮助零售商保障营销资金",
5
- "input": "MarketingValueJudgementRequest",
6
- "name": "营销价值判断",
7
- "output": "MarketingValueJudgementResponse"
8
- }
9
- },
10
- "metadata": {
11
- "apiVersion": "2019-09-26",
12
- "serviceNameCN": "营销价值判断",
13
- "serviceShortName": "mvj"
14
- },
15
- "objects": {
16
- "Data": {
17
- "document": "返回结构",
18
- "members": [
19
- {
20
- "document": "操作时间戳,单位秒",
21
- "member": "uint64",
22
- "name": "PostTime",
23
- "required": true,
24
- "type": "int",
25
- "value_allowed_null": false
26
- },
27
- {
28
- "document": "用户ID \naccountType不同对应不同的用户ID。如果是QQ或微信用户则填入对应的openId",
29
- "member": "string",
30
- "name": "Uid",
31
- "required": true,
32
- "type": "string",
33
- "value_allowed_null": false
34
- },
35
- {
36
- "document": "操作来源的外网IP",
37
- "member": "string",
38
- "name": "UserIp",
39
- "required": true,
40
- "type": "string",
41
- "value_allowed_null": false
42
- },
43
- {
44
- "document": "0~100:营销价值评分,分值越高,价值越大\n[0,50]低价值\n[50,70]价值一般\n[70,100]高价值",
45
- "member": "uint64",
46
- "name": "ValueScore",
47
- "required": true,
48
- "type": "int",
49
- "value_allowed_null": false
50
- }
51
- ],
52
- "usage": "out"
53
- },
54
- "MarketingValueJudgementRequest": {
55
- "document": "MarketingValueJudgement请求参数结构体",
56
- "members": [
57
- {
58
- "document": "手机账号类型填写4",
59
- "member": "uint64",
60
- "name": "AccountType",
61
- "required": true,
62
- "type": "int"
63
- },
64
- {
65
- "document": "填写手机号码,如15317537488",
66
- "member": "string",
67
- "name": "Uid",
68
- "required": true,
69
- "type": "string"
70
- },
71
- {
72
- "document": "用户请求时的客户端外网IP",
73
- "member": "string",
74
- "name": "UserIp",
75
- "required": true,
76
- "type": "string"
77
- },
78
- {
79
- "document": "用户操作时间戳,单位秒(格林威治时间精确到秒,如1501590972)",
80
- "member": "uint64",
81
- "name": "PostTime",
82
- "required": true,
83
- "type": "int"
84
- },
85
- {
86
- "document": "用户设备号imei/idfa(建议填写)",
87
- "member": "string",
88
- "name": "Imei",
89
- "required": false,
90
- "type": "string"
91
- },
92
- {
93
- "document": "活动链接(建议填写)",
94
- "member": "string",
95
- "name": "Referer",
96
- "required": false,
97
- "type": "string"
98
- }
99
- ],
100
- "type": "object"
101
- },
102
- "MarketingValueJudgementResponse": {
103
- "document": "MarketingValueJudgement返回参数结构体",
104
- "members": [
105
- {
106
- "document": "返回数据",
107
- "member": "Data",
108
- "name": "Data",
109
- "type": "object",
110
- "value_allowed_null": false
111
- },
112
- {
113
- "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
114
- "member": "string",
115
- "name": "RequestId",
116
- "type": "string"
117
- }
118
- ],
119
- "type": "object"
120
- }
121
- },
122
- "version": "1.0"
123
- }
@@ -1,19 +0,0 @@
1
- {
2
- "actions": {
3
- "MarketingValueJudgement": [
4
- {
5
- "document": "",
6
- "input": "https://mvj.tencentcloudapi.com/?Action=MarketingValueJudgement\r\n&AccountType=4\r\n&Uid=17620430702\r\n&UserIp=117.62.203.111\r\n&PostTime=1569486063\r\n&Imei=861622010000056\r\n&Referer=1569571332\r\n&<公共请求参数>",
7
- "output": "{\r\n \"Response\": {\r\n \"Data\": {\r\n \"PostTime\": 1569486063,\r\n \"Uid\": \"17620430702\",\r\n \"UserIp\": \"117.62.203.111\",\r\n \"ValueScore\": 84\r\n },\r\n \"RequestId\": \"ab49be72-fac8-467d-bf59-9c6193fe5af6\"\r\n }\r\n}",
8
- "title": "营销价值判断正确返回示例"
9
- },
10
- {
11
- "document": "",
12
- "input": "https://mvj.tencentcloudapi.com/?Action=MarketingValueJudgement\r\n&AccountType=4\r\n&Uid=1620430702\r\n&UserIp=117.62.203.111\r\n&PostTime=1569486063\r\n&Imei=861622010000056\r\n&Referer=1569571332\r\n&<公共请求参数>",
13
- "output": "{\r\n \"Response\": {\r\n \"Error\": {\r\n \"Code\": \"InvalidParameterValue.AccountNotFound\",\r\n \"Message\": \"未开通账号!\"\r\n },\r\n \"RequestId\": \"8ce8d3dd-d849-4bc4-9fa0-2868749164eb\"\r\n }\r\n}",
14
- "title": "营销价值判断错误返回示例"
15
- }
16
- ]
17
- },
18
- "version": "1.0"
19
- }
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.pds.pds_client import action_caller
4
-