tencentcloud-sdk-nodejs 4.0.1021 → 4.0.1023

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 (335) hide show
  1. package/README.md +37 -8
  2. package/package.json +1 -1
  3. package/src/common/sdk_version.ts +1 -1
  4. package/src/services/lkeap/v20240522/lkeap_client.ts +14 -2
  5. package/src/services/lkeap/v20240522/lkeap_models.ts +49 -21
  6. package/tencentcloud/common/sdk_version.d.ts +1 -1
  7. package/tencentcloud/common/sdk_version.js +1 -1
  8. package/tencentcloud/services/lkeap/v20240522/lkeap_client.d.ts +5 -1
  9. package/tencentcloud/services/lkeap/v20240522/lkeap_client.js +6 -0
  10. package/tencentcloud/services/lkeap/v20240522/lkeap_models.d.ts +46 -20
  11. package/CHANGELOG.md +0 -209461
  12. package/SERVICE_CHANGELOG.md +0 -187648
  13. package/examples/cbs/v20170312/describe_disks.js +0 -32
  14. package/examples/cbs/v20170312/describe_disks.ts +0 -32
  15. package/examples/cls/v20201016/cls.proto +0 -34
  16. package/examples/cls/v20201016/upload_log.js +0 -69
  17. package/examples/common/common_client.js +0 -47
  18. package/examples/common/common_client.ts +0 -47
  19. package/examples/cvm/v20170312/describe_instances.js +0 -44
  20. package/examples/cvm/v20170312/describe_instances.ts +0 -43
  21. package/examples/cvm/v20170312/describe_zones.js +0 -22
  22. package/examples/cvm/v20170312/describe_zones.ts +0 -33
  23. package/examples/cvm/v20170312/inquiry_price_run_instances.ts +0 -73
  24. package/examples/cvm/v20170312/run_instances.js +0 -73
  25. package/examples/cvm/v20170312/run_instances.ts +0 -73
  26. package/examples/cvm_role.js +0 -27
  27. package/examples/cvm_role.ts +0 -28
  28. package/examples/ecc/v20181213/ecc_correct.js +0 -37
  29. package/examples/ecc/v20181213/ecc_correct.ts +0 -37
  30. package/examples/ecc/v20181213/ecc_ocr.js +0 -39
  31. package/examples/ecc/v20181213/ecc_ocr.ts +0 -39
  32. package/examples/hcm/v20181106/hcm_ocr.js +0 -42
  33. package/examples/hcm/v20181106/hcm_ocr.ts +0 -39
  34. package/examples/hunyuan/v20230901/chat_completions.js +0 -59
  35. package/examples/hunyuan/v20230901/chat_completions.ts +0 -61
  36. package/examples/soe/v20180903/init_oral_process.js +0 -41
  37. package/examples/soe/v20180903/init_oral_process.ts +0 -41
  38. package/examples/soe/v20180903/transmit_oral_process.js +0 -43
  39. package/examples/soe/v20180903/transmit_oral_process.ts +0 -43
  40. package/products.md +0 -264
  41. package/test/aa.v20200224.test.js +0 -31
  42. package/test/aai.v20180522.test.js +0 -61
  43. package/test/aca.v20210323.test.js +0 -101
  44. package/test/acp.v20220105.test.js +0 -101
  45. package/test/advisor.v20200721.test.js +0 -41
  46. package/test/af.v20200226.test.js +0 -51
  47. package/test/afc.v20200226.test.js +0 -51
  48. package/test/aiart.v20221229.test.js +0 -191
  49. package/test/ame.v20190916.test.js +0 -331
  50. package/test/ams.v20200608.test.js +0 -91
  51. package/test/ams.v20201229.test.js +0 -71
  52. package/test/anicloud.v20220923.test.js +0 -51
  53. package/test/antiddos.v20200309.test.js +0 -981
  54. package/test/apcas.v20201127.test.js +0 -91
  55. package/test/ape.v20200513.test.js +0 -101
  56. package/test/api.v20201106.test.js +0 -51
  57. package/test/apigateway.v20180808.test.js +0 -1011
  58. package/test/apm.v20210622.test.js +0 -141
  59. package/test/as.v20180419.test.js +0 -591
  60. package/test/asr.v20190614.test.js +0 -341
  61. package/test/asw.v20200722.test.js +0 -111
  62. package/test/ba.v20200720.test.js +0 -51
  63. package/test/batch.v20170312.test.js +0 -331
  64. package/test/bda.v20200324.test.js +0 -201
  65. package/test/bh.v20230418.test.js +0 -641
  66. package/test/bi.v20220105.test.js +0 -261
  67. package/test/billing.v20180709.test.js +0 -481
  68. package/test/bizlive.v20190313.test.js +0 -81
  69. package/test/bm.v20180423.test.js +0 -551
  70. package/test/bma.v20210624.test.js +0 -301
  71. package/test/bma.v20221115.test.js +0 -131
  72. package/test/bmeip.v20180625.test.js +0 -221
  73. package/test/bmlb.v20180625.test.js +0 -511
  74. package/test/bmvpc.v20180625.test.js +0 -631
  75. package/test/bpaas.v20181217.test.js +0 -41
  76. package/test/bri.v20190328.test.js +0 -31
  77. package/test/bsca.v20210811.test.js +0 -91
  78. package/test/btoe.v20210303.test.js +0 -141
  79. package/test/btoe.v20210514.test.js +0 -151
  80. package/test/ca.v20230228.test.js +0 -51
  81. package/test/cam.v20190116.test.js +0 -931
  82. package/test/captcha.v20190722.test.js +0 -201
  83. package/test/car.v20220110.test.js +0 -81
  84. package/test/cat.v20180409.test.js +0 -141
  85. package/test/cbs.v20170312.test.js +0 -441
  86. package/test/ccc.v20200210.test.js +0 -661
  87. package/test/cdb.v20170320.test.js +0 -1741
  88. package/test/cdc.v20201214.test.js +0 -231
  89. package/test/cdn.v20180606.test.js +0 -831
  90. package/test/cds.v20180420.test.js +0 -71
  91. package/test/cdwch.v20200915.test.js +0 -301
  92. package/test/cdwdoris.v20211228.test.js +0 -621
  93. package/test/cdwpg.v20201230.test.js +0 -101
  94. package/test/cdz.v20221123.test.js +0 -41
  95. package/test/cfg.v20210820.test.js +0 -191
  96. package/test/cfs.v20190719.test.js +0 -461
  97. package/test/cfw.v20190904.test.js +0 -1151
  98. package/test/chdfs.v20190718.test.js +0 -281
  99. package/test/chdfs.v20201112.test.js +0 -311
  100. package/test/ciam.v20220331.test.js +0 -251
  101. package/test/cii.v20201210.test.js +0 -51
  102. package/test/cii.v20210408.test.js +0 -151
  103. package/test/cim.v20190318.test.js +0 -31
  104. package/test/cis.v20180408.test.js +0 -91
  105. package/test/ckafka.v20190819.test.js +0 -871
  106. package/test/clb.v20180317.test.js +0 -881
  107. package/test/cloudapp.v20220530.test.js +0 -31
  108. package/test/cloudaudit.v20190319.test.js +0 -211
  109. package/test/cloudhsm.v20191112.test.js +0 -161
  110. package/test/cloudstudio.v20230508.test.js +0 -111
  111. package/test/cls.v20201016.test.js +0 -1151
  112. package/test/cme.v20191029.test.js +0 -521
  113. package/test/cmq.v20190304.test.js +0 -41
  114. package/test/cms.v20190321.test.js +0 -81
  115. package/test/config.v20220802.test.js +0 -91
  116. package/test/controlcenter.v20230110.test.js +0 -31
  117. package/test/cpdp.v20190820.test.js +0 -2211
  118. package/test/csip.v20221121.test.js +0 -501
  119. package/test/csxg.v20230303.test.js +0 -71
  120. package/test/cvm.v20170312.test.js +0 -991
  121. package/test/cwp.v20180228.test.js +0 -5191
  122. package/test/cws.v20180312.test.js +0 -211
  123. package/test/cynosdb.v20190107.test.js +0 -1571
  124. package/test/dasb.v20191018.test.js +0 -651
  125. package/test/dataintegration.v20220613.test.js +0 -31
  126. package/test/dayu.v20180709.test.js +0 -1141
  127. package/test/dbbrain.v20191016.test.js +0 -291
  128. package/test/dbbrain.v20210527.test.js +0 -661
  129. package/test/dbdc.v20201029.test.js +0 -81
  130. package/test/dc.v20180410.test.js +0 -241
  131. package/test/dcdb.v20180411.test.js +0 -791
  132. package/test/dlc.v20210125.test.js +0 -1461
  133. package/test/dnspod.v20210323.test.js +0 -861
  134. package/test/domain.v20180808.test.js +0 -571
  135. package/test/drm.v20181115.test.js +0 -131
  136. package/test/ds.v20180523.test.js +0 -141
  137. package/test/dsgc.v20190723.test.js +0 -1501
  138. package/test/dtf.v20200506.test.js +0 -31
  139. package/test/dts.v20180330.test.js +0 -241
  140. package/test/dts.v20211206.test.js +0 -731
  141. package/test/eb.v20210416.test.js +0 -341
  142. package/test/ecc.v20181213.test.js +0 -61
  143. package/test/ecdn.v20191012.test.js +0 -181
  144. package/test/ecm.v20190719.test.js +0 -1411
  145. package/test/eiam.v20210420.test.js +0 -441
  146. package/test/eis.v20200715.test.js +0 -51
  147. package/test/eis.v20210601.test.js +0 -71
  148. package/test/emr.v20190103.test.js +0 -781
  149. package/test/es.v20180416.test.js +0 -631
  150. package/test/ess.v20201111.test.js +0 -981
  151. package/test/essbasic.v20201222.test.js +0 -551
  152. package/test/essbasic.v20210526.test.js +0 -881
  153. package/test/facefusion.v20181201.test.js +0 -51
  154. package/test/facefusion.v20220927.test.js +0 -51
  155. package/test/faceid.v20180301.test.js +0 -391
  156. package/test/fmu.v20191213.test.js +0 -121
  157. package/test/ft.v20200304.test.js +0 -81
  158. package/test/gaap.v20180529.test.js +0 -1071
  159. package/test/gme.v20180711.test.js +0 -301
  160. package/test/goosefs.v20220519.test.js +0 -221
  161. package/test/gpm.v20200820.test.js +0 -201
  162. package/test/gs.v20191118.test.js +0 -111
  163. package/test/gse.v20191112.test.js +0 -761
  164. package/test/gwlb.v20240906.test.js +0 -201
  165. package/test/habo.v20181203.test.js +0 -41
  166. package/test/hai.v20230812.test.js +0 -151
  167. package/test/hasim.v20210716.test.js +0 -241
  168. package/test/hcm.v20181106.test.js +0 -31
  169. package/test/hunyuan.v20230901.test.js +0 -211
  170. package/test/iai.v20180301.test.js +0 -351
  171. package/test/iai.v20200303.test.js +0 -381
  172. package/test/iap.v20240713.test.js +0 -81
  173. package/test/ic.v20190307.test.js +0 -111
  174. package/test/icr.v20211014.test.js +0 -31
  175. package/test/ie.v20200304.test.js +0 -121
  176. package/test/iecp.v20210914.test.js +0 -841
  177. package/test/ig.v20210518.test.js +0 -31
  178. package/test/iir.v20200417.test.js +0 -31
  179. package/test/ims.v20200713.test.js +0 -31
  180. package/test/ims.v20201229.test.js +0 -41
  181. package/test/ioa.v20220601.test.js +0 -71
  182. package/test/iot.v20180123.test.js +0 -471
  183. package/test/iotcloud.v20180614.test.js +0 -711
  184. package/test/iotcloud.v20210408.test.js +0 -751
  185. package/test/iotexplorer.v20190423.test.js +0 -1601
  186. package/test/iottid.v20190411.test.js +0 -111
  187. package/test/iotvideo.v20191126.test.js +0 -701
  188. package/test/iotvideo.v20201215.test.js +0 -811
  189. package/test/iotvideo.v20211125.test.js +0 -1071
  190. package/test/iotvideoindustry.v20201201.test.js +0 -1061
  191. package/test/irp.v20220324.test.js +0 -61
  192. package/test/irp.v20220805.test.js +0 -91
  193. package/test/iss.v20230517.test.js +0 -861
  194. package/test/ivld.v20210903.test.js +0 -301
  195. package/test/keewidb.v20220308.test.js +0 -401
  196. package/test/kms.v20190118.test.js +0 -551
  197. package/test/lcic.v20220817.test.js +0 -691
  198. package/test/lighthouse.v20200324.test.js +0 -1111
  199. package/test/live.v20180801.test.js +0 -1971
  200. package/test/lke.v20231130.test.js +0 -1001
  201. package/test/lkeap.v20240522.test.js +0 -271
  202. package/test/lowcode.v20210108.test.js +0 -31
  203. package/test/lp.v20200224.test.js +0 -31
  204. package/test/mall.v20230518.test.js +0 -31
  205. package/test/mariadb.v20170312.test.js +0 -791
  206. package/test/market.v20191010.test.js +0 -41
  207. package/test/memcached.v20190318.test.js +0 -31
  208. package/test/mgobe.v20190929.test.js +0 -31
  209. package/test/mgobe.v20201014.test.js +0 -91
  210. package/test/mmps.v20200710.test.js +0 -171
  211. package/test/mna.v20210119.test.js +0 -431
  212. package/test/mongodb.v20180408.test.js +0 -151
  213. package/test/mongodb.v20190725.test.js +0 -511
  214. package/test/monitor.v20180724.test.js +0 -1601
  215. package/test/mps.v20190612.test.js +0 -1211
  216. package/test/mqtt.v20240516.test.js +0 -271
  217. package/test/mrs.v20200910.test.js +0 -131
  218. package/test/ms.v20180408.test.js +0 -251
  219. package/test/msp.v20180319.test.js +0 -91
  220. package/test/mvj.v20190926.test.js +0 -31
  221. package/test/nlp.v20190408.test.js +0 -141
  222. package/test/npp.v20190823.test.js +0 -101
  223. package/test/oceanus.v20190422.test.js +0 -411
  224. package/test/ocr.v20181119.test.js +0 -901
  225. package/test/omics.v20221128.test.js +0 -221
  226. package/test/organization.v20181225.test.js +0 -221
  227. package/test/organization.v20210331.test.js +0 -1261
  228. package/test/partners.v20180321.test.js +0 -221
  229. package/test/pds.v20210701.test.js +0 -41
  230. package/test/postgres.v20170312.test.js +0 -1051
  231. package/test/privatedns.v20201028.test.js +0 -261
  232. package/test/pts.v20210728.test.js +0 -501
  233. package/test/rce.v20201103.test.js +0 -131
  234. package/test/redis.v20180412.test.js +0 -1111
  235. package/test/region.v20220627.test.js +0 -51
  236. package/test/rkp.v20191209.test.js +0 -51
  237. package/test/rp.v20200224.test.js +0 -31
  238. package/test/rum.v20210622.test.js +0 -561
  239. package/test/scf.v20180416.test.js +0 -541
  240. package/test/ses.v20201002.test.js +0 -331
  241. package/test/smh.v20210712.test.js +0 -171
  242. package/test/smop.v20201203.test.js +0 -31
  243. package/test/smpn.v20190822.test.js +0 -41
  244. package/test/sms.v20190711.test.js +0 -181
  245. package/test/sms.v20210111.test.js +0 -201
  246. package/test/soe.v20180724.test.js +0 -61
  247. package/test/solar.v20181011.test.js +0 -191
  248. package/test/sqlserver.v20180328.test.js +0 -1501
  249. package/test/ssa.v20180608.test.js +0 -251
  250. package/test/ssl.v20191205.test.js +0 -631
  251. package/test/sslpod.v20190605.test.js +0 -121
  252. package/test/ssm.v20190923.test.js +0 -261
  253. package/test/sts.v20180813.test.js +0 -81
  254. package/test/svp.v20240125.test.js +0 -61
  255. package/test/taf.v20200210.test.js +0 -61
  256. package/test/tag.v20180813.test.js +0 -331
  257. package/test/tan.v20220420.test.js +0 -31
  258. package/test/tat.v20201028.test.js +0 -311
  259. package/test/tav.v20190118.test.js +0 -61
  260. package/test/tbaas.v20180416.test.js +0 -271
  261. package/test/tbm.v20180129.test.js +0 -111
  262. package/test/tbp.v20190311.test.js +0 -61
  263. package/test/tbp.v20190627.test.js +0 -41
  264. package/test/tcaplusdb.v20190823.test.js +0 -551
  265. package/test/tcb.v20180608.test.js +0 -911
  266. package/test/tcbr.v20220217.test.js +0 -121
  267. package/test/tccatalog.v20241024.test.js +0 -61
  268. package/test/tcex.v20200727.test.js +0 -41
  269. package/test/tchd.v20230306.test.js +0 -31
  270. package/test/tci.v20190318.test.js +0 -431
  271. package/test/tcm.v20210413.test.js +0 -141
  272. package/test/tcr.v20190924.test.js +0 -1121
  273. package/test/tcss.v20201101.test.js +0 -3401
  274. package/test/tdcpg.v20211118.test.js +0 -271
  275. package/test/tdid.v20210519.test.js +0 -201
  276. package/test/tdmq.v20200217.test.js +0 -1521
  277. package/test/tds.v20220801.test.js +0 -61
  278. package/test/tem.v20201221.test.js +0 -191
  279. package/test/tem.v20210701.test.js +0 -521
  280. package/test/teo.v20220106.test.js +0 -71
  281. package/test/teo.v20220901.test.js +0 -1421
  282. package/test/thpc.v20211109.test.js +0 -61
  283. package/test/thpc.v20220401.test.js +0 -181
  284. package/test/thpc.v20230321.test.js +0 -251
  285. package/test/tia.v20180226.test.js +0 -121
  286. package/test/tic.v20201117.test.js +0 -151
  287. package/test/ticm.v20181127.test.js +0 -51
  288. package/test/tics.v20181115.test.js +0 -61
  289. package/test/tiems.v20190416.test.js +0 -271
  290. package/test/tiia.v20190529.test.js +0 -241
  291. package/test/tione.v20191022.test.js +0 -241
  292. package/test/tione.v20211111.test.js +0 -411
  293. package/test/tiw.v20190919.test.js +0 -621
  294. package/test/tke.v20180525.test.js +0 -2301
  295. package/test/tke.v20220501.test.js +0 -161
  296. package/test/tkgdq.v20190411.test.js +0 -51
  297. package/test/tms.v20200713.test.js +0 -61
  298. package/test/tms.v20201229.test.js +0 -31
  299. package/test/tmt.v20180321.test.js +0 -91
  300. package/test/tourism.v20230215.test.js +0 -31
  301. package/test/trdp.v20220726.test.js +0 -31
  302. package/test/trocket.v20230308.test.js +0 -571
  303. package/test/trp.v20210515.test.js +0 -561
  304. package/test/trro.v20220325.test.js +0 -251
  305. package/test/trtc.v20190722.test.js +0 -591
  306. package/test/tse.v20201207.test.js +0 -1211
  307. package/test/tsf.v20180326.test.js +0 -2241
  308. package/test/tsi.v20210325.test.js +0 -51
  309. package/test/tsw.v20200924.test.js +0 -31
  310. package/test/tsw.v20210412.test.js +0 -51
  311. package/test/tts.v20190823.test.js +0 -51
  312. package/test/ump.v20200918.test.js +0 -191
  313. package/test/vcg.v20240404.test.js +0 -41
  314. package/test/vclm.v20240523.test.js +0 -121
  315. package/test/vcube.v20220410.test.js +0 -361
  316. package/test/vdb.v20230616.test.js +0 -81
  317. package/test/vm.v20200709.test.js +0 -71
  318. package/test/vm.v20201229.test.js +0 -61
  319. package/test/vm.v20210922.test.js +0 -61
  320. package/test/vms.v20200902.test.js +0 -41
  321. package/test/vod.v20180717.test.js +0 -1831
  322. package/test/vod.v20240718.test.js +0 -31
  323. package/test/vpc.v20170312.test.js +0 -3901
  324. package/test/vrs.v20200824.test.js +0 -101
  325. package/test/vtc.v20240223.test.js +0 -51
  326. package/test/waf.v20180125.test.js +0 -1511
  327. package/test/wav.v20210129.test.js +0 -281
  328. package/test/wedata.v20210820.test.js +0 -2421
  329. package/test/weilingwith.v20230427.test.js +0 -661
  330. package/test/wss.v20180426.test.js +0 -51
  331. package/test/yinsuda.v20220527.test.js +0 -221
  332. package/test/youmall.v20180228.test.js +0 -331
  333. package/test/yunjing.v20180228.test.js +0 -1021
  334. package/test/yunsou.v20180504.test.js +0 -41
  335. 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)