tencentcloud-sdk-nodejs 4.0.1020 → 4.0.1022

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 (342) hide show
  1. package/package.json +1 -1
  2. package/src/common/sdk_version.ts +1 -1
  3. package/src/services/cfw/v20190904/cfw_client.ts +0 -14
  4. package/src/services/cfw/v20190904/cfw_models.ts +0 -24
  5. package/src/services/lighthouse/v20200324/lighthouse_client.ts +2 -1
  6. package/src/services/lighthouse/v20200324/lighthouse_models.ts +1 -1
  7. package/src/services/teo/v20220901/teo_client.ts +2 -2
  8. package/tencentcloud/common/sdk_version.d.ts +1 -1
  9. package/tencentcloud/common/sdk_version.js +1 -1
  10. package/tencentcloud/services/cfw/v20190904/cfw_client.d.ts +1 -7
  11. package/tencentcloud/services/cfw/v20190904/cfw_client.js +0 -8
  12. package/tencentcloud/services/cfw/v20190904/cfw_models.d.ts +0 -22
  13. package/tencentcloud/services/lighthouse/v20200324/lighthouse_client.d.ts +2 -1
  14. package/tencentcloud/services/lighthouse/v20200324/lighthouse_client.js +2 -1
  15. package/tencentcloud/services/lighthouse/v20200324/lighthouse_models.d.ts +1 -1
  16. package/tencentcloud/services/teo/v20220901/teo_client.d.ts +2 -2
  17. package/tencentcloud/services/teo/v20220901/teo_client.js +2 -2
  18. package/CHANGELOG.md +0 -209443
  19. package/SERVICE_CHANGELOG.md +0 -187708
  20. package/examples/cbs/v20170312/describe_disks.js +0 -32
  21. package/examples/cbs/v20170312/describe_disks.ts +0 -32
  22. package/examples/cls/v20201016/cls.proto +0 -34
  23. package/examples/cls/v20201016/upload_log.js +0 -69
  24. package/examples/common/common_client.js +0 -47
  25. package/examples/common/common_client.ts +0 -47
  26. package/examples/cvm/v20170312/describe_instances.js +0 -44
  27. package/examples/cvm/v20170312/describe_instances.ts +0 -43
  28. package/examples/cvm/v20170312/describe_zones.js +0 -22
  29. package/examples/cvm/v20170312/describe_zones.ts +0 -33
  30. package/examples/cvm/v20170312/inquiry_price_run_instances.ts +0 -73
  31. package/examples/cvm/v20170312/run_instances.js +0 -73
  32. package/examples/cvm/v20170312/run_instances.ts +0 -73
  33. package/examples/cvm_role.js +0 -27
  34. package/examples/cvm_role.ts +0 -28
  35. package/examples/ecc/v20181213/ecc_correct.js +0 -37
  36. package/examples/ecc/v20181213/ecc_correct.ts +0 -37
  37. package/examples/ecc/v20181213/ecc_ocr.js +0 -39
  38. package/examples/ecc/v20181213/ecc_ocr.ts +0 -39
  39. package/examples/hcm/v20181106/hcm_ocr.js +0 -42
  40. package/examples/hcm/v20181106/hcm_ocr.ts +0 -39
  41. package/examples/hunyuan/v20230901/chat_completions.js +0 -59
  42. package/examples/hunyuan/v20230901/chat_completions.ts +0 -61
  43. package/examples/soe/v20180903/init_oral_process.js +0 -41
  44. package/examples/soe/v20180903/init_oral_process.ts +0 -41
  45. package/examples/soe/v20180903/transmit_oral_process.js +0 -43
  46. package/examples/soe/v20180903/transmit_oral_process.ts +0 -43
  47. package/products.md +0 -264
  48. package/test/aa.v20200224.test.js +0 -31
  49. package/test/aai.v20180522.test.js +0 -61
  50. package/test/aca.v20210323.test.js +0 -101
  51. package/test/acp.v20220105.test.js +0 -101
  52. package/test/advisor.v20200721.test.js +0 -41
  53. package/test/af.v20200226.test.js +0 -51
  54. package/test/afc.v20200226.test.js +0 -51
  55. package/test/aiart.v20221229.test.js +0 -191
  56. package/test/ame.v20190916.test.js +0 -331
  57. package/test/ams.v20200608.test.js +0 -91
  58. package/test/ams.v20201229.test.js +0 -71
  59. package/test/anicloud.v20220923.test.js +0 -51
  60. package/test/antiddos.v20200309.test.js +0 -981
  61. package/test/apcas.v20201127.test.js +0 -91
  62. package/test/ape.v20200513.test.js +0 -101
  63. package/test/api.v20201106.test.js +0 -51
  64. package/test/apigateway.v20180808.test.js +0 -1011
  65. package/test/apm.v20210622.test.js +0 -141
  66. package/test/as.v20180419.test.js +0 -591
  67. package/test/asr.v20190614.test.js +0 -341
  68. package/test/asw.v20200722.test.js +0 -111
  69. package/test/ba.v20200720.test.js +0 -51
  70. package/test/batch.v20170312.test.js +0 -331
  71. package/test/bda.v20200324.test.js +0 -201
  72. package/test/bh.v20230418.test.js +0 -641
  73. package/test/bi.v20220105.test.js +0 -261
  74. package/test/billing.v20180709.test.js +0 -481
  75. package/test/bizlive.v20190313.test.js +0 -81
  76. package/test/bm.v20180423.test.js +0 -551
  77. package/test/bma.v20210624.test.js +0 -301
  78. package/test/bma.v20221115.test.js +0 -131
  79. package/test/bmeip.v20180625.test.js +0 -221
  80. package/test/bmlb.v20180625.test.js +0 -511
  81. package/test/bmvpc.v20180625.test.js +0 -631
  82. package/test/bpaas.v20181217.test.js +0 -41
  83. package/test/bri.v20190328.test.js +0 -31
  84. package/test/bsca.v20210811.test.js +0 -91
  85. package/test/btoe.v20210303.test.js +0 -141
  86. package/test/btoe.v20210514.test.js +0 -151
  87. package/test/ca.v20230228.test.js +0 -51
  88. package/test/cam.v20190116.test.js +0 -931
  89. package/test/captcha.v20190722.test.js +0 -201
  90. package/test/car.v20220110.test.js +0 -81
  91. package/test/cat.v20180409.test.js +0 -141
  92. package/test/cbs.v20170312.test.js +0 -441
  93. package/test/ccc.v20200210.test.js +0 -661
  94. package/test/cdb.v20170320.test.js +0 -1741
  95. package/test/cdc.v20201214.test.js +0 -231
  96. package/test/cdn.v20180606.test.js +0 -831
  97. package/test/cds.v20180420.test.js +0 -71
  98. package/test/cdwch.v20200915.test.js +0 -301
  99. package/test/cdwdoris.v20211228.test.js +0 -621
  100. package/test/cdwpg.v20201230.test.js +0 -101
  101. package/test/cdz.v20221123.test.js +0 -41
  102. package/test/cfg.v20210820.test.js +0 -191
  103. package/test/cfs.v20190719.test.js +0 -461
  104. package/test/cfw.v20190904.test.js +0 -1161
  105. package/test/chdfs.v20190718.test.js +0 -281
  106. package/test/chdfs.v20201112.test.js +0 -311
  107. package/test/ciam.v20220331.test.js +0 -251
  108. package/test/cii.v20201210.test.js +0 -51
  109. package/test/cii.v20210408.test.js +0 -151
  110. package/test/cim.v20190318.test.js +0 -31
  111. package/test/cis.v20180408.test.js +0 -91
  112. package/test/ckafka.v20190819.test.js +0 -871
  113. package/test/clb.v20180317.test.js +0 -881
  114. package/test/cloudapp.v20220530.test.js +0 -31
  115. package/test/cloudaudit.v20190319.test.js +0 -211
  116. package/test/cloudhsm.v20191112.test.js +0 -161
  117. package/test/cloudstudio.v20230508.test.js +0 -111
  118. package/test/cls.v20201016.test.js +0 -1151
  119. package/test/cme.v20191029.test.js +0 -521
  120. package/test/cmq.v20190304.test.js +0 -41
  121. package/test/cms.v20190321.test.js +0 -81
  122. package/test/config.v20220802.test.js +0 -91
  123. package/test/controlcenter.v20230110.test.js +0 -31
  124. package/test/cpdp.v20190820.test.js +0 -2211
  125. package/test/csip.v20221121.test.js +0 -501
  126. package/test/csxg.v20230303.test.js +0 -71
  127. package/test/cvm.v20170312.test.js +0 -991
  128. package/test/cwp.v20180228.test.js +0 -5191
  129. package/test/cws.v20180312.test.js +0 -211
  130. package/test/cynosdb.v20190107.test.js +0 -1571
  131. package/test/dasb.v20191018.test.js +0 -651
  132. package/test/dataintegration.v20220613.test.js +0 -31
  133. package/test/dayu.v20180709.test.js +0 -1141
  134. package/test/dbbrain.v20191016.test.js +0 -291
  135. package/test/dbbrain.v20210527.test.js +0 -661
  136. package/test/dbdc.v20201029.test.js +0 -81
  137. package/test/dc.v20180410.test.js +0 -241
  138. package/test/dcdb.v20180411.test.js +0 -791
  139. package/test/dlc.v20210125.test.js +0 -1461
  140. package/test/dnspod.v20210323.test.js +0 -861
  141. package/test/domain.v20180808.test.js +0 -571
  142. package/test/drm.v20181115.test.js +0 -131
  143. package/test/ds.v20180523.test.js +0 -141
  144. package/test/dsgc.v20190723.test.js +0 -1501
  145. package/test/dtf.v20200506.test.js +0 -31
  146. package/test/dts.v20180330.test.js +0 -241
  147. package/test/dts.v20211206.test.js +0 -731
  148. package/test/eb.v20210416.test.js +0 -341
  149. package/test/ecc.v20181213.test.js +0 -61
  150. package/test/ecdn.v20191012.test.js +0 -181
  151. package/test/ecm.v20190719.test.js +0 -1411
  152. package/test/eiam.v20210420.test.js +0 -441
  153. package/test/eis.v20200715.test.js +0 -51
  154. package/test/eis.v20210601.test.js +0 -71
  155. package/test/emr.v20190103.test.js +0 -781
  156. package/test/es.v20180416.test.js +0 -631
  157. package/test/ess.v20201111.test.js +0 -981
  158. package/test/essbasic.v20201222.test.js +0 -551
  159. package/test/essbasic.v20210526.test.js +0 -881
  160. package/test/facefusion.v20181201.test.js +0 -51
  161. package/test/facefusion.v20220927.test.js +0 -51
  162. package/test/faceid.v20180301.test.js +0 -391
  163. package/test/fmu.v20191213.test.js +0 -121
  164. package/test/ft.v20200304.test.js +0 -81
  165. package/test/gaap.v20180529.test.js +0 -1071
  166. package/test/gme.v20180711.test.js +0 -301
  167. package/test/goosefs.v20220519.test.js +0 -221
  168. package/test/gpm.v20200820.test.js +0 -201
  169. package/test/gs.v20191118.test.js +0 -111
  170. package/test/gse.v20191112.test.js +0 -761
  171. package/test/gwlb.v20240906.test.js +0 -201
  172. package/test/habo.v20181203.test.js +0 -41
  173. package/test/hai.v20230812.test.js +0 -151
  174. package/test/hasim.v20210716.test.js +0 -241
  175. package/test/hcm.v20181106.test.js +0 -31
  176. package/test/hunyuan.v20230901.test.js +0 -211
  177. package/test/iai.v20180301.test.js +0 -351
  178. package/test/iai.v20200303.test.js +0 -381
  179. package/test/iap.v20240713.test.js +0 -81
  180. package/test/ic.v20190307.test.js +0 -111
  181. package/test/icr.v20211014.test.js +0 -31
  182. package/test/ie.v20200304.test.js +0 -121
  183. package/test/iecp.v20210914.test.js +0 -841
  184. package/test/ig.v20210518.test.js +0 -31
  185. package/test/iir.v20200417.test.js +0 -31
  186. package/test/ims.v20200713.test.js +0 -31
  187. package/test/ims.v20201229.test.js +0 -41
  188. package/test/ioa.v20220601.test.js +0 -71
  189. package/test/iot.v20180123.test.js +0 -471
  190. package/test/iotcloud.v20180614.test.js +0 -711
  191. package/test/iotcloud.v20210408.test.js +0 -751
  192. package/test/iotexplorer.v20190423.test.js +0 -1601
  193. package/test/iottid.v20190411.test.js +0 -111
  194. package/test/iotvideo.v20191126.test.js +0 -701
  195. package/test/iotvideo.v20201215.test.js +0 -811
  196. package/test/iotvideo.v20211125.test.js +0 -1071
  197. package/test/iotvideoindustry.v20201201.test.js +0 -1061
  198. package/test/irp.v20220324.test.js +0 -61
  199. package/test/irp.v20220805.test.js +0 -91
  200. package/test/iss.v20230517.test.js +0 -861
  201. package/test/ivld.v20210903.test.js +0 -301
  202. package/test/keewidb.v20220308.test.js +0 -401
  203. package/test/kms.v20190118.test.js +0 -551
  204. package/test/lcic.v20220817.test.js +0 -691
  205. package/test/lighthouse.v20200324.test.js +0 -1111
  206. package/test/live.v20180801.test.js +0 -1971
  207. package/test/lke.v20231130.test.js +0 -1001
  208. package/test/lkeap.v20240522.test.js +0 -271
  209. package/test/lowcode.v20210108.test.js +0 -31
  210. package/test/lp.v20200224.test.js +0 -31
  211. package/test/mall.v20230518.test.js +0 -31
  212. package/test/mariadb.v20170312.test.js +0 -791
  213. package/test/market.v20191010.test.js +0 -41
  214. package/test/memcached.v20190318.test.js +0 -31
  215. package/test/mgobe.v20190929.test.js +0 -31
  216. package/test/mgobe.v20201014.test.js +0 -91
  217. package/test/mmps.v20200710.test.js +0 -171
  218. package/test/mna.v20210119.test.js +0 -431
  219. package/test/mongodb.v20180408.test.js +0 -151
  220. package/test/mongodb.v20190725.test.js +0 -511
  221. package/test/monitor.v20180724.test.js +0 -1601
  222. package/test/mps.v20190612.test.js +0 -1211
  223. package/test/mqtt.v20240516.test.js +0 -271
  224. package/test/mrs.v20200910.test.js +0 -131
  225. package/test/ms.v20180408.test.js +0 -251
  226. package/test/msp.v20180319.test.js +0 -91
  227. package/test/mvj.v20190926.test.js +0 -31
  228. package/test/nlp.v20190408.test.js +0 -141
  229. package/test/npp.v20190823.test.js +0 -101
  230. package/test/oceanus.v20190422.test.js +0 -411
  231. package/test/ocr.v20181119.test.js +0 -901
  232. package/test/omics.v20221128.test.js +0 -221
  233. package/test/organization.v20181225.test.js +0 -221
  234. package/test/organization.v20210331.test.js +0 -1261
  235. package/test/partners.v20180321.test.js +0 -221
  236. package/test/pds.v20210701.test.js +0 -41
  237. package/test/postgres.v20170312.test.js +0 -1051
  238. package/test/privatedns.v20201028.test.js +0 -261
  239. package/test/pts.v20210728.test.js +0 -501
  240. package/test/rce.v20201103.test.js +0 -131
  241. package/test/redis.v20180412.test.js +0 -1111
  242. package/test/region.v20220627.test.js +0 -51
  243. package/test/rkp.v20191209.test.js +0 -51
  244. package/test/rp.v20200224.test.js +0 -31
  245. package/test/rum.v20210622.test.js +0 -561
  246. package/test/scf.v20180416.test.js +0 -541
  247. package/test/ses.v20201002.test.js +0 -331
  248. package/test/smh.v20210712.test.js +0 -171
  249. package/test/smop.v20201203.test.js +0 -31
  250. package/test/smpn.v20190822.test.js +0 -41
  251. package/test/sms.v20190711.test.js +0 -181
  252. package/test/sms.v20210111.test.js +0 -201
  253. package/test/soe.v20180724.test.js +0 -61
  254. package/test/solar.v20181011.test.js +0 -191
  255. package/test/sqlserver.v20180328.test.js +0 -1501
  256. package/test/ssa.v20180608.test.js +0 -251
  257. package/test/ssl.v20191205.test.js +0 -631
  258. package/test/sslpod.v20190605.test.js +0 -121
  259. package/test/ssm.v20190923.test.js +0 -261
  260. package/test/sts.v20180813.test.js +0 -81
  261. package/test/svp.v20240125.test.js +0 -61
  262. package/test/taf.v20200210.test.js +0 -61
  263. package/test/tag.v20180813.test.js +0 -331
  264. package/test/tan.v20220420.test.js +0 -31
  265. package/test/tat.v20201028.test.js +0 -311
  266. package/test/tav.v20190118.test.js +0 -61
  267. package/test/tbaas.v20180416.test.js +0 -271
  268. package/test/tbm.v20180129.test.js +0 -111
  269. package/test/tbp.v20190311.test.js +0 -61
  270. package/test/tbp.v20190627.test.js +0 -41
  271. package/test/tcaplusdb.v20190823.test.js +0 -551
  272. package/test/tcb.v20180608.test.js +0 -911
  273. package/test/tcbr.v20220217.test.js +0 -121
  274. package/test/tccatalog.v20241024.test.js +0 -61
  275. package/test/tcex.v20200727.test.js +0 -41
  276. package/test/tchd.v20230306.test.js +0 -31
  277. package/test/tci.v20190318.test.js +0 -431
  278. package/test/tcm.v20210413.test.js +0 -141
  279. package/test/tcr.v20190924.test.js +0 -1121
  280. package/test/tcss.v20201101.test.js +0 -3401
  281. package/test/tdcpg.v20211118.test.js +0 -271
  282. package/test/tdid.v20210519.test.js +0 -201
  283. package/test/tdmq.v20200217.test.js +0 -1521
  284. package/test/tds.v20220801.test.js +0 -61
  285. package/test/tem.v20201221.test.js +0 -191
  286. package/test/tem.v20210701.test.js +0 -521
  287. package/test/teo.v20220106.test.js +0 -71
  288. package/test/teo.v20220901.test.js +0 -1421
  289. package/test/thpc.v20211109.test.js +0 -61
  290. package/test/thpc.v20220401.test.js +0 -181
  291. package/test/thpc.v20230321.test.js +0 -251
  292. package/test/tia.v20180226.test.js +0 -121
  293. package/test/tic.v20201117.test.js +0 -151
  294. package/test/ticm.v20181127.test.js +0 -51
  295. package/test/tics.v20181115.test.js +0 -61
  296. package/test/tiems.v20190416.test.js +0 -271
  297. package/test/tiia.v20190529.test.js +0 -241
  298. package/test/tione.v20191022.test.js +0 -241
  299. package/test/tione.v20211111.test.js +0 -411
  300. package/test/tiw.v20190919.test.js +0 -621
  301. package/test/tke.v20180525.test.js +0 -2301
  302. package/test/tke.v20220501.test.js +0 -161
  303. package/test/tkgdq.v20190411.test.js +0 -51
  304. package/test/tms.v20200713.test.js +0 -61
  305. package/test/tms.v20201229.test.js +0 -31
  306. package/test/tmt.v20180321.test.js +0 -91
  307. package/test/tourism.v20230215.test.js +0 -31
  308. package/test/trdp.v20220726.test.js +0 -31
  309. package/test/trocket.v20230308.test.js +0 -571
  310. package/test/trp.v20210515.test.js +0 -561
  311. package/test/trro.v20220325.test.js +0 -251
  312. package/test/trtc.v20190722.test.js +0 -591
  313. package/test/tse.v20201207.test.js +0 -1211
  314. package/test/tsf.v20180326.test.js +0 -2241
  315. package/test/tsi.v20210325.test.js +0 -51
  316. package/test/tsw.v20200924.test.js +0 -31
  317. package/test/tsw.v20210412.test.js +0 -51
  318. package/test/tts.v20190823.test.js +0 -51
  319. package/test/ump.v20200918.test.js +0 -191
  320. package/test/vcg.v20240404.test.js +0 -41
  321. package/test/vclm.v20240523.test.js +0 -121
  322. package/test/vcube.v20220410.test.js +0 -361
  323. package/test/vdb.v20230616.test.js +0 -81
  324. package/test/vm.v20200709.test.js +0 -71
  325. package/test/vm.v20201229.test.js +0 -61
  326. package/test/vm.v20210922.test.js +0 -61
  327. package/test/vms.v20200902.test.js +0 -41
  328. package/test/vod.v20180717.test.js +0 -1831
  329. package/test/vod.v20240718.test.js +0 -31
  330. package/test/vpc.v20170312.test.js +0 -3901
  331. package/test/vrs.v20200824.test.js +0 -101
  332. package/test/vtc.v20240223.test.js +0 -51
  333. package/test/waf.v20180125.test.js +0 -1511
  334. package/test/wav.v20210129.test.js +0 -281
  335. package/test/wedata.v20210820.test.js +0 -2421
  336. package/test/weilingwith.v20230427.test.js +0 -661
  337. package/test/wss.v20180426.test.js +0 -51
  338. package/test/yinsuda.v20220527.test.js +0 -221
  339. package/test/youmall.v20180228.test.js +0 -331
  340. package/test/yunjing.v20180228.test.js +0 -1021
  341. package/test/yunsou.v20180504.test.js +0 -41
  342. package/test/yunsou.v20191115.test.js +0 -41
