tencentcloud-sdk-nodejs-dlc 4.0.347 → 4.0.350

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/CHANGELOG.md CHANGED
@@ -1,3 +1,150 @@
1
+ # Release 4.0.350
2
+
3
+ ## 企业组织(organization) 版本:2021-03-31
4
+
5
+ ### 第 8 次发布
6
+
7
+ 发布时间:2022-05-30 06:11:27
8
+
9
+ 本次发布包含了以下内容:
10
+
11
+ 改善已有的文档。
12
+
13
+ 新增接口:
14
+
15
+ * [CreateOrganizationMemberPolicy](https://cloud.tencent.com/document/api/850/74595)
16
+
17
+
18
+
19
+ ## 企业组织(organization) 版本:2018-12-25
20
+
21
+
22
+
23
+ ## 云数据库 Redis(redis) 版本:2018-04-12
24
+
25
+ ### 第 46 次发布
26
+
27
+ 发布时间:2022-05-30 06:11:47
28
+
29
+ 本次发布包含了以下内容:
30
+
31
+ 改善已有的文档。
32
+
33
+ 新增接口:
34
+
35
+ * [UpgradeProxyVersion](https://cloud.tencent.com/document/api/239/74597)
36
+ * [UpgradeSmallVersion](https://cloud.tencent.com/document/api/239/74596)
37
+
38
+
39
+
40
+ # Release 4.0.349
41
+
42
+ ## 数据湖计算(dlc) 版本:2021-01-25
43
+
44
+ ### 第 17 次发布
45
+
46
+ 发布时间:2022-05-26 18:17:40
47
+
48
+ 本次发布包含了以下内容:
49
+
50
+ 改善已有的文档。
51
+
52
+ 新增接口:
53
+
54
+ * [CreateSparkApp](https://cloud.tencent.com/document/api/1342/74538)
55
+ * [CreateSparkAppTask](https://cloud.tencent.com/document/api/1342/74537)
56
+ * [DeleteSparkApp](https://cloud.tencent.com/document/api/1342/74536)
57
+ * [DescribeSparkAppJob](https://cloud.tencent.com/document/api/1342/74535)
58
+ * [DescribeSparkAppJobs](https://cloud.tencent.com/document/api/1342/74534)
59
+ * [DescribeSparkAppTasks](https://cloud.tencent.com/document/api/1342/74533)
60
+ * [ModifySparkApp](https://cloud.tencent.com/document/api/1342/74532)
61
+
62
+ 新增数据结构:
63
+
64
+ * [SparkJobInfo](https://cloud.tencent.com/document/api/1342/53778#SparkJobInfo)
65
+ * [StreamingStatistics](https://cloud.tencent.com/document/api/1342/53778#StreamingStatistics)
66
+
67
+
68
+
69
+ ## 物联网通信(iotcloud) 版本:2021-04-08
70
+
71
+ ### 第 5 次发布
72
+
73
+ 发布时间:2022-05-27 06:10:42
74
+
75
+ 本次发布包含了以下内容:
76
+
77
+ 改善已有的文档。
78
+
79
+ 新增接口:
80
+
81
+ * [ListTopicRules](https://cloud.tencent.com/document/api/634/74542)
82
+
83
+ 新增数据结构:
84
+
85
+ * [TopicRuleInfo](https://cloud.tencent.com/document/api/634/71973#TopicRuleInfo)
86
+
87
+
88
+
89
+ ## 物联网通信(iotcloud) 版本:2018-06-14
90
+
91
+
92
+
93
+ # Release 4.0.348
94
+
95
+ ## 堡垒机(dasb) 版本:2019-10-18
96
+
97
+ ### 第 1 次发布
98
+
99
+ 发布时间:2022-05-25 11:33:45
100
+
101
+ 本次发布包含了以下内容:
102
+
103
+ 改善已有的文档。
104
+
105
+ 新增接口:
106
+
107
+ * [CreateAcl](https://cloud.tencent.com/document/api/1025/74411)
108
+ * [CreateUser](https://cloud.tencent.com/document/api/1025/74406)
109
+ * [DeleteAcls](https://cloud.tencent.com/document/api/1025/74410)
110
+ * [DeleteUsers](https://cloud.tencent.com/document/api/1025/74405)
111
+ * [DescribeAcls](https://cloud.tencent.com/document/api/1025/74409)
112
+ * [DescribeDasbImageIds](https://cloud.tencent.com/document/api/1025/74413)
113
+ * [DescribeDevices](https://cloud.tencent.com/document/api/1025/74415)
114
+ * [DescribeUsers](https://cloud.tencent.com/document/api/1025/74404)
115
+ * [ModifyAcl](https://cloud.tencent.com/document/api/1025/74408)
116
+ * [ModifyUser](https://cloud.tencent.com/document/api/1025/74403)
117
+
118
+ 新增数据结构:
119
+
120
+ * [Acl](https://cloud.tencent.com/document/api/1025/74416#Acl)
121
+ * [CmdTemplate](https://cloud.tencent.com/document/api/1025/74416#CmdTemplate)
122
+ * [Device](https://cloud.tencent.com/document/api/1025/74416#Device)
123
+ * [Group](https://cloud.tencent.com/document/api/1025/74416#Group)
124
+ * [Resource](https://cloud.tencent.com/document/api/1025/74416#Resource)
125
+ * [User](https://cloud.tencent.com/document/api/1025/74416#User)
126
+
127
+
128
+
129
+ ## 事件总线(eb) 版本:2021-04-16
130
+
131
+ ### 第 3 次发布
132
+
133
+ 发布时间:2022-05-26 06:11:01
134
+
135
+ 本次发布包含了以下内容:
136
+
137
+ 改善已有的文档。
138
+
139
+ 修改数据结构:
140
+
141
+ * [Event](https://cloud.tencent.com/document/api/1359/67704#Event)
142
+
143
+ * 新增成员:Time
144
+
145
+
146
+
147
+
1
148
  # Release 4.0.347
2
149
 
3
150
  ## 访问管理(cam) 版本:2019-01-16
package/README.md CHANGED
@@ -36,7 +36,8 @@ const tencentcloud = require("tencentcloud-sdk-nodejs")
36
36
  // 导入对应产品模块的client models。
37
37
  const CvmClient = tencentcloud.cvm.v20170312.Client
38
38
 
39
- const clientConfig = {
39
+ // 实例化要请求产品(以cvm为例)的client对象
40
+ const client = new CvmClient({
40
41
  // 腾讯云认证信息
41
42
  credential: {
42
43
  secretId: "secretId",
@@ -52,9 +53,7 @@ const clientConfig = {
52
53
  reqTimeout: 30, // 请求超时时间,默认60s
53
54
  },
54
55
  },
55
- }
56
- // 实例化要请求产品(以cvm为例)的client对象
57
- const client = new CvmClient(clientConfig)
56
+ })
58
57
  // 通过client对象调用想要访问的接口(Action),需要传入请求对象(Params)以及响应回调函数
59
58
  // 即:client.Action(Params).then(res => console.log(res), err => console.error(err))
60
59
  // 如:查询云服务器可用区列表
@@ -76,7 +75,8 @@ import * as tencentcloud from "tencentcloud-sdk-nodejs"
76
75
  // 导入对应产品模块的client models。
77
76
  const CvmClient = tencentcloud.cvm.v20170312.Client
78
77
 
79
- const clientConfig = {
78
+ // 实例化要请求产品(以cvm为例)的client对象
79
+ const client = new CvmClient({
80
80
  // 腾讯云认证信息
81
81
  credential: {
82
82
  secretId: "secretId",
@@ -92,18 +92,16 @@ const clientConfig = {
92
92
  reqTimeout: 30, // 请求超时时间,默认60s
93
93
  },
94
94
  },
95
- }
96
- // 实例化要请求产品(以cvm为例)的client对象
97
- const client = new CvmClient(clientConfig)
98
- // 通过client对象调用想要访问的接口,需要传入请求对象以及响应回调函数
99
- client.DescribeZones().then(
100
- (data) => {
95
+ })
96
+ async function main(){
97
+ try{
98
+ // async/await 方式调用
99
+ const data = await client.DescribeZones()
101
100
  console.log(data)
102
- },
103
- (err) => {
101
+ }catch(err){
104
102
  console.error("error", err)
105
103
  }
106
- )
104
+ }
107
105
  ```
108
106
 
109
107
  实例化`Client` 的入参支持 `clientConfig` 数据结构和说明 详见 [ClientConfig](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts)
@@ -121,3 +119,31 @@ client.DescribeZones().then(
121
119
  # 旧版 SDK
122
120
 
123
121
  我们推荐使用新版 NODEJS SDK,如果一定要用旧版 SDK,请前往[github 仓库](https://github.com/CFETeam/qcloudapi-sdk)下载。
122
+
123
+ # 常见问题
124
+ - webpack打包出错
125
+
126
+ 请**务必不要**将此sdk直接用于web前端(包括小程序等),暴露密钥在这些环境非常不安全。
127
+
128
+ 正确的做法是在自己的服务端引用此sdk,并保存好密钥,做好请求鉴权;前端再调用服务端执行业务流程。
129
+
130
+ - `The "original" argument must be of type Function.`
131
+
132
+ 通常是因为nodejs版本低于 `v10` ,请再次确认执行环境。
133
+
134
+ - 请求不通
135
+
136
+ 设置环境变量 `NODE_DEBUG=http` 来开启请求日志输出来定位问题,例如:
137
+ ```sh
138
+ # MacOS
139
+ NODE_DEBUG=http node app.js
140
+ # windows cmd
141
+ set NODE_DEBUG=http & node app.js
142
+ # windows powershell
143
+ $env:NODE_DEBUG='http' ; node app.js
144
+ ```
145
+ 如需要配置代理,请设置环境变量 `https_proxy`,例如:
146
+ ```sh
147
+ # MacOS
148
+ https_proxy=http://代理地址:代理端口 node app.js
149
+ ```