tencentcloud-sdk-nodejs-as 4.0.1053 → 4.1.28

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 CHANGED
@@ -44,18 +44,40 @@ npm install tencentcloud-sdk-nodejs-vpc --save
44
44
 
45
45
  ### 安装全产品 SDK
46
46
 
47
+ 如果项目依赖的云产品较多,可以引入全产品 SDK。
48
+
47
49
  ```
48
50
  npm install tencentcloud-sdk-nodejs --save
49
51
  ```
50
52
 
51
- 全产品 SDK 包含了所有云产品的调用代码,体积偏大,对体积敏感的场景,推荐安装指定产品 SDK。
53
+ 全产品 SDK 包含所有云产品调用代码和 TypeScript 类型文件,体积偏大。对于体积敏感的场景,推荐安装指定产品 SDK。
54
+
55
+ 如果既希望全产品调用,又对包体积比较敏感,可以使用 Slim 版本 SDK。Slim SDK 移除类型文件,并进行了代码压缩,适合体积敏感场景使用:
56
+
57
+ ```
58
+ npm install tencentcloud-sdk-slim-nodejs --save
59
+ ```
52
60
 
53
61
  ## 通过源码包安装
54
62
 
55
- 1. 前往 [GitHub 仓库](https://github.com/tencentcloud/tencentcloud-sdk-nodejs) 或者 [Gitee 仓库](https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs) 下载源码压缩包。
56
- 2. 解压源码包到您项目合适的位置,例如 `sdk/tencentcloud-sdk-nodejs`。
57
- 3. 执行 `npm install ./sdk/tencentcloud-sdk-nodejs`。
58
- 4. 使用 `require("tencentcloud-sdk-nodejs")` 的方式引入 SDK,具体可参考示例。
63
+ 1. clone 代码到本地:
64
+ ```
65
+ git clone https://github.com/tencentcloud/tencentcloud-sdk-nodejs
66
+ # 或者
67
+ git clone https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs
68
+ ```
69
+ 2. 在项目根目录执行以下命令完成构建:
70
+ ```
71
+ npm install && npm run build
72
+ ```
73
+ 3. 打包 NPM 压缩文件,例如 `tencentcloud-sdk-nodejs-4.0.0.tgz`
74
+ ```
75
+ npm pack
76
+ ```
77
+ 4. 安装包到你的项目里:
78
+ ```
79
+ npm install /path/to/tencentcloud-sdk-nodejs/tencentcloud-sdk-nodejs-4.0.0.tgz
80
+ ```
59
81
 
60
82
  # 示例
61
83
 
package/es/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./services";
@@ -0,0 +1,4 @@
1
+ import { v20180419 } from "./v20180419";
2
+ export const as = {
3
+ v20180419: v20180419,
4
+ };
@@ -0,0 +1,180 @@
1
+ import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
+ export class Client extends TencentCloudCommon.AbstractClient {
3
+ constructor(clientConfig) {
4
+ super("as.tencentcloudapi.com", "2018-04-19", clientConfig);
5
+ }
6
+ async StopInstanceRefresh(req, cb) {
7
+ return this.request("StopInstanceRefresh", req, cb);
8
+ }
9
+ async ExecuteScalingPolicy(req, cb) {
10
+ return this.request("ExecuteScalingPolicy", req, cb);
11
+ }
12
+ async CreateAutoScalingGroup(req, cb) {
13
+ return this.request("CreateAutoScalingGroup", req, cb);
14
+ }
15
+ async ClearLaunchConfigurationAttributes(req, cb) {
16
+ return this.request("ClearLaunchConfigurationAttributes", req, cb);
17
+ }
18
+ async StartInstanceRefresh(req, cb) {
19
+ return this.request("StartInstanceRefresh", req, cb);
20
+ }
21
+ async ModifyScalingPolicy(req, cb) {
22
+ return this.request("ModifyScalingPolicy", req, cb);
23
+ }
24
+ async ModifyLoadBalancerTargetAttributes(req, cb) {
25
+ return this.request("ModifyLoadBalancerTargetAttributes", req, cb);
26
+ }
27
+ async DescribeNotificationConfigurations(req, cb) {
28
+ return this.request("DescribeNotificationConfigurations", req, cb);
29
+ }
30
+ async DeleteAutoScalingGroup(req, cb) {
31
+ return this.request("DeleteAutoScalingGroup", req, cb);
32
+ }
33
+ async ScaleOutInstances(req, cb) {
34
+ return this.request("ScaleOutInstances", req, cb);
35
+ }
36
+ async ExitStandby(req, cb) {
37
+ return this.request("ExitStandby", req, cb);
38
+ }
39
+ async StartAutoScalingInstances(req, cb) {
40
+ return this.request("StartAutoScalingInstances", req, cb);
41
+ }
42
+ async UpgradeLaunchConfiguration(req, cb) {
43
+ return this.request("UpgradeLaunchConfiguration", req, cb);
44
+ }
45
+ async DescribeRefreshActivities(req, cb) {
46
+ return this.request("DescribeRefreshActivities", req, cb);
47
+ }
48
+ async ModifyLifecycleHook(req, cb) {
49
+ return this.request("ModifyLifecycleHook", req, cb);
50
+ }
51
+ async DetachLoadBalancers(req, cb) {
52
+ return this.request("DetachLoadBalancers", req, cb);
53
+ }
54
+ async AttachInstances(req, cb) {
55
+ return this.request("AttachInstances", req, cb);
56
+ }
57
+ async DescribeScalingPolicies(req, cb) {
58
+ return this.request("DescribeScalingPolicies", req, cb);
59
+ }
60
+ async DeleteScheduledAction(req, cb) {
61
+ return this.request("DeleteScheduledAction", req, cb);
62
+ }
63
+ async AttachLoadBalancers(req, cb) {
64
+ return this.request("AttachLoadBalancers", req, cb);
65
+ }
66
+ async DetachInstances(req, cb) {
67
+ return this.request("DetachInstances", req, cb);
68
+ }
69
+ async ScaleInInstances(req, cb) {
70
+ return this.request("ScaleInInstances", req, cb);
71
+ }
72
+ async CreateScheduledAction(req, cb) {
73
+ return this.request("CreateScheduledAction", req, cb);
74
+ }
75
+ async SetInstancesProtection(req, cb) {
76
+ return this.request("SetInstancesProtection", req, cb);
77
+ }
78
+ async DescribeAutoScalingAdvices(req, cb) {
79
+ return this.request("DescribeAutoScalingAdvices", req, cb);
80
+ }
81
+ async RemoveInstances(req, cb) {
82
+ return this.request("RemoveInstances", req, cb);
83
+ }
84
+ async DeleteScalingPolicy(req, cb) {
85
+ return this.request("DeleteScalingPolicy", req, cb);
86
+ }
87
+ async CompleteLifecycleAction(req, cb) {
88
+ return this.request("CompleteLifecycleAction", req, cb);
89
+ }
90
+ async ModifyLoadBalancers(req, cb) {
91
+ return this.request("ModifyLoadBalancers", req, cb);
92
+ }
93
+ async ModifyDesiredCapacity(req, cb) {
94
+ return this.request("ModifyDesiredCapacity", req, cb);
95
+ }
96
+ async RollbackInstanceRefresh(req, cb) {
97
+ return this.request("RollbackInstanceRefresh", req, cb);
98
+ }
99
+ async ModifyNotificationConfiguration(req, cb) {
100
+ return this.request("ModifyNotificationConfiguration", req, cb);
101
+ }
102
+ async StopAutoScalingInstances(req, cb) {
103
+ return this.request("StopAutoScalingInstances", req, cb);
104
+ }
105
+ async CreateLaunchConfiguration(req, cb) {
106
+ return this.request("CreateLaunchConfiguration", req, cb);
107
+ }
108
+ async ModifyAutoScalingGroup(req, cb) {
109
+ return this.request("ModifyAutoScalingGroup", req, cb);
110
+ }
111
+ async CreateNotificationConfiguration(req, cb) {
112
+ return this.request("CreateNotificationConfiguration", req, cb);
113
+ }
114
+ async DescribeAutoScalingInstances(req, cb) {
115
+ return this.request("DescribeAutoScalingInstances", req, cb);
116
+ }
117
+ async CreateAutoScalingGroupFromInstance(req, cb) {
118
+ return this.request("CreateAutoScalingGroupFromInstance", req, cb);
119
+ }
120
+ async CreateLifecycleHook(req, cb) {
121
+ return this.request("CreateLifecycleHook", req, cb);
122
+ }
123
+ async UpgradeLifecycleHook(req, cb) {
124
+ return this.request("UpgradeLifecycleHook", req, cb);
125
+ }
126
+ async DisableAutoScalingGroup(req, cb) {
127
+ return this.request("DisableAutoScalingGroup", req, cb);
128
+ }
129
+ async DescribeLaunchConfigurations(req, cb) {
130
+ return this.request("DescribeLaunchConfigurations", req, cb);
131
+ }
132
+ async EnterStandby(req, cb) {
133
+ return this.request("EnterStandby", req, cb);
134
+ }
135
+ async CreateScalingPolicy(req, cb) {
136
+ return this.request("CreateScalingPolicy", req, cb);
137
+ }
138
+ async DeleteLaunchConfiguration(req, cb) {
139
+ return this.request("DeleteLaunchConfiguration", req, cb);
140
+ }
141
+ async DeleteLifecycleHook(req, cb) {
142
+ return this.request("DeleteLifecycleHook", req, cb);
143
+ }
144
+ async DescribeAutoScalingGroupLastActivities(req, cb) {
145
+ return this.request("DescribeAutoScalingGroupLastActivities", req, cb);
146
+ }
147
+ async DescribeLifecycleHooks(req, cb) {
148
+ return this.request("DescribeLifecycleHooks", req, cb);
149
+ }
150
+ async EnableAutoScalingGroup(req, cb) {
151
+ return this.request("EnableAutoScalingGroup", req, cb);
152
+ }
153
+ async DescribeScheduledActions(req, cb) {
154
+ return this.request("DescribeScheduledActions", req, cb);
155
+ }
156
+ async DescribeAutoScalingGroups(req, cb) {
157
+ return this.request("DescribeAutoScalingGroups", req, cb);
158
+ }
159
+ async ModifyScheduledAction(req, cb) {
160
+ return this.request("ModifyScheduledAction", req, cb);
161
+ }
162
+ async DescribeAutoScalingActivities(req, cb) {
163
+ return this.request("DescribeAutoScalingActivities", req, cb);
164
+ }
165
+ async DeleteNotificationConfiguration(req, cb) {
166
+ return this.request("DeleteNotificationConfiguration", req, cb);
167
+ }
168
+ async ResumeInstanceRefresh(req, cb) {
169
+ return this.request("ResumeInstanceRefresh", req, cb);
170
+ }
171
+ async CancelInstanceRefresh(req, cb) {
172
+ return this.request("CancelInstanceRefresh", req, cb);
173
+ }
174
+ async DescribeAccountLimits(req, cb) {
175
+ return this.request("DescribeAccountLimits", req, cb);
176
+ }
177
+ async ModifyLaunchConfigurationAttributes(req, cb) {
178
+ return this.request("ModifyLaunchConfigurationAttributes", req, cb);
179
+ }
180
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ import * as Models from "./as_models";
2
+ import { Client } from "./as_client";
3
+ export const v20180419 = {
4
+ Client: Client,
5
+ Models: Models,
6
+ };
@@ -0,0 +1 @@
1
+ export { as } from "./as";
package/package.json CHANGED
@@ -1,16 +1,26 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-as",
3
- "version": "4.0.1053",
4
- "description": "Tencent Cloud API NODEJS SDK",
5
- "main": "tencentcloud/index.js",
3
+ "version": "4.1.28",
4
+ "description": "腾讯云 API NODEJS SDK",
5
+ "main": "./tencentcloud/index.js",
6
+ "module": "./es/index.js",
7
+ "types": "./tencentcloud/index.d.ts",
6
8
  "scripts": {
7
9
  "test": "mocha -t 10000",
8
- "build": "tsc",
9
- "prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"
10
+ "build": "concurrently 'npm:build:cjs' 'npm:build:es'",
11
+ "build:cjs": "tsc -p tsconfig.json",
12
+ "build:es": "tsc -p tsconfig.es.json",
13
+ "build:slim": "node ./scripts/build_slim.js",
14
+ "prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'",
15
+ "clean": "rimraf tencentcloud es"
10
16
  },
11
17
  "engines": {
12
18
  "node": ">=10"
13
19
  },
20
+ "files": [
21
+ "tencentcloud",
22
+ "es"
23
+ ],
14
24
  "keywords": [
15
25
  "tencentcloudapi",
16
26
  "tencentcloud",
@@ -22,7 +32,7 @@
22
32
  "author": "tencentcloudapi",
23
33
  "license": "Apache-2.0",
24
34
  "dependencies": {
25
- "tencentcloud-sdk-nodejs-common": "^4.0.488",
35
+ "tencentcloud-sdk-nodejs-common": "*",
26
36
  "tslib": "1.13.0"
27
37
  },
28
38
  "directories": {
@@ -35,14 +45,22 @@
35
45
  },
36
46
  "devDependencies": {
37
47
  "@types/form-data": "^2.5.0",
48
+ "@types/json-bigint": "^1.0.1",
38
49
  "@types/node": "^14.0.26",
39
50
  "@types/node-fetch": "^2.5.7",
51
+ "@types/uuid": "^9.0.8",
40
52
  "@typescript-eslint/eslint-plugin": "^2.34.0",
41
53
  "@typescript-eslint/parser": "^2.34.0",
54
+ "babel-eslint": "^10.0.2",
42
55
  "chai": "^4.2.0",
56
+ "concurrently": "^6.5.1",
57
+ "esbuild": "^0.25.0",
43
58
  "eslint": "^6.8.0",
44
- "mocha": "^8.1.1",
59
+ "eslint-plugin-react": "^7.17.0",
60
+ "mocha": "^8.4.0",
61
+ "prettier": "^2.3.0",
62
+ "rimraf": "^5.0.10",
45
63
  "ts-node": "^8.10.2",
46
64
  "typescript": "^3.9.7"
47
65
  }
48
- }
66
+ }
@@ -101,11 +101,10 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
101
101
  */
102
102
  DetachLoadBalancers(req: DetachLoadBalancersRequest, cb?: (error: string, rep: DetachLoadBalancersResponse) => void): Promise<DetachLoadBalancersResponse>;
103
103
  /**
104
- * 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。
105
- * 仅支持添加处于`RUNNING`(运行中)或`STOPPED`(已关机)状态的 CVM 实例
106
- * 添加的 CVM 实例需要和伸缩组 VPC 网络一致
107
-
108
- */
104
+ * 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。
105
+ * 仅支持添加处于`RUNNING`(运行中)或`STOPPED`(已关机)状态的 CVM 实例
106
+ * 添加的 CVM 实例需要和伸缩组 VPC 网络一致
107
+ */
109
108
  AttachInstances(req: AttachInstancesRequest, cb?: (error: string, rep: AttachInstancesResponse) => void): Promise<AttachInstancesResponse>;
110
109
  /**
111
110
  * 本接口(DescribeScalingPolicies)用于查询告警触发策略。
@@ -381,7 +380,8 @@ export declare class Client extends TencentCloudCommon.AbstractClient {
381
380
  ResumeInstanceRefresh(req: ResumeInstanceRefreshRequest, cb?: (error: string, rep: ResumeInstanceRefreshResponse) => void): Promise<ResumeInstanceRefreshResponse>;
382
381
  /**
383
382
  * 取消伸缩组的实例刷新活动。
384
- * 已刷新/正在刷新的批次不受影响,待刷新批次被取消
383
+ * 已刷新的批次不受影响,待刷新批次被取消
384
+ * 如存在正在刷新的批次,不允许取消;可先暂停活动,等待当前批次结束后再取消
385
385
  * 刷新失败的实例保持备用中状态,需用户手动处理后尝试退出备用中状态或销毁
386
386
  * 取消后不允许回滚操作,也不支持恢复操作
387
387
  * 因 maxSurge 参数而临时扩容的实例在取消后会自动销毁
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Client = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
5
6
  /*
6
7
  * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
@@ -18,7 +19,7 @@ exports.Client = void 0;
18
19
  * specific language governing permissions and limitations
19
20
  * under the License.
20
21
  */
21
- const TencentCloudCommon = require("tencentcloud-sdk-nodejs-common");
22
+ const TencentCloudCommon = tslib_1.__importStar(require("tencentcloud-sdk-nodejs-common"));
22
23
  /**
23
24
  * as client
24
25
  * @class
@@ -154,11 +155,10 @@ class Client extends TencentCloudCommon.AbstractClient {
154
155
  return this.request("DetachLoadBalancers", req, cb);
155
156
  }
156
157
  /**
157
- * 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。
158
- * 仅支持添加处于`RUNNING`(运行中)或`STOPPED`(已关机)状态的 CVM 实例
159
- * 添加的 CVM 实例需要和伸缩组 VPC 网络一致
160
-
161
- */
158
+ * 本接口(AttachInstances)用于将 CVM 实例添加到伸缩组。
159
+ * 仅支持添加处于`RUNNING`(运行中)或`STOPPED`(已关机)状态的 CVM 实例
160
+ * 添加的 CVM 实例需要和伸缩组 VPC 网络一致
161
+ */
162
162
  async AttachInstances(req, cb) {
163
163
  return this.request("AttachInstances", req, cb);
164
164
  }
@@ -512,7 +512,8 @@ class Client extends TencentCloudCommon.AbstractClient {
512
512
  }
513
513
  /**
514
514
  * 取消伸缩组的实例刷新活动。
515
- * 已刷新/正在刷新的批次不受影响,待刷新批次被取消
515
+ * 已刷新的批次不受影响,待刷新批次被取消
516
+ * 如存在正在刷新的批次,不允许取消;可先暂停活动,等待当前批次结束后再取消
516
517
  * 刷新失败的实例保持备用中状态,需用户手动处理后尝试退出备用中状态或销毁
517
518
  * 取消后不允许回滚操作,也不支持恢复操作
518
519
  * 因 maxSurge 参数而临时扩容的实例在取消后会自动销毁