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.
- package/README.md +37 -8
- package/package.json +1 -1
- package/src/common/sdk_version.ts +1 -1
- package/src/services/lkeap/v20240522/lkeap_client.ts +14 -2
- package/src/services/lkeap/v20240522/lkeap_models.ts +49 -21
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/lkeap/v20240522/lkeap_client.d.ts +5 -1
- package/tencentcloud/services/lkeap/v20240522/lkeap_client.js +6 -0
- package/tencentcloud/services/lkeap/v20240522/lkeap_models.d.ts +46 -20
- package/CHANGELOG.md +0 -209461
- package/SERVICE_CHANGELOG.md +0 -187648
- package/examples/cbs/v20170312/describe_disks.js +0 -32
- package/examples/cbs/v20170312/describe_disks.ts +0 -32
- package/examples/cls/v20201016/cls.proto +0 -34
- package/examples/cls/v20201016/upload_log.js +0 -69
- package/examples/common/common_client.js +0 -47
- package/examples/common/common_client.ts +0 -47
- package/examples/cvm/v20170312/describe_instances.js +0 -44
- package/examples/cvm/v20170312/describe_instances.ts +0 -43
- package/examples/cvm/v20170312/describe_zones.js +0 -22
- package/examples/cvm/v20170312/describe_zones.ts +0 -33
- package/examples/cvm/v20170312/inquiry_price_run_instances.ts +0 -73
- package/examples/cvm/v20170312/run_instances.js +0 -73
- package/examples/cvm/v20170312/run_instances.ts +0 -73
- package/examples/cvm_role.js +0 -27
- package/examples/cvm_role.ts +0 -28
- package/examples/ecc/v20181213/ecc_correct.js +0 -37
- package/examples/ecc/v20181213/ecc_correct.ts +0 -37
- package/examples/ecc/v20181213/ecc_ocr.js +0 -39
- package/examples/ecc/v20181213/ecc_ocr.ts +0 -39
- package/examples/hcm/v20181106/hcm_ocr.js +0 -42
- package/examples/hcm/v20181106/hcm_ocr.ts +0 -39
- package/examples/hunyuan/v20230901/chat_completions.js +0 -59
- package/examples/hunyuan/v20230901/chat_completions.ts +0 -61
- package/examples/soe/v20180903/init_oral_process.js +0 -41
- package/examples/soe/v20180903/init_oral_process.ts +0 -41
- package/examples/soe/v20180903/transmit_oral_process.js +0 -43
- package/examples/soe/v20180903/transmit_oral_process.ts +0 -43
- package/products.md +0 -264
- package/test/aa.v20200224.test.js +0 -31
- package/test/aai.v20180522.test.js +0 -61
- package/test/aca.v20210323.test.js +0 -101
- package/test/acp.v20220105.test.js +0 -101
- package/test/advisor.v20200721.test.js +0 -41
- package/test/af.v20200226.test.js +0 -51
- package/test/afc.v20200226.test.js +0 -51
- package/test/aiart.v20221229.test.js +0 -191
- package/test/ame.v20190916.test.js +0 -331
- package/test/ams.v20200608.test.js +0 -91
- package/test/ams.v20201229.test.js +0 -71
- package/test/anicloud.v20220923.test.js +0 -51
- package/test/antiddos.v20200309.test.js +0 -981
- package/test/apcas.v20201127.test.js +0 -91
- package/test/ape.v20200513.test.js +0 -101
- package/test/api.v20201106.test.js +0 -51
- package/test/apigateway.v20180808.test.js +0 -1011
- package/test/apm.v20210622.test.js +0 -141
- package/test/as.v20180419.test.js +0 -591
- package/test/asr.v20190614.test.js +0 -341
- package/test/asw.v20200722.test.js +0 -111
- package/test/ba.v20200720.test.js +0 -51
- package/test/batch.v20170312.test.js +0 -331
- package/test/bda.v20200324.test.js +0 -201
- package/test/bh.v20230418.test.js +0 -641
- package/test/bi.v20220105.test.js +0 -261
- package/test/billing.v20180709.test.js +0 -481
- package/test/bizlive.v20190313.test.js +0 -81
- package/test/bm.v20180423.test.js +0 -551
- package/test/bma.v20210624.test.js +0 -301
- package/test/bma.v20221115.test.js +0 -131
- package/test/bmeip.v20180625.test.js +0 -221
- package/test/bmlb.v20180625.test.js +0 -511
- package/test/bmvpc.v20180625.test.js +0 -631
- package/test/bpaas.v20181217.test.js +0 -41
- package/test/bri.v20190328.test.js +0 -31
- package/test/bsca.v20210811.test.js +0 -91
- package/test/btoe.v20210303.test.js +0 -141
- package/test/btoe.v20210514.test.js +0 -151
- package/test/ca.v20230228.test.js +0 -51
- package/test/cam.v20190116.test.js +0 -931
- package/test/captcha.v20190722.test.js +0 -201
- package/test/car.v20220110.test.js +0 -81
- package/test/cat.v20180409.test.js +0 -141
- package/test/cbs.v20170312.test.js +0 -441
- package/test/ccc.v20200210.test.js +0 -661
- package/test/cdb.v20170320.test.js +0 -1741
- package/test/cdc.v20201214.test.js +0 -231
- package/test/cdn.v20180606.test.js +0 -831
- package/test/cds.v20180420.test.js +0 -71
- package/test/cdwch.v20200915.test.js +0 -301
- package/test/cdwdoris.v20211228.test.js +0 -621
- package/test/cdwpg.v20201230.test.js +0 -101
- package/test/cdz.v20221123.test.js +0 -41
- package/test/cfg.v20210820.test.js +0 -191
- package/test/cfs.v20190719.test.js +0 -461
- package/test/cfw.v20190904.test.js +0 -1151
- package/test/chdfs.v20190718.test.js +0 -281
- package/test/chdfs.v20201112.test.js +0 -311
- package/test/ciam.v20220331.test.js +0 -251
- package/test/cii.v20201210.test.js +0 -51
- package/test/cii.v20210408.test.js +0 -151
- package/test/cim.v20190318.test.js +0 -31
- package/test/cis.v20180408.test.js +0 -91
- package/test/ckafka.v20190819.test.js +0 -871
- package/test/clb.v20180317.test.js +0 -881
- package/test/cloudapp.v20220530.test.js +0 -31
- package/test/cloudaudit.v20190319.test.js +0 -211
- package/test/cloudhsm.v20191112.test.js +0 -161
- package/test/cloudstudio.v20230508.test.js +0 -111
- package/test/cls.v20201016.test.js +0 -1151
- package/test/cme.v20191029.test.js +0 -521
- package/test/cmq.v20190304.test.js +0 -41
- package/test/cms.v20190321.test.js +0 -81
- package/test/config.v20220802.test.js +0 -91
- package/test/controlcenter.v20230110.test.js +0 -31
- package/test/cpdp.v20190820.test.js +0 -2211
- package/test/csip.v20221121.test.js +0 -501
- package/test/csxg.v20230303.test.js +0 -71
- package/test/cvm.v20170312.test.js +0 -991
- package/test/cwp.v20180228.test.js +0 -5191
- package/test/cws.v20180312.test.js +0 -211
- package/test/cynosdb.v20190107.test.js +0 -1571
- package/test/dasb.v20191018.test.js +0 -651
- package/test/dataintegration.v20220613.test.js +0 -31
- package/test/dayu.v20180709.test.js +0 -1141
- package/test/dbbrain.v20191016.test.js +0 -291
- package/test/dbbrain.v20210527.test.js +0 -661
- package/test/dbdc.v20201029.test.js +0 -81
- package/test/dc.v20180410.test.js +0 -241
- package/test/dcdb.v20180411.test.js +0 -791
- package/test/dlc.v20210125.test.js +0 -1461
- package/test/dnspod.v20210323.test.js +0 -861
- package/test/domain.v20180808.test.js +0 -571
- package/test/drm.v20181115.test.js +0 -131
- package/test/ds.v20180523.test.js +0 -141
- package/test/dsgc.v20190723.test.js +0 -1501
- package/test/dtf.v20200506.test.js +0 -31
- package/test/dts.v20180330.test.js +0 -241
- package/test/dts.v20211206.test.js +0 -731
- package/test/eb.v20210416.test.js +0 -341
- package/test/ecc.v20181213.test.js +0 -61
- package/test/ecdn.v20191012.test.js +0 -181
- package/test/ecm.v20190719.test.js +0 -1411
- package/test/eiam.v20210420.test.js +0 -441
- package/test/eis.v20200715.test.js +0 -51
- package/test/eis.v20210601.test.js +0 -71
- package/test/emr.v20190103.test.js +0 -781
- package/test/es.v20180416.test.js +0 -631
- package/test/ess.v20201111.test.js +0 -981
- package/test/essbasic.v20201222.test.js +0 -551
- package/test/essbasic.v20210526.test.js +0 -881
- package/test/facefusion.v20181201.test.js +0 -51
- package/test/facefusion.v20220927.test.js +0 -51
- package/test/faceid.v20180301.test.js +0 -391
- package/test/fmu.v20191213.test.js +0 -121
- package/test/ft.v20200304.test.js +0 -81
- package/test/gaap.v20180529.test.js +0 -1071
- package/test/gme.v20180711.test.js +0 -301
- package/test/goosefs.v20220519.test.js +0 -221
- package/test/gpm.v20200820.test.js +0 -201
- package/test/gs.v20191118.test.js +0 -111
- package/test/gse.v20191112.test.js +0 -761
- package/test/gwlb.v20240906.test.js +0 -201
- package/test/habo.v20181203.test.js +0 -41
- package/test/hai.v20230812.test.js +0 -151
- package/test/hasim.v20210716.test.js +0 -241
- package/test/hcm.v20181106.test.js +0 -31
- package/test/hunyuan.v20230901.test.js +0 -211
- package/test/iai.v20180301.test.js +0 -351
- package/test/iai.v20200303.test.js +0 -381
- package/test/iap.v20240713.test.js +0 -81
- package/test/ic.v20190307.test.js +0 -111
- package/test/icr.v20211014.test.js +0 -31
- package/test/ie.v20200304.test.js +0 -121
- package/test/iecp.v20210914.test.js +0 -841
- package/test/ig.v20210518.test.js +0 -31
- package/test/iir.v20200417.test.js +0 -31
- package/test/ims.v20200713.test.js +0 -31
- package/test/ims.v20201229.test.js +0 -41
- package/test/ioa.v20220601.test.js +0 -71
- package/test/iot.v20180123.test.js +0 -471
- package/test/iotcloud.v20180614.test.js +0 -711
- package/test/iotcloud.v20210408.test.js +0 -751
- package/test/iotexplorer.v20190423.test.js +0 -1601
- package/test/iottid.v20190411.test.js +0 -111
- package/test/iotvideo.v20191126.test.js +0 -701
- package/test/iotvideo.v20201215.test.js +0 -811
- package/test/iotvideo.v20211125.test.js +0 -1071
- package/test/iotvideoindustry.v20201201.test.js +0 -1061
- package/test/irp.v20220324.test.js +0 -61
- package/test/irp.v20220805.test.js +0 -91
- package/test/iss.v20230517.test.js +0 -861
- package/test/ivld.v20210903.test.js +0 -301
- package/test/keewidb.v20220308.test.js +0 -401
- package/test/kms.v20190118.test.js +0 -551
- package/test/lcic.v20220817.test.js +0 -691
- package/test/lighthouse.v20200324.test.js +0 -1111
- package/test/live.v20180801.test.js +0 -1971
- package/test/lke.v20231130.test.js +0 -1001
- package/test/lkeap.v20240522.test.js +0 -271
- package/test/lowcode.v20210108.test.js +0 -31
- package/test/lp.v20200224.test.js +0 -31
- package/test/mall.v20230518.test.js +0 -31
- package/test/mariadb.v20170312.test.js +0 -791
- package/test/market.v20191010.test.js +0 -41
- package/test/memcached.v20190318.test.js +0 -31
- package/test/mgobe.v20190929.test.js +0 -31
- package/test/mgobe.v20201014.test.js +0 -91
- package/test/mmps.v20200710.test.js +0 -171
- package/test/mna.v20210119.test.js +0 -431
- package/test/mongodb.v20180408.test.js +0 -151
- package/test/mongodb.v20190725.test.js +0 -511
- package/test/monitor.v20180724.test.js +0 -1601
- package/test/mps.v20190612.test.js +0 -1211
- package/test/mqtt.v20240516.test.js +0 -271
- package/test/mrs.v20200910.test.js +0 -131
- package/test/ms.v20180408.test.js +0 -251
- package/test/msp.v20180319.test.js +0 -91
- package/test/mvj.v20190926.test.js +0 -31
- package/test/nlp.v20190408.test.js +0 -141
- package/test/npp.v20190823.test.js +0 -101
- package/test/oceanus.v20190422.test.js +0 -411
- package/test/ocr.v20181119.test.js +0 -901
- package/test/omics.v20221128.test.js +0 -221
- package/test/organization.v20181225.test.js +0 -221
- package/test/organization.v20210331.test.js +0 -1261
- package/test/partners.v20180321.test.js +0 -221
- package/test/pds.v20210701.test.js +0 -41
- package/test/postgres.v20170312.test.js +0 -1051
- package/test/privatedns.v20201028.test.js +0 -261
- package/test/pts.v20210728.test.js +0 -501
- package/test/rce.v20201103.test.js +0 -131
- package/test/redis.v20180412.test.js +0 -1111
- package/test/region.v20220627.test.js +0 -51
- package/test/rkp.v20191209.test.js +0 -51
- package/test/rp.v20200224.test.js +0 -31
- package/test/rum.v20210622.test.js +0 -561
- package/test/scf.v20180416.test.js +0 -541
- package/test/ses.v20201002.test.js +0 -331
- package/test/smh.v20210712.test.js +0 -171
- package/test/smop.v20201203.test.js +0 -31
- package/test/smpn.v20190822.test.js +0 -41
- package/test/sms.v20190711.test.js +0 -181
- package/test/sms.v20210111.test.js +0 -201
- package/test/soe.v20180724.test.js +0 -61
- package/test/solar.v20181011.test.js +0 -191
- package/test/sqlserver.v20180328.test.js +0 -1501
- package/test/ssa.v20180608.test.js +0 -251
- package/test/ssl.v20191205.test.js +0 -631
- package/test/sslpod.v20190605.test.js +0 -121
- package/test/ssm.v20190923.test.js +0 -261
- package/test/sts.v20180813.test.js +0 -81
- package/test/svp.v20240125.test.js +0 -61
- package/test/taf.v20200210.test.js +0 -61
- package/test/tag.v20180813.test.js +0 -331
- package/test/tan.v20220420.test.js +0 -31
- package/test/tat.v20201028.test.js +0 -311
- package/test/tav.v20190118.test.js +0 -61
- package/test/tbaas.v20180416.test.js +0 -271
- package/test/tbm.v20180129.test.js +0 -111
- package/test/tbp.v20190311.test.js +0 -61
- package/test/tbp.v20190627.test.js +0 -41
- package/test/tcaplusdb.v20190823.test.js +0 -551
- package/test/tcb.v20180608.test.js +0 -911
- package/test/tcbr.v20220217.test.js +0 -121
- package/test/tccatalog.v20241024.test.js +0 -61
- package/test/tcex.v20200727.test.js +0 -41
- package/test/tchd.v20230306.test.js +0 -31
- package/test/tci.v20190318.test.js +0 -431
- package/test/tcm.v20210413.test.js +0 -141
- package/test/tcr.v20190924.test.js +0 -1121
- package/test/tcss.v20201101.test.js +0 -3401
- package/test/tdcpg.v20211118.test.js +0 -271
- package/test/tdid.v20210519.test.js +0 -201
- package/test/tdmq.v20200217.test.js +0 -1521
- package/test/tds.v20220801.test.js +0 -61
- package/test/tem.v20201221.test.js +0 -191
- package/test/tem.v20210701.test.js +0 -521
- package/test/teo.v20220106.test.js +0 -71
- package/test/teo.v20220901.test.js +0 -1421
- package/test/thpc.v20211109.test.js +0 -61
- package/test/thpc.v20220401.test.js +0 -181
- package/test/thpc.v20230321.test.js +0 -251
- package/test/tia.v20180226.test.js +0 -121
- package/test/tic.v20201117.test.js +0 -151
- package/test/ticm.v20181127.test.js +0 -51
- package/test/tics.v20181115.test.js +0 -61
- package/test/tiems.v20190416.test.js +0 -271
- package/test/tiia.v20190529.test.js +0 -241
- package/test/tione.v20191022.test.js +0 -241
- package/test/tione.v20211111.test.js +0 -411
- package/test/tiw.v20190919.test.js +0 -621
- package/test/tke.v20180525.test.js +0 -2301
- package/test/tke.v20220501.test.js +0 -161
- package/test/tkgdq.v20190411.test.js +0 -51
- package/test/tms.v20200713.test.js +0 -61
- package/test/tms.v20201229.test.js +0 -31
- package/test/tmt.v20180321.test.js +0 -91
- package/test/tourism.v20230215.test.js +0 -31
- package/test/trdp.v20220726.test.js +0 -31
- package/test/trocket.v20230308.test.js +0 -571
- package/test/trp.v20210515.test.js +0 -561
- package/test/trro.v20220325.test.js +0 -251
- package/test/trtc.v20190722.test.js +0 -591
- package/test/tse.v20201207.test.js +0 -1211
- package/test/tsf.v20180326.test.js +0 -2241
- package/test/tsi.v20210325.test.js +0 -51
- package/test/tsw.v20200924.test.js +0 -31
- package/test/tsw.v20210412.test.js +0 -51
- package/test/tts.v20190823.test.js +0 -51
- package/test/ump.v20200918.test.js +0 -191
- package/test/vcg.v20240404.test.js +0 -41
- package/test/vclm.v20240523.test.js +0 -121
- package/test/vcube.v20220410.test.js +0 -361
- package/test/vdb.v20230616.test.js +0 -81
- package/test/vm.v20200709.test.js +0 -71
- package/test/vm.v20201229.test.js +0 -61
- package/test/vm.v20210922.test.js +0 -61
- package/test/vms.v20200902.test.js +0 -41
- package/test/vod.v20180717.test.js +0 -1831
- package/test/vod.v20240718.test.js +0 -31
- package/test/vpc.v20170312.test.js +0 -3901
- package/test/vrs.v20200824.test.js +0 -101
- package/test/vtc.v20240223.test.js +0 -51
- package/test/waf.v20180125.test.js +0 -1511
- package/test/wav.v20210129.test.js +0 -281
- package/test/wedata.v20210820.test.js +0 -2421
- package/test/weilingwith.v20230427.test.js +0 -661
- package/test/wss.v20180426.test.js +0 -51
- package/test/yinsuda.v20220527.test.js +0 -221
- package/test/youmall.v20180228.test.js +0 -331
- package/test/yunjing.v20180228.test.js +0 -1021
- package/test/yunsou.v20180504.test.js +0 -41
- 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
|
-
)
|
package/examples/cvm_role.js
DELETED
|
@@ -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)
|
package/examples/cvm_role.ts
DELETED
|
@@ -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)
|