tencentcloud-sdk-nodejs 4.0.788 → 4.0.790

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 (82) hide show
  1. package/CHANGELOG.md +533 -0
  2. package/README.md +6 -0
  3. package/SERVICE_CHANGELOG.md +1106 -204
  4. package/examples/cls/v20201016/cls.proto +34 -0
  5. package/examples/cls/v20201016/upload_log.js +69 -0
  6. package/package.json +1 -1
  7. package/products.md +19 -18
  8. package/src/common/abstract_client.ts +32 -0
  9. package/src/common/http/http_connection.ts +5 -2
  10. package/src/common/sdk_version.ts +1 -1
  11. package/src/common/sign.ts +8 -4
  12. package/src/services/apigateway/v20180808/apigateway_models.ts +1 -1
  13. package/src/services/cdb/v20170320/cdb_client.ts +18 -6
  14. package/src/services/cdb/v20170320/cdb_models.ts +15 -0
  15. package/src/services/emr/v20190103/emr_models.ts +41 -36
  16. package/src/services/ess/v20201111/ess_client.ts +22 -4
  17. package/src/services/ess/v20201111/ess_models.ts +19 -10
  18. package/src/services/essbasic/v20210526/essbasic_client.ts +11 -9
  19. package/src/services/essbasic/v20210526/essbasic_models.ts +4 -0
  20. package/src/services/index.ts +1 -0
  21. package/src/services/iotvideo/v20211125/iotvideo_models.ts +8 -0
  22. package/src/services/mna/v20210119/mna_models.ts +3 -3
  23. package/src/services/mongodb/v20190725/mongodb_models.ts +5 -0
  24. package/src/services/monitor/v20180724/monitor_models.ts +2 -4
  25. package/src/services/redis/v20180412/redis_models.ts +25 -11
  26. package/src/services/rum/v20210622/rum_models.ts +2 -1
  27. package/src/services/ssl/v20191205/ssl_models.ts +11 -3
  28. package/src/services/svp/index.ts +5 -0
  29. package/src/services/svp/v20240125/index.ts +6 -0
  30. package/src/services/svp/v20240125/svp_client.ts +40 -0
  31. package/src/services/svp/v20240125/svp_models.ts +72 -0
  32. package/src/services/teo/v20220901/teo_client.ts +52 -33
  33. package/src/services/teo/v20220901/teo_models.ts +180 -81
  34. package/src/services/tmt/v20180321/tmt_models.ts +2 -2
  35. package/src/services/wedata/v20210820/wedata_client.ts +2802 -5338
  36. package/src/services/wedata/v20210820/wedata_models.ts +14500 -29440
  37. package/tencentcloud/common/abstract_client.d.ts +4 -0
  38. package/tencentcloud/common/abstract_client.js +22 -0
  39. package/tencentcloud/common/http/http_connection.js +6 -2
  40. package/tencentcloud/common/sdk_version.d.ts +1 -1
  41. package/tencentcloud/common/sdk_version.js +1 -1
  42. package/tencentcloud/common/sign.d.ts +2 -1
  43. package/tencentcloud/common/sign.js +6 -4
  44. package/tencentcloud/services/apigateway/v20180808/apigateway_models.d.ts +1 -1
  45. package/tencentcloud/services/cdb/v20170320/cdb_client.d.ts +7 -3
  46. package/tencentcloud/services/cdb/v20170320/cdb_client.js +9 -3
  47. package/tencentcloud/services/cdb/v20170320/cdb_models.d.ts +13 -0
  48. package/tencentcloud/services/emr/v20190103/emr_models.d.ts +41 -36
  49. package/tencentcloud/services/ess/v20201111/ess_client.d.ts +22 -4
  50. package/tencentcloud/services/ess/v20201111/ess_client.js +22 -4
  51. package/tencentcloud/services/ess/v20201111/ess_models.d.ts +19 -10
  52. package/tencentcloud/services/essbasic/v20210526/essbasic_client.d.ts +11 -9
  53. package/tencentcloud/services/essbasic/v20210526/essbasic_client.js +11 -9
  54. package/tencentcloud/services/essbasic/v20210526/essbasic_models.d.ts +4 -0
  55. package/tencentcloud/services/index.d.ts +1 -0
  56. package/tencentcloud/services/index.js +2 -0
  57. package/tencentcloud/services/iotvideo/v20211125/iotvideo_models.d.ts +8 -0
  58. package/tencentcloud/services/mna/v20210119/mna_models.d.ts +3 -3
  59. package/tencentcloud/services/mongodb/v20190725/mongodb_models.d.ts +5 -0
  60. package/tencentcloud/services/monitor/v20180724/monitor_models.d.ts +2 -4
  61. package/tencentcloud/services/redis/v20180412/redis_models.d.ts +25 -11
  62. package/tencentcloud/services/rum/v20210622/rum_models.d.ts +2 -1
  63. package/tencentcloud/services/ssl/v20191205/ssl_models.d.ts +11 -3
  64. package/tencentcloud/services/svp/index.d.ts +6 -0
  65. package/tencentcloud/services/svp/index.js +7 -0
  66. package/tencentcloud/services/svp/v20240125/index.d.ts +6 -0
  67. package/tencentcloud/services/svp/v20240125/index.js +9 -0
  68. package/tencentcloud/services/svp/v20240125/svp_client.d.ts +14 -0
  69. package/tencentcloud/services/svp/v20240125/svp_client.js +37 -0
  70. package/tencentcloud/services/svp/v20240125/svp_models.d.ts +54 -0
  71. package/tencentcloud/services/svp/v20240125/svp_models.js +18 -0
  72. package/tencentcloud/services/teo/v20220901/teo_client.d.ts +24 -15
  73. package/tencentcloud/services/teo/v20220901/teo_client.js +27 -16
  74. package/tencentcloud/services/teo/v20220901/teo_models.d.ts +176 -81
  75. package/tencentcloud/services/tmt/v20180321/tmt_models.d.ts +2 -2
  76. package/tencentcloud/services/wedata/v20210820/wedata_client.d.ts +675 -1483
  77. package/tencentcloud/services/wedata/v20210820/wedata_client.js +1027 -2237
  78. package/tencentcloud/services/wedata/v20210820/wedata_models.d.ts +14275 -28693
  79. package/test/cdb.v20170320.test.js +12 -2
  80. package/test/svp.v20240125.test.js +31 -0
  81. package/test/teo.v20220901.test.js +14 -4
  82. package/test/wedata.v20210820.test.js +636 -2646