@@ -1,32 +0,0 @@
1
- const tencentcloud = require("../../../../tencentcloud-sdk-nodejs")
2
-
3
- // 导入对应产品模块的client models
4
- const CbsClient = tencentcloud.cbs.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CbsClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
-
24
- client.DescribeDisks({}, function (err, response) {
25
- // 请求异常返回,打印异常信息
26
- if (err) {
27
- console.log(err)
28
- return
29
- }
30
- // 请求正常返回,打印response对象
31
- console.log(response)
32
- })
@@ -1,32 +0,0 @@
1
- import * as tencentcloud from "../../../../tencentcloud-sdk-nodejs"
2
-
3
- // 导入对应产品模块的client models
4
- const CbsClient = tencentcloud.cbs.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CbsClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
-
24
- client.DescribeDisks({}, function (err, response) {
25
- // 请求异常返回,打印异常信息
26
- if (err) {
27
- console.log(err)
28
- return
29
- }
30
- // 请求正常返回,打印response对象
31
- console.log(response)
32
- })
@@ -1,34 +0,0 @@
1
- syntax = "proto2";
2
-
3
- package cls;
4
-
5
- message Log
6
- {
7
- message Content
8
- {
9
- required string key = 1; // 每组字段的 key
10
- required string value = 2; // 每组字段的 value
11
- }
12
- required int64 time = 1; // 时间戳,UNIX时间格式
13
- repeated Content contents = 2; // 一条日志里的多个kv组合
14
- }
15
-
16
- message LogTag
17
- {
18
- required string key = 1;
19
- required string value = 2;
20
- }
21
-
22
- message LogGroup
23
- {
24
- repeated Log logs = 1; // 多条日志合成的日志数组
25
- optional string contextFlow = 2; // 目前暂无效用
26
- optional string filename = 3; // 日志文件名
27
- optional string source = 4; // 日志来源,一般使用机器IP
28
- repeated LogTag logTags = 5;
29
- }
30
-
31
- message LogGroupList
32
- {
33
- repeated LogGroup logGroupList = 1; // 日志组列表
34
- }
@@ -1,69 +0,0 @@
1
- const { CommonClient } = require("../../../tencentcloud/common/common_client")
2
- const protobuf = require("protobufjs")
3
- const lz4 = require("lz4")
4
- const path = require("path")
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const clientConfig = {
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-guangzhou",
13
- profile: {
14
- httpProfile: {
15
- endpoint: "cls.tencentcloudapi.com",
16
- headers: {
17
- "X-CLS-TopicId": "", // 替换为自己业务的 topic
18
- "X-CLS-HashKey": "", // 可选参数,具体参考官方文档:https://cloud.tencent.com/document/product/614/59470
19
- "X-CLS-CompressType": "lz4", // lz4压缩方式, 空字符串意味不压缩
20
- },
21
- },
22
- },
23
- }
24
-
25
- // 实例化要请求产品的client对象,clientProfile是可选的
26
- const client = new CommonClient("cls.tencentcloudapi.com", "2020-10-16", clientConfig)
27
- // lz4 压缩数据
28
- const params = compress(getBodyInfo())
29
- client.requestOctetStream("UploadLog", params).then(
30
- (data) => {
31
- console.log(data)
32
- },
33
- (err) => {
34
- console.error("error", err)
35
- }
36
- )
37
-
38
- function compress(input) {
39
- const output = Buffer.alloc(lz4.encodeBound(input.length))
40
- const compressedBlockSize = lz4.encodeBlock(input, output)
41
- return output.slice(0, compressedBlockSize)
42
- }
43
-
44
- function getBodyInfo() {
45
- const root = protobuf.loadSync(path.join(__dirname, "cls.proto"))
46
- const LogGroupList = root.lookupType("cls.LogGroupList")
47
- const payload = {
48
- logGroupList: [
49
- {
50
- logs: [
51
- {
52
- time: Date.now(),
53
- contents: [
54
- {
55
- key: "name",
56
- value: "张三",
57
- },
58
- {
59
- key: "age",
60
- value: "18",
61
- },
62
- ],
63
- },
64
- ],
65
- },
66
- ],
67
- }
68
- return LogGroupList.encode(payload).finish()
69
- }
@@ -1,47 +0,0 @@
1
- const tencentcloud = require("../../../tencentcloud-sdk-nodejs")
2
- const TencentCloudCommon = tencentcloud.common;
3
- const CommonClient = TencentCloudCommon.CommonClient;
4
-
5
- // 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
6
- // 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
7
- // 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
8
- const clientConfig = {
9
- credential: {
10
- secretId: "$secretId",
11
- secretKey: "$secretKey",
12
- },
13
- region: "ap-shanghai",
14
- profile: {
15
- httpProfile: {
16
- endpoint: "cvm.tencentcloudapi.com",
17
- },
18
- },
19
- };
20
-
21
- // 实例化要请求产品的 CommonClient 对象,依次传入产品调用地址(产品名.tencentcloudapi.com)、产品版本、ClientConfig
22
- const client = new CommonClient(
23
- "cvm.tencentcloudapi.com",
24
- "2017-03-12",
25
- clientConfig
26
- );
27
- const params = {
28
- Filters: [
29
- {
30
- Name: "zone",
31
- Values: ["ap-shanghai-1", "ap-shanghai-2"],
32
- },
33
- {
34
- Name: "instance-charge-type",
35
- Values: ["POSTPAID_BY_HOUR"],
36
- },
37
- ]
38
- };
39
- // 传入要调用的接口名,和接口对应的参数
40
- client.request("DescribeInstances", params).then(
41
- (data) => {
42
- console.log(data);
43
- },
44
- (err) => {
45
- console.error("error", err);
46
- }
47
- );
@@ -1,47 +0,0 @@
1
- import * as tencentcloud from "../../../tencentcloud-sdk-nodejs"
2
- const TencentCloudCommon = tencentcloud.common;
3
- const CommonClient = TencentCloudCommon.CommonClient;
4
-
5
- // 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
6
- // 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
7
- // 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
8
- const clientConfig = {
9
- credential: {
10
- secretId: "$secretId",
11
- secretKey: "$secretKey",
12
- },
13
- region: "ap-shanghai",
14
- profile: {
15
- httpProfile: {
16
- endpoint: "cvm.tencentcloudapi.com",
17
- },
18
- },
19
- };
20
-
21
- // 实例化要请求产品的 CommonClient 对象,依次传入产品调用地址(产品名.tencentcloudapi.com)、产品版本、ClientConfig
22
- const client = new CommonClient(
23
- "cvm.tencentcloudapi.com",
24
- "2017-03-12",
25
- clientConfig
26
- );
27
- const params = {
28
- Filters: [
29
- {
30
- Name: "zone",
31
- Values: ["ap-shanghai-1", "ap-shanghai-2"],
32
- },
33
- {
34
- Name: "instance-charge-type",
35
- Values: ["POSTPAID_BY_HOUR"],
36
- },
37
- ]
38
- };
39
- // 传入要调用的接口名,和接口对应的参数
40
- client.request("DescribeInstances", params).then(
41
- (data) => {
42
- console.log(data);
43
- },
44
- (err) => {
45
- console.error("error", err);
46
- }
47
- );
@@ -1,44 +0,0 @@
1
- const tencentcloud = require("../../../../tencentcloud-sdk-nodejs")
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CvmClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- client.DescribeInstances(
23
- {
24
- Filters: [
25
- {
26
- Name: "zone",
27
- Values: ["ap-shanghai-1", "ap-shanghai-2"],
28
- },
29
- {
30
- Name: "instance-charge-type",
31
- Values: ["POSTPAID_BY_HOUR"],
32
- },
33
- ],
34
- },
35
- function (err, response) {
36
- // 请求异常返回,打印异常信息
37
- if (err) {
38
- console.log(err)
39
- return
40
- }
41
- // 请求正常返回,打印response对象
42
- console.log(response)
43
- }
44
- )
@@ -1,43 +0,0 @@
1
- import * as tencentcloud from "../../../../tencentcloud-sdk-nodejs"
2
-
3
- // 导入对应产品模块的client models
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CvmClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
- client
24
- .DescribeInstances({
25
- Filters: [
26
- {
27
- Name: "zone",
28
- Values: ["ap-shanghai-1", "ap-shanghai-2"],
29
- },
30
- {
31
- Name: "instance-charge-type",
32
- Values: ["POSTPAID_BY_HOUR"],
33
- },
34
- ],
35
- })
36
- .then(
37
- (data) => {
38
- console.log(data)
39
- },
40
- (err) => {
41
- console.error("error", err)
42
- }
43
- )
@@ -1,22 +0,0 @@
1
- const tencentcloud = require("../../../../tencentcloud-sdk-nodejs")
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
- // 实例化要请求产品的client对象
6
- const client = new CvmClient({
7
- credential: {
8
- secretId: process.env.secretId,
9
- secretKey: process.env.secretKey,
10
- },
11
- region: "ap-shanghai",
12
- })
13
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
14
- client.DescribeZones(null, function (err, response) {
15
- // 请求异常返回,打印异常信息
16
- if (err) {
17
- console.log(err)
18
- return
19
- }
20
- // 请求正常返回,打印response对象
21
- console.log(response)
22
- })
@@ -1,33 +0,0 @@
1
- import * as tencentcloud from "../../../../tencentcloud-sdk-nodejs"
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象
7
- const client = new CvmClient({
8
- // 腾讯云认证信息
9
- credential: {
10
- secretId: process.env.secretId,
11
- secretKey: process.env.secretKey,
12
- },
13
- // 产品地域
14
- region: "ap-shanghai",
15
- // 可选配置实例
16
- profile: {
17
- signMethod: "HmacSHA256", // 签名方法
18
- httpProfile: {
19
- reqMethod: "POST", // 请求方法
20
- reqTimeout: 30, // 请求超时时间,默认60s
21
- },
22
- },
23
- })
24
-
25
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
26
- client.DescribeZones().then(
27
- (data) => {
28
- console.log(data)
29
- },
30
- (err) => {
31
- console.error("error", err)
32
- }
33
- )
@@ -1,73 +0,0 @@
1
- import * as tencentcloud from "../../../tencentcloud"
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CvmClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
- client
24
- .InquiryPriceRunInstances({
25
- InternetAccessible: {
26
- InternetMaxBandwidthOut: 1,
27
- InternetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
28
- PublicIpAssigned: true,
29
- },
30
- InstanceCount: 1,
31
- Placement: {
32
- Zone: "ap-shanghai-2",
33
- // ProjectId: "1138633" as any,
34
- },
35
- SystemDisk: {
36
- DiskType: "CLOUD_PREMIUM",
37
- DiskSize: 50,
38
- },
39
- LoginSettings: {
40
- Password: "isd@cloud",
41
- },
42
- ImageId: "img-25szkc8t",
43
- InstanceChargeType: "POSTPAID_BY_HOUR",
44
- EnhancedService: {
45
- MonitorService: {
46
- Enabled: true,
47
- },
48
- SecurityService: {
49
- Enabled: true,
50
- },
51
- },
52
- InstanceChargePrepaid: {
53
- Period: 1,
54
- RenewFlag: "NOTIFY_AND_MANUAL_RENEW",
55
- },
56
- InstanceName: "API-SDK-NODEJS",
57
- InstanceType: "S2.SMALL1",
58
- // VirtualPrivateCloud: {
59
- // AsVpcGateway: true,
60
- // Ipv6AddressCount: 0,
61
- // SubnetId: "subnet-mom67r5j",
62
- // VpcId: "vpc-pz4uwz7s",
63
- // },
64
- })
65
- .then(
66
- (response) => {
67
- // 请求正常返回,打印response对象
68
- console.log(response)
69
- },
70
- (err) => {
71
- console.log(err)
72
- }
73
- )
@@ -1,73 +0,0 @@
1
- const tencentcloud = require("../../../../tencentcloud-sdk-nodejs")
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CvmClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
- client
24
- .RunInstances({
25
- InternetAccessible: {
26
- InternetMaxBandwidthOut: 1,
27
- InternetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
28
- PublicIpAssigned: true,
29
- },
30
- InstanceCount: 1,
31
- Placement: {
32
- Zone: "ap-shanghai-2",
33
- // ProjectId: "1138633" as any,
34
- },
35
- SystemDisk: {
36
- DiskType: "CLOUD_PREMIUM",
37
- DiskSize: 50,
38
- },
39
- LoginSettings: {
40
- Password: "isd@cloud",
41
- },
42
- ImageId: "img-25szkc8t",
43
- InstanceChargeType: "POSTPAID_BY_HOUR",
44
- EnhancedService: {
45
- MonitorService: {
46
- Enabled: true,
47
- },
48
- SecurityService: {
49
- Enabled: true,
50
- },
51
- },
52
- InstanceChargePrepaid: {
53
- Period: 1,
54
- RenewFlag: "NOTIFY_AND_MANUAL_RENEW",
55
- },
56
- InstanceName: "API-SDK-NODEJS",
57
- InstanceType: "S2.SMALL1",
58
- // VirtualPrivateCloud: {
59
- // AsVpcGateway: true,
60
- // Ipv6AddressCount: 0,
61
- // SubnetId: "subnet-mom67r5j",
62
- // VpcId: "vpc-pz4uwz7s",
63
- // },
64
- })
65
- .then(
66
- (response) => {
67
- // 请求正常返回,打印response对象
68
- console.log(response)
69
- },
70
- (err) => {
71
- console.log(err)
72
- }
73
- )
@@ -1,73 +0,0 @@
1
- import * as tencentcloud from "../../../tencentcloud"
2
-
3
- // 导入对应产品模块的client models。
4
- const CvmClient = tencentcloud.cvm.v20170312.Client
5
-
6
- // 实例化要请求产品的client对象。profile可选。
7
- const client = new CvmClient({
8
- credential: {
9
- secretId: process.env.secretId,
10
- secretKey: process.env.secretKey,
11
- },
12
- region: "ap-shanghai",
13
- profile: {
14
- signMethod: "TC3-HMAC-SHA256",
15
- httpProfile: {
16
- reqMethod: "POST",
17
- reqTimeout: 30,
18
- },
19
- },
20
- })
21
-
22
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
23
- client
24
- .RunInstances({
25
- InternetAccessible: {
26
- InternetMaxBandwidthOut: 1,
27
- InternetChargeType: "TRAFFIC_POSTPAID_BY_HOUR",
28
- PublicIpAssigned: true,
29
- },
30
- InstanceCount: 1,
31
- Placement: {
32
- Zone: "ap-shanghai-2",
33
- // ProjectId: "1138633" as any,
34
- },
35
- SystemDisk: {
36
- DiskType: "CLOUD_PREMIUM",
37
- DiskSize: 50,
38
- },
39
- LoginSettings: {
40
- Password: "isd@cloud",
41
- },
42
- ImageId: "img-25szkc8t",
43
- InstanceChargeType: "POSTPAID_BY_HOUR",
44
- EnhancedService: {
45
- MonitorService: {
46
- Enabled: true,
47
- },
48
- SecurityService: {
49
- Enabled: true,
50
- },
51
- },
52
- InstanceChargePrepaid: {
53
- Period: 1,
54
- RenewFlag: "NOTIFY_AND_MANUAL_RENEW",
55
- },
56
- InstanceName: "API-SDK-NODEJS",
57
- InstanceType: "S2.SMALL1",
58
- // VirtualPrivateCloud: {
59
- // AsVpcGateway: true,
60
- // Ipv6AddressCount: 0,
61
- // SubnetId: "subnet-mom67r5j",
62
- // VpcId: "vpc-pz4uwz7s",
63
- // },
64
- })
65
- .then(
66
- (response) => {
67
- // 请求正常返回,打印response对象
68
- console.log(response)
69
- },
70
- (err) => {
71
- console.log(err)
72
- }
73
- )
@@ -1,27 +0,0 @@
1
- const tencentcloud = require("../../tencentcloud-sdk-nodejs")
2
- // const tencentcloud = require("tencentcloud-sdk-nodejs")
3
- const CvmRoleCredential = require("../../tencentcloud-sdk-nodejs/tencentcloud/common/cvm_role_credential").default
4
- // const CvmRoleCredential = require("tencentcloud-sdk-nodejs/tencentcloud/common/cvm_role_credential").default
5
-
6
- async function main() {
7
- // 导入对应产品模块的client models。
8
- const CvmClient = tencentcloud.cvm.v20170312.Client
9
- // 实例化要请求产品的client对象
10
- const client = new CvmClient({
11
- credential: new CvmRoleCredential(),
12
- region: "ap-shanghai",
13
- })
14
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
15
- client.DescribeZones(null, function (err, response) {
16
- // 请求异常返回,打印异常信息
17
- if (err) {
18
- console.log(err)
19
- return
20
- }
21
- // 请求正常返回,打印response对象
22
- console.log(response)
23
- })
24
-
25
- }
26
-
27
- main().catch(console.error)
@@ -1,28 +0,0 @@
1
- import * as tencentcloud from "../../tencentcloud-sdk-nodejs"
2
- // import * as tencentcloud from "tencentcloud-sdk-nodejs"
3
- import CvmRoleCredential from "../../tencentcloud-sdk-nodejs/tencentcloud/common/cvm_role_credential"
4
- // import CvmRoleCredential from "tencentcloud-sdk-nodejs/tencentcloud/common/cvm_role_credential"
5
-
6
-
7
- async function main() {
8
- // 导入对应产品模块的client models。
9
- const CvmClient = tencentcloud.cvm.v20170312.Client
10
- // 实例化要请求产品的client对象
11
- const client = new CvmClient({
12
- credential: new CvmRoleCredential(),
13
- region: "ap-shanghai",
14
- })
15
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
16
- client.DescribeZones(null, function (err, response) {
17
- // 请求异常返回,打印异常信息
18
- if (err) {
19
- console.log(err)
20
- return
21
- }
22
- // 请求正常返回,打印response对象
23
- console.log(response)
24
- })
25
-
26
- }
27
-
28
- main().catch(console.error)