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