@@ -0,0 +1,34 @@
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
+ }
@@ -0,0 +1,69 @@
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs",
3
- "version": "4.0.788",
3
+ "version": "4.0.790",
4
4
  "description": "腾讯云 API NODEJS SDK",
5
5
  "main": "tencentcloud/index.js",
6
6
  "scripts": {
package/products.md CHANGED
@@ -14,7 +14,7 @@
14
14
  | apcas | [汽车精准获客服务](https://cloud.tencent.com/document/product/1244) | 2022-04-04 06:05:36 |
15
15
  | ape | [正版图库直通车](https://cloud.tencent.com/document/product/1181) | 2022-04-04 06:05:40 |
16
16
  | api | [云 API](https://cloud.tencent.com/document/product/1278) | 2023-01-05 01:02:52 |
17
- | apigateway | [API 网关](https://cloud.tencent.com/document/product/628) | 2024-01-24 01:20:58 |
17
+ | apigateway | [API 网关](https://cloud.tencent.com/document/product/628) | 2024-01-29 01:06:19 |
18
18
  | apm | [应用性能监控](https://cloud.tencent.com/document/product/1463) | 2023-12-15 18:59:23 |
19
19
  | as | [弹性伸缩](https://cloud.tencent.com/document/product/377) | 2023-11-20 00:01:45 |
20
20
  | asr | [语音识别](https://cloud.tencent.com/document/product/1093) | 2024-01-23 01:09:15 |
@@ -40,7 +40,7 @@
40
40
  | cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2023-12-29 01:09:11 |
41
41
  | cbs | [云硬盘](https://cloud.tencent.com/document/product/362) | 2023-12-27 01:08:57 |
42
42
  | ccc | [云联络中心](https://cloud.tencent.com/document/product/679) | 2024-01-25 15:34:29 |
43
- | cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2024-01-24 01:22:49 |
43
+ | cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2024-01-30 01:08:20 |
44
44
  | cdc | [本地专用集群](https://cloud.tencent.com/document/product/1346) | 2024-01-15 01:08:17 |
45
45
  | cdn | [内容分发网络 CDN](https://cloud.tencent.com/document/product/228) | 2024-01-17 01:09:06 |
46
46
  | cds | [T-Sec-数据安全审计(DSA)](https://cloud.tencent.com/document/product/856) | 2024-01-24 01:23:26 |
@@ -80,7 +80,7 @@
80
80
  | dbdc | [云数据库独享集群](https://cloud.tencent.com/document/product/1322) | 2023-08-22 01:11:33 |
81
81
  | dc | [专线接入](https://cloud.tencent.com/document/product/216) | 2024-01-11 01:12:33 |
82
82
  | dcdb | [TDSQL MySQL 版](https://cloud.tencent.com/document/product/557) | 2023-10-30 00:33:47 |
83
- | dlc | [数据湖计算 DLC](https://cloud.tencent.com/document/product/1342) | 2024-01-15 01:12:23 |
83
+ | dlc | [数据湖计算 DLC](https://cloud.tencent.com/document/product/1342) | 2024-01-29 01:11:58 |
84
84
  | dnspod | [DNSPod](https://cloud.tencent.com/document/product/1427) | 2024-01-10 01:13:10 |
85
85
  | domain | [域名注册](https://cloud.tencent.com/document/product/242) | 2023-12-15 01:10:52 |
86
86
  | drm | [数字版权管理](https://cloud.tencent.com/document/product/1000) | 2023-11-10 01:14:28 |
@@ -94,10 +94,10 @@
94
94
  | ecm | [边缘计算机器](https://cloud.tencent.com/document/product/1108) | 2023-12-20 01:36:00 |
95
95
  | eiam | [数字身份管控平台(员工版)](https://cloud.tencent.com/document/product/1442) | 2023-05-18 01:25:40 |
96
96
  | eis | [数据连接器](https://cloud.tencent.com/document/product/1270) | 2023-08-10 01:17:44 |
97
- | emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2024-01-24 01:28:23 |
97
+ | emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2024-01-30 01:14:22 |
98
98
  | es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2024-01-25 01:13:20 |
99
- | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-01-26 01:13:26 |
100
- | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-01-26 01:13:42 |
99
+ | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-01-30 01:14:38 |
100
+ | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-01-30 01:14:52 |
101
101
  | facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2023-12-15 19:41:44 |
102
102
  | faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2024-01-12 01:15:37 |
103
103
  | fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2023-12-25 00:11:01 |
@@ -125,7 +125,7 @@
125
125
  | iotcloud | [物联网通信](https://cloud.tencent.com/document/product/634) | 2023-11-06 00:11:14 |
126
126
  | iotexplorer | [物联网开发平台](https://cloud.tencent.com/document/product/1081) | 2023-10-16 01:17:51 |
127
127
  | iottid | [物联网设备身份认证](https://cloud.tencent.com/document/product/1086) | 2023-05-18 01:33:02 |
128
- | iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2024-01-23 01:20:20 |
128
+ | iotvideo | [物联网智能视频服务](https://cloud.tencent.com/document/product/1131) | 2024-01-30 01:16:52 |
129
129
  | iotvideoindustry | [物联网智能视频服务(行业版)](https://cloud.tencent.com/document/product/1361) | 2023-08-17 03:44:44 |
130
130
  | irp | [智能推荐平台](https://cloud.tencent.com/document/product/1541) | 2023-09-22 02:00:51 |
131
131
  | iss | [智能视图计算平台](https://cloud.tencent.com/document/product/1344) | 2024-01-26 01:15:52 |
@@ -143,9 +143,9 @@
143
143
  | memcached | [云数据库Memcached](https://cloud.tencent.com/document/product/241) | 2023-10-20 01:19:21 |
144
144
  | mgobe | [游戏联机对战引擎](https://cloud.tencent.com/document/product/1038) | 2022-07-08 06:11:32 |
145
145
  | mmps | [小程序安全](https://cloud.tencent.com/document/product/1223) | 2023-05-18 01:39:20 |
146
- | mna | [多网聚合加速](https://cloud.tencent.com/document/product/1385) | 2023-12-01 01:19:47 |
147
- | mongodb | [云数据库 MongoDB](https://cloud.tencent.com/document/product/240) | 2023-12-27 01:26:46 |
148
- | monitor | [腾讯云可观测平台](https://cloud.tencent.com/document/product/248) | 2024-01-26 01:17:15 |
146
+ | mna | [多网聚合加速](https://cloud.tencent.com/document/product/1385) | 2024-01-30 01:18:35 |
147
+ | mongodb | [云数据库 MongoDB](https://cloud.tencent.com/document/product/240) | 2024-01-29 01:17:07 |
148
+ | monitor | [腾讯云可观测平台](https://cloud.tencent.com/document/product/248) | 2024-01-29 01:17:14 |
149
149
  | mps | [媒体处理](https://cloud.tencent.com/document/product/862) | 2024-01-26 01:17:35 |
150
150
  | mrs | [医疗报告结构化](https://cloud.tencent.com/document/product/1314) | 2024-01-08 00:14:42 |
151
151
  | ms | [移动应用安全](https://cloud.tencent.com/document/product/283) | 2023-12-05 02:07:42 |
@@ -163,11 +163,11 @@
163
163
  | privatedns | [私有域解析 Private DNS](https://cloud.tencent.com/document/product/1338) | 2024-01-19 01:18:43 |
164
164
  | pts | [云压测](https://cloud.tencent.com/document/product/1484) | 2023-12-12 02:16:34 |
165
165
  | rce | [全栈式风控引擎](https://cloud.tencent.com/document/product/1343) | 2023-11-24 01:21:07 |
166
- | redis | [云数据库Redis](https://cloud.tencent.com/document/product/239) | 2024-01-22 01:18:51 |
166
+ | redis | [云数据库Redis](https://cloud.tencent.com/document/product/239) | 2024-01-29 01:18:51 |
167
167
  | region | [地域管理系统](https://cloud.tencent.com/document/product/1596) | 2023-10-13 01:22:28 |
168
168
  | rkp | [风险探针](https://cloud.tencent.com/document/product/1169) | 2023-12-25 00:16:39 |
169
169
  | rp | [注册保护](https://cloud.tencent.com/document/product/1191) | 2022-04-04 07:04:06 |
170
- | rum | [前端性能监控](https://cloud.tencent.com/document/product/1464) | 2024-01-23 01:26:09 |
170
+ | rum | [前端性能监控](https://cloud.tencent.com/document/product/1464) | 2024-01-30 01:20:45 |
171
171
  | scf | [云函数](https://cloud.tencent.com/document/product/583) | 2024-01-24 01:34:14 |
172
172
  | ses | [邮件推送](https://cloud.tencent.com/document/product/1288) | 2023-12-25 00:16:59 |
173
173
  | smh | [智能媒资托管](https://cloud.tencent.com/document/product/1339) | 2023-07-11 01:37:49 |
@@ -178,10 +178,11 @@
178
178
  | solar | [智汇零售](https://cloud.tencent.com/document/product) | 2020-03-19 08:01:59 |
179
179
  | sqlserver | [云数据库 SQL Server](https://cloud.tencent.com/document/product/238) | 2024-01-17 01:21:16 |
180
180
  | ssa | [安全运营中心](https://cloud.tencent.com/document/product/664) | 2023-11-15 02:18:28 |
181
- | ssl | [SSL 证书](https://cloud.tencent.com/document/product/400) | 2024-01-19 01:19:47 |
181
+ | ssl | [SSL 证书](https://cloud.tencent.com/document/product/400) | 2024-01-30 01:21:39 |
182
182
  | sslpod | [证书监控 SSLPod](https://cloud.tencent.com/document/product/1084) | 2023-08-17 04:46:28 |
183
183
  | ssm | [凭据管理系统](https://cloud.tencent.com/document/product/1140) | 2023-12-28 01:23:11 |
184
184
  | sts | [安全凭证服务](https://cloud.tencent.com/document/product/1312) | 2024-01-17 01:21:44 |
185
+ | svp | [节省计划](https://cloud.tencent.com/document/product/1761) | 2024-01-26 16:30:56 |
185
186
  | taf | [流量反欺诈](https://cloud.tencent.com/document/product/1031) | 2023-08-17 04:47:19 |
186
187
  | tag | [标签](https://cloud.tencent.com/document/product/651) | 2024-01-26 01:20:11 |
187
188
  | tan | [碳引擎](https://cloud.tencent.com/document/product/1498) | 2023-05-18 01:50:16 |
@@ -204,7 +205,7 @@
204
205
  | tdmq | [消息队列 TDMQ](https://cloud.tencent.com/document/product/1179) | 2024-01-12 01:24:10 |
205
206
  | tds | [设备安全](https://cloud.tencent.com/document/product/1628) | 2023-11-15 02:26:59 |
206
207
  | tem | [弹性微服务](https://cloud.tencent.com/document/product/1371) | 2023-12-20 02:13:36 |
207
- | teo | [边缘安全加速平台](https://cloud.tencent.com/document/product/1552) | 2024-01-26 01:22:13 |
208
+ | teo | [边缘安全加速平台](https://cloud.tencent.com/document/product/1552) | 2024-01-30 01:24:01 |
208
209
  | thpc | [高性能计算平台](https://cloud.tencent.com/document/product/1527) | 2023-11-27 00:20:12 |
209
210
  | tia | [智能钛机器学习](https://cloud.tencent.com/document/product/851) | 2021-10-21 11:12:52 |
210
211
  | tic | [资源编排 TIC](https://cloud.tencent.com/document/product/1213) | 2023-08-17 05:26:08 |
@@ -217,14 +218,14 @@
217
218
  | tke | [容器服务](https://cloud.tencent.com/document/product/457) | 2024-01-22 11:36:09 |
218
219
  | tkgdq | [腾讯知识图谱数据查询](https://cloud.tencent.com/document/product) | 2020-03-10 00:51:44 |
219
220
  | tms | [文本内容安全](https://cloud.tencent.com/document/product/1124) | 2024-01-12 01:25:58 |
220
- | tmt | [机器翻译](https://cloud.tencent.com/document/product/551) | 2024-01-25 01:24:16 |
221
+ | tmt | [机器翻译](https://cloud.tencent.com/document/product/551) | 2024-01-30 01:25:25 |
221
222
  | tourism | [文旅客情大数据](https://cloud.tencent.com/document/product/1684) | 2023-08-10 01:43:37 |
222
223
  | trdp | [流量风险决策平台](https://cloud.tencent.com/document/product/1604) | 2023-05-18 02:01:19 |
223
224
  | trocket | [消息队列 RocketMQ 版](https://cloud.tencent.com/document/product/1493) | 2024-01-23 01:30:19 |
224
225
  | trp | [T-Sec-安心平台(RP)](https://cloud.tencent.com/document/product/1458) | 2023-12-29 01:27:21 |
225
226
  | trro | [远程实时操控](https://cloud.tencent.com/document/product/1584) | 2023-07-18 01:53:24 |
226
227
  | trtc | [实时音视频](https://cloud.tencent.com/document/product/647) | 2024-01-24 17:17:12 |
227
- | tse | [微服务引擎 TSE](https://cloud.tencent.com/document/product/1364) | 2024-01-23 01:30:39 |
228
+ | tse | [微服务引擎](https://cloud.tencent.com/document/product/1364) | 2024-01-29 01:23:38 |
228
229
  | tsf | [微服务平台 TSF](https://cloud.tencent.com/document/product/649) | 2024-01-15 01:25:03 |
229
230
  | tsw | [微服务观测平台 TSW](https://cloud.tencent.com/document/product/1311) | 2023-05-18 02:04:00 |
230
231
  | tts | [语音合成](https://cloud.tencent.com/document/product/1073) | 2023-11-27 00:22:20 |
@@ -232,11 +233,11 @@
232
233
  | vm | [视频内容安全](https://cloud.tencent.com/document/product/1265) | 2023-12-22 01:27:31 |
233
234
  | vms | [语音消息](https://cloud.tencent.com/document/product/1128) | 2023-08-17 05:50:56 |
234
235
  | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2024-01-25 01:25:21 |
235
- | vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-01-26 01:24:53 |
236
+ | vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2024-01-30 01:27:12 |
236
237
  | vrs | [声音复刻](https://cloud.tencent.com/document/product/1283) | 2023-11-27 00:23:42 |
237
238
  | waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2024-01-26 01:25:28 |
238
239
  | wav | [企业微信汽车行业版](https://cloud.tencent.com/document/product/1318) | 2023-11-15 02:42:49 |
239
- | wedata | [数据开发治理平台 WeData](https://cloud.tencent.com/document/product/1267) | 2024-01-26 10:56:08 |
240
+ | wedata | [数据开发治理平台 WeData](https://cloud.tencent.com/document/product/1267) | 2024-01-30 01:28:12 |
240
241
  | weilingwith | [微瓴同业开放平台](https://cloud.tencent.com/document/product/1693) | 2024-01-17 01:27:53 |
241
242
  | wss | [SSL证书管理服务](https://cloud.tencent.com/document/product) | 2020-04-01 08:53:44 |
242
243
  | yinsuda | [音速达直播音乐版权引擎](https://cloud.tencent.com/document/product/1592) | 2023-12-26 02:06:57 |
@@ -142,6 +142,38 @@ export class AbstractClient {
142
142
  }
143
143
  }
144
144
 
145
+ /**
146
+ * @inner
147
+ */
148
+ async requestOctetStream(
149
+ action: string,
150
+ req: any,
151
+ options?: ResponseCallback | RequestOptions,
152
+ cb?: ResponseCallback
153
+ ) {
154
+ if (typeof options === "function") {
155
+ cb = options
156
+ options = {} as RequestOptions
157
+ }
158
+
159
+ try {
160
+ const result = await this.doRequest(
161
+ action,
162
+ req ?? {},
163
+ Object.assign({}, options, {
164
+ headers: {
165
+ "Content-Type": "application/octet-stream; charset=utf-8",
166
+ },
167
+ })
168
+ )
169
+ cb && cb(null, result)
170
+ return result
171
+ } catch (e) {
172
+ cb && cb(e as any, null)
173
+ throw e
174
+ }
175
+ }
176
+
145
177
  /**
146
178
  * @inner
147
179
  */
@@ -142,8 +142,10 @@ export class HttpConnection {
142
142
  config.headers["Content-Type"] = "application/x-www-form-urlencoded"
143
143
  }
144
144
  if (method === "POST" && !multipart) {
145
- config.body = JSONbigNative.stringify(data)
146
- config.headers["Content-Type"] = "application/json"
145
+ config.body = data
146
+ const contentType = config.headers["Content-Type"] || "application/json"
147
+ if (!isBuffer(data)) config.body = JSONbigNative.stringify(data)
148
+ config.headers["Content-Type"] = contentType
147
149
  }
148
150
  if (method === "POST" && multipart) {
149
151
  form = new FormData()
@@ -164,6 +166,7 @@ export class HttpConnection {
164
166
  secretKey,
165
167
  multipart,
166
168
  boundary: form ? form.getBoundary() : undefined,
169
+ headers: config.headers,
167
170
  })
168
171
 
169
172
  config.headers["Authorization"] = signature
@@ -1 +1 @@
1
- export const sdkVersion = "4.0.788"
1
+ export const sdkVersion = "4.0.790"
@@ -36,6 +36,7 @@ export default class Sign {
36
36
  secretKey,
37
37
  multipart,
38
38
  boundary,
39
+ headers: configHeaders = {},
39
40
  }: {
40
41
  method?: string
41
42
  url?: string
@@ -46,21 +47,23 @@ export default class Sign {
46
47
  secretKey: string
47
48
  multipart: boolean
48
49
  boundary: string
50
+ headers: Record<string, string>
49
51
  }): string {
50
52
  const urlObj = new URL(url)
53
+ const contentType = configHeaders["Content-Type"]
51
54
 
52
55
  // 通用头部
53
56
  let headers = ""
54
57
  let signedHeaders = ""
55
58
  if (method === "GET") {
56
59
  signedHeaders = "content-type"
57
- headers = "content-type:application/x-www-form-urlencoded\n"
60
+ headers = `content-type:${contentType}\n`
58
61
  } else if (method === "POST") {
59
62
  signedHeaders = "content-type"
60
63
  if (multipart) {
61
64
  headers = `content-type:multipart/form-data; boundary=${boundary}\n`
62
65
  } else {
63
- headers = "content-type:application/json\n"
66
+ headers = `content-type:${contentType}\n`
64
67
  }
65
68
  }
66
69
  headers += `host:${urlObj.hostname}\n`
@@ -90,7 +93,8 @@ export default class Sign {
90
93
  hash.update(`--\r\n`)
91
94
  payload_hash = hash.digest("hex")
92
95
  } else {
93
- payload_hash = payload ? getHash(JSONbigNative.stringify(payload)) : getHash("")
96
+ const hashMessage = Buffer.isBuffer(payload) ? payload : JSONbigNative.stringify(payload)
97
+ payload_hash = payload ? getHash(hashMessage) : getHash("")
94
98
  }
95
99
 
96
100
  const canonicalRequest =
@@ -130,7 +134,7 @@ function sha256(message: string, secret = "", encoding?: string): string {
130
134
  return hmac.update(message).digest(encoding as any)
131
135
  }
132
136
 
133
- function getHash(message: string, encoding = "hex"): string {
137
+ function getHash(message: crypto.BinaryLike, encoding = "hex"): string {
134
138
  const hash = crypto.createHash("sha256")
135
139
  return hash.update(message).digest(encoding as any)
136
140
  }
@@ -3393,7 +3393,7 @@ export interface ModifyApiRequest {
3393
3393
  */
3394
3394
  ServiceTimeout?: number
3395
3395
  /**
3396
- * API 的前端请求类型,如 HTTP 或 HTTPS 或者 HTTP 和 HTTPS
3396
+ * API 的前端请求类型,如 HTTP 或 HTTPS 或者 HTTP 和 HTTPS。修改api时推荐必填
3397
3397
  */
3398
3398
  Protocol?: string
3399
3399
  /**
@@ -108,6 +108,7 @@ import {
108
108
  ReleaseResult,
109
109
  CreateAuditLogFileRequest,
110
110
  AuditRule,
111
+ DescribeInstanceAlarmEventsRequest,
111
112
  DescribeBinlogsRequest,
112
113
  DescribeCdbProxyInfoRequest,
113
114
  RollbackDBName,
@@ -336,6 +337,7 @@ import {
336
337
  DescribeCdbProxyInfoResponse,
337
338
  ModifyAuditConfigRequest,
338
339
  DeviceDiskInfo,
340
+ DescribeInstanceAlarmEventsResponse,
339
341
  DescribeRoMinScaleResponse,
340
342
  RoWeightValue,
341
343
  DescribeSlowLogDataResponse,
@@ -1460,6 +1462,16 @@ export class Client extends AbstractClient {
1460
1462
  return this.request("CloseCDBProxy", req, cb)
1461
1463
  }
1462
1464
 
1465
+ /**
1466
+ * 修改置放群组的名称或者描述
1467
+ */
1468
+ async ModifyNameOrDescByDpId(
1469
+ req: ModifyNameOrDescByDpIdRequest,
1470
+ cb?: (error: string, rep: ModifyNameOrDescByDpIdResponse) => void
1471
+ ): Promise<ModifyNameOrDescByDpIdResponse> {
1472
+ return this.request("ModifyNameOrDescByDpId", req, cb)
1473
+ }
1474
+
1463
1475
  /**
1464
1476
  * 本接口(ModifyAccountMaxUserConnections)用于修改云数据库账户最大可用连接数。
1465
1477
  */
@@ -2023,13 +2035,13 @@ export class Client extends AbstractClient {
2023
2035
  }
2024
2036
 
2025
2037
  /**
2026
- * 修改置放群组的名称或者描述
2038
+ * 查询实例发生的事件信息
2027
2039
  */
2028
- async ModifyNameOrDescByDpId(
2029
- req: ModifyNameOrDescByDpIdRequest,
2030
- cb?: (error: string, rep: ModifyNameOrDescByDpIdResponse) => void
2031
- ): Promise<ModifyNameOrDescByDpIdResponse> {
2032
- return this.request("ModifyNameOrDescByDpId", req, cb)
2040
+ async DescribeInstanceAlarmEvents(
2041
+ req?: DescribeInstanceAlarmEventsRequest,
2042
+ cb?: (error: string, rep: DescribeInstanceAlarmEventsResponse) => void
2043
+ ): Promise<DescribeInstanceAlarmEventsResponse> {
2044
+ return this.request("DescribeInstanceAlarmEvents", req, cb)
2033
2045
  }
2034
2046
 
2035
2047
  /**
@@ -2307,6 +2307,11 @@ export interface AuditRule {
2307
2307
  AuditAll: boolean
2308
2308
  }
2309
2309
 
2310
+ /**
2311
+ * DescribeInstanceAlarmEvents请求参数结构体
2312
+ */
2313
+ export type DescribeInstanceAlarmEventsRequest = null
2314
+
2310
2315
  /**
2311
2316
  * DescribeBinlogs请求参数结构体
2312
2317
  */
@@ -7664,6 +7669,16 @@ export interface DeviceDiskInfo {
7664
7669
  CapacityRatio: Array<number | bigint>
7665
7670
  }
7666
7671
 
7672
+ /**
7673
+ * DescribeInstanceAlarmEvents返回参数结构体
7674
+ */
7675
+ export interface DescribeInstanceAlarmEventsResponse {
7676
+ /**
7677
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
7678
+ */
7679
+ RequestId?: string
7680
+ }
7681
+
7667
7682
  /**
7668
7683
  * DescribeRoMinScale返回参数结构体
7669
7684
  */