tencentcloud-sdk-nodejs 4.1.218 → 4.1.220
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/es/common/abstract_client.js +1 -0
- package/es/common/credential.js +7 -4
- package/es/common/http/http_connection.js +19 -14
- package/es/common/sdk_version.js +1 -1
- package/es/services/bi/v20220105/bi_client.js +43 -4
- package/es/services/emr/v20190103/emr_client.js +3 -0
- package/es/services/es/v20180416/es_client.js +8 -2
- package/es/services/ess/v20201111/ess_client.js +3 -0
- package/es/services/waf/v20180125/waf_client.js +55 -10
- package/package.json +2 -2
- package/tencentcloud/common/abstract_client.d.ts +5 -0
- package/tencentcloud/common/abstract_client.js +1 -0
- package/tencentcloud/common/credential.js +7 -4
- package/tencentcloud/common/http/http_connection.d.ts +2 -1
- package/tencentcloud/common/http/http_connection.js +19 -14
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/ams/v20201229/ams_models.d.ts +70 -22
- package/tencentcloud/services/apm/v20210622/apm_models.d.ts +23 -47
- package/tencentcloud/services/bi/v20220105/bi_client.d.ts +57 -5
- package/tencentcloud/services/bi/v20220105/bi_client.js +84 -6
- package/tencentcloud/services/bi/v20220105/bi_models.d.ts +986 -129
- package/tencentcloud/services/billing/v20180709/billing_models.d.ts +280 -404
- package/tencentcloud/services/cdb/v20170320/cdb_models.d.ts +86 -102
- package/tencentcloud/services/cdwch/v20200915/cdwch_models.d.ts +4 -0
- package/tencentcloud/services/cfw/v20190904/cfw_models.d.ts +65 -24
- package/tencentcloud/services/cls/v20201016/cls_models.d.ts +12 -0
- package/tencentcloud/services/dc/v20180410/dc_models.d.ts +13 -9
- package/tencentcloud/services/emr/v20190103/emr_client.d.ts +5 -1
- package/tencentcloud/services/emr/v20190103/emr_client.js +6 -0
- package/tencentcloud/services/emr/v20190103/emr_models.d.ts +329 -72
- package/tencentcloud/services/es/v20180416/es_client.d.ts +11 -3
- package/tencentcloud/services/es/v20180416/es_client.js +15 -3
- package/tencentcloud/services/es/v20180416/es_models.d.ts +48 -18
- package/tencentcloud/services/ess/v20201111/ess_client.d.ts +21 -1
- package/tencentcloud/services/ess/v20201111/ess_client.js +22 -0
- package/tencentcloud/services/ess/v20201111/ess_models.d.ts +82 -44
- package/tencentcloud/services/ft/v20200304/ft_models.d.ts +8 -4
- package/tencentcloud/services/hai/v20230812/hai_models.d.ts +9 -1
- package/tencentcloud/services/ims/v20201229/ims_models.d.ts +8 -0
- package/tencentcloud/services/ioa/v20220601/ioa_models.d.ts +2 -2
- package/tencentcloud/services/iss/v20230517/iss_models.d.ts +1 -1
- package/tencentcloud/services/monitor/v20180724/monitor_models.d.ts +46 -34
- package/tencentcloud/services/postgres/v20170312/postgres_models.d.ts +106 -25
- package/tencentcloud/services/rum/v20210622/rum_models.d.ts +211 -211
- package/tencentcloud/services/vclm/v20240523/vclm_models.d.ts +95 -19
- package/tencentcloud/services/vod/v20180717/vod_models.d.ts +9 -12
- package/tencentcloud/services/waf/v20180125/waf_client.d.ts +71 -11
- package/tencentcloud/services/waf/v20180125/waf_client.js +105 -15
- package/tencentcloud/services/waf/v20180125/waf_models.d.ts +1273 -433
package/es/common/credential.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
+
import { promisify } from "util";
|
|
2
3
|
import path from "path";
|
|
3
4
|
import { homedir } from "os";
|
|
4
5
|
import { parse } from "ini";
|
|
@@ -111,7 +112,7 @@ export class OIDCRoleArnCredential {
|
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
initFromTke() {
|
|
115
|
+
async initFromTke() {
|
|
115
116
|
const region = process.env.TKE_REGION;
|
|
116
117
|
if (!region) {
|
|
117
118
|
throw new Error("env TKE_REGION not exist");
|
|
@@ -126,7 +127,7 @@ export class OIDCRoleArnCredential {
|
|
|
126
127
|
}
|
|
127
128
|
let wbIdentityToken;
|
|
128
129
|
try {
|
|
129
|
-
wbIdentityToken = fs.
|
|
130
|
+
wbIdentityToken = (await promisify(fs.readFile)(tokenFile)).toString();
|
|
130
131
|
}
|
|
131
132
|
catch (error) {
|
|
132
133
|
throw new Error(`failed to read token file: ${error.message}`);
|
|
@@ -146,14 +147,16 @@ export class OIDCRoleArnCredential {
|
|
|
146
147
|
async getCredentialWithStsAssumeRoleWithWebIdentity() {
|
|
147
148
|
try {
|
|
148
149
|
if (this.isTke) {
|
|
149
|
-
this.initFromTke();
|
|
150
|
+
await this.initFromTke();
|
|
150
151
|
}
|
|
151
152
|
const { endpoint, version, action, region, clientConfig, assumeRoleWithWebIdentityParams } = this;
|
|
152
153
|
const client = new CommonClient(endpoint, version, {
|
|
153
154
|
region: region,
|
|
154
155
|
...clientConfig,
|
|
155
156
|
});
|
|
156
|
-
const result = await client.request(action, assumeRoleWithWebIdentityParams
|
|
157
|
+
const result = await client.request(action, assumeRoleWithWebIdentityParams, {
|
|
158
|
+
skipSign: true,
|
|
159
|
+
});
|
|
157
160
|
return {
|
|
158
161
|
TmpSecretId: result.Credentials.TmpSecretId,
|
|
159
162
|
TmpSecretKey: result.Credentials.TmpSecretKey,
|
|
@@ -26,7 +26,7 @@ export class HttpConnection {
|
|
|
26
26
|
}
|
|
27
27
|
return await fetch(url, config);
|
|
28
28
|
}
|
|
29
|
-
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, agent, proxy, signal, }) {
|
|
29
|
+
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, agent, proxy, signal, skipSign = false, }) {
|
|
30
30
|
await convertReadStreamToBuffer(data);
|
|
31
31
|
data = deepRemoveNull(data);
|
|
32
32
|
const timestamp = parseInt(String(new Date().getTime() / 1000));
|
|
@@ -83,19 +83,24 @@ export class HttpConnection {
|
|
|
83
83
|
config.body = form;
|
|
84
84
|
config.headers = Object.assign({}, config.headers, form.getHeaders());
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
86
|
+
if (skipSign) {
|
|
87
|
+
config.headers["Authorization"] = "SKIP";
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const signature = Sign.sign3({
|
|
91
|
+
method,
|
|
92
|
+
url,
|
|
93
|
+
payload,
|
|
94
|
+
timestamp,
|
|
95
|
+
service,
|
|
96
|
+
secretId,
|
|
97
|
+
secretKey,
|
|
98
|
+
multipart,
|
|
99
|
+
boundary: form ? form.getBoundary() : undefined,
|
|
100
|
+
headers: config.headers,
|
|
101
|
+
});
|
|
102
|
+
config.headers["Authorization"] = signature;
|
|
103
|
+
}
|
|
99
104
|
return await fetch(url, config);
|
|
100
105
|
}
|
|
101
106
|
}
|
package/es/common/sdk_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const sdkVersion = "4.1.
|
|
1
|
+
export const sdkVersion = "4.1.220";
|
|
@@ -15,6 +15,9 @@ export class Client extends AbstractClient {
|
|
|
15
15
|
async CreateDatasource(req, cb) {
|
|
16
16
|
return this.request("CreateDatasource", req, cb);
|
|
17
17
|
}
|
|
18
|
+
async DescribeUserGroupTreeList(req, cb) {
|
|
19
|
+
return this.request("DescribeUserGroupTreeList", req, cb);
|
|
20
|
+
}
|
|
18
21
|
async CreatePermissionRanks(req, cb) {
|
|
19
22
|
return this.request("CreatePermissionRanks", req, cb);
|
|
20
23
|
}
|
|
@@ -24,6 +27,9 @@ export class Client extends AbstractClient {
|
|
|
24
27
|
async CreateProject(req, cb) {
|
|
25
28
|
return this.request("CreateProject", req, cb);
|
|
26
29
|
}
|
|
30
|
+
async DeleteUserGroupMember(req, cb) {
|
|
31
|
+
return this.request("DeleteUserGroupMember", req, cb);
|
|
32
|
+
}
|
|
27
33
|
async CreateDatasourceCloud(req, cb) {
|
|
28
34
|
return this.request("CreateDatasourceCloud", req, cb);
|
|
29
35
|
}
|
|
@@ -33,12 +39,18 @@ export class Client extends AbstractClient {
|
|
|
33
39
|
async ModifyUserRole(req, cb) {
|
|
34
40
|
return this.request("ModifyUserRole", req, cb);
|
|
35
41
|
}
|
|
36
|
-
async
|
|
37
|
-
return this.request("
|
|
42
|
+
async DescribeResourceUserGroupPageList(req, cb) {
|
|
43
|
+
return this.request("DescribeResourceUserGroupPageList", req, cb);
|
|
44
|
+
}
|
|
45
|
+
async DeleteUserGroup(req, cb) {
|
|
46
|
+
return this.request("DeleteUserGroup", req, cb);
|
|
38
47
|
}
|
|
39
48
|
async CreateEmbedToken(req, cb) {
|
|
40
49
|
return this.request("CreateEmbedToken", req, cb);
|
|
41
50
|
}
|
|
51
|
+
async DescribeUserGroupInfo(req, cb) {
|
|
52
|
+
return this.request("DescribeUserGroupInfo", req, cb);
|
|
53
|
+
}
|
|
42
54
|
async CreateUserRole(req, cb) {
|
|
43
55
|
return this.request("CreateUserRole", req, cb);
|
|
44
56
|
}
|
|
@@ -48,24 +60,45 @@ export class Client extends AbstractClient {
|
|
|
48
60
|
async DeleteUserRole(req, cb) {
|
|
49
61
|
return this.request("DeleteUserRole", req, cb);
|
|
50
62
|
}
|
|
63
|
+
async ModifyUserGroup(req, cb) {
|
|
64
|
+
return this.request("ModifyUserGroup", req, cb);
|
|
65
|
+
}
|
|
51
66
|
async ModifyProject(req, cb) {
|
|
52
67
|
return this.request("ModifyProject", req, cb);
|
|
53
68
|
}
|
|
54
69
|
async DescribeUserRoleList(req, cb) {
|
|
55
70
|
return this.request("DescribeUserRoleList", req, cb);
|
|
56
71
|
}
|
|
72
|
+
async CreateUserGroup(req, cb) {
|
|
73
|
+
return this.request("CreateUserGroup", req, cb);
|
|
74
|
+
}
|
|
57
75
|
async DescribePageWidgetList(req, cb) {
|
|
58
76
|
return this.request("DescribePageWidgetList", req, cb);
|
|
59
77
|
}
|
|
78
|
+
async ModifyUserRoleProject(req, cb) {
|
|
79
|
+
return this.request("ModifyUserRoleProject", req, cb);
|
|
80
|
+
}
|
|
81
|
+
async ModifyUserDetailInfo(req, cb) {
|
|
82
|
+
return this.request("ModifyUserDetailInfo", req, cb);
|
|
83
|
+
}
|
|
84
|
+
async CreateUserGroupMember(req, cb) {
|
|
85
|
+
return this.request("CreateUserGroupMember", req, cb);
|
|
86
|
+
}
|
|
60
87
|
async DescribeUserRoleProjectList(req, cb) {
|
|
61
88
|
return this.request("DescribeUserRoleProjectList", req, cb);
|
|
62
89
|
}
|
|
90
|
+
async QueryUserGroupMember(req, cb) {
|
|
91
|
+
return this.request("QueryUserGroupMember", req, cb);
|
|
92
|
+
}
|
|
63
93
|
async ModifyDatasourceCloud(req, cb) {
|
|
64
94
|
return this.request("ModifyDatasourceCloud", req, cb);
|
|
65
95
|
}
|
|
66
96
|
async ClearEmbedToken(req, cb) {
|
|
67
97
|
return this.request("ClearEmbedToken", req, cb);
|
|
68
98
|
}
|
|
99
|
+
async DescribeUserGroupMemberList(req, cb) {
|
|
100
|
+
return this.request("DescribeUserGroupMemberList", req, cb);
|
|
101
|
+
}
|
|
69
102
|
async CreateUserRoleProject(req, cb) {
|
|
70
103
|
return this.request("CreateUserRoleProject", req, cb);
|
|
71
104
|
}
|
|
@@ -81,11 +114,17 @@ export class Client extends AbstractClient {
|
|
|
81
114
|
async DescribeUserProjectList(req, cb) {
|
|
82
115
|
return this.request("DescribeUserProjectList", req, cb);
|
|
83
116
|
}
|
|
117
|
+
async ModifyResourceUserGroupResource(req, cb) {
|
|
118
|
+
return this.request("ModifyResourceUserGroupResource", req, cb);
|
|
119
|
+
}
|
|
120
|
+
async ExportScreenPage(req, cb) {
|
|
121
|
+
return this.request("ExportScreenPage", req, cb);
|
|
122
|
+
}
|
|
84
123
|
async DeleteProject(req, cb) {
|
|
85
124
|
return this.request("DeleteProject", req, cb);
|
|
86
125
|
}
|
|
87
|
-
async
|
|
88
|
-
return this.request("
|
|
126
|
+
async ModifyResourceUserGroup(req, cb) {
|
|
127
|
+
return this.request("ModifyResourceUserGroup", req, cb);
|
|
89
128
|
}
|
|
90
129
|
async DescribeProjectList(req, cb) {
|
|
91
130
|
return this.request("DescribeProjectList", req, cb);
|
|
@@ -207,6 +207,9 @@ export class Client extends AbstractClient {
|
|
|
207
207
|
async DescribeEmrApplicationStatics(req, cb) {
|
|
208
208
|
return this.request("DescribeEmrApplicationStatics", req, cb);
|
|
209
209
|
}
|
|
210
|
+
async InstallSoftware(req, cb) {
|
|
211
|
+
return this.request("InstallSoftware", req, cb);
|
|
212
|
+
}
|
|
210
213
|
async DescribeSLInstance(req, cb) {
|
|
211
214
|
return this.request("DescribeSLInstance", req, cb);
|
|
212
215
|
}
|
|
@@ -81,8 +81,8 @@ export class Client extends AbstractClient {
|
|
|
81
81
|
async CheckMigrateIndexMetaData(req, cb) {
|
|
82
82
|
return this.request("CheckMigrateIndexMetaData", req, cb);
|
|
83
83
|
}
|
|
84
|
-
async
|
|
85
|
-
return this.request("
|
|
84
|
+
async RequestInstances(req, cb) {
|
|
85
|
+
return this.request("RequestInstances", req, cb);
|
|
86
86
|
}
|
|
87
87
|
async DeleteServerlessInstance(req, cb) {
|
|
88
88
|
return this.request("DeleteServerlessInstance", req, cb);
|
|
@@ -147,6 +147,9 @@ export class Client extends AbstractClient {
|
|
|
147
147
|
async QueryIpTraceLog(req, cb) {
|
|
148
148
|
return this.request("QueryIpTraceLog", req, cb);
|
|
149
149
|
}
|
|
150
|
+
async RequestInstancesByGet(req, cb) {
|
|
151
|
+
return this.request("RequestInstancesByGet", req, cb);
|
|
152
|
+
}
|
|
150
153
|
async GetIpTraceStatus(req, cb) {
|
|
151
154
|
return this.request("GetIpTraceStatus", req, cb);
|
|
152
155
|
}
|
|
@@ -213,6 +216,9 @@ export class Client extends AbstractClient {
|
|
|
213
216
|
async DescribeLogstashInstanceOperations(req, cb) {
|
|
214
217
|
return this.request("DescribeLogstashInstanceOperations", req, cb);
|
|
215
218
|
}
|
|
219
|
+
async UpdateIpTraceStatus(req, cb) {
|
|
220
|
+
return this.request("UpdateIpTraceStatus", req, cb);
|
|
221
|
+
}
|
|
216
222
|
async InquirePriceRenewInstance(req, cb) {
|
|
217
223
|
return this.request("InquirePriceRenewInstance", req, cb);
|
|
218
224
|
}
|
|
@@ -129,6 +129,9 @@ export class Client extends AbstractClient {
|
|
|
129
129
|
async DescribeOrganizationAuthStatus(req, cb) {
|
|
130
130
|
return this.request("DescribeOrganizationAuthStatus", req, cb);
|
|
131
131
|
}
|
|
132
|
+
async OperateFlowRemarks(req, cb) {
|
|
133
|
+
return this.request("OperateFlowRemarks", req, cb);
|
|
134
|
+
}
|
|
132
135
|
async ModifyExtendedService(req, cb) {
|
|
133
136
|
return this.request("ModifyExtendedService", req, cb);
|
|
134
137
|
}
|
|
@@ -6,6 +6,9 @@ export class Client extends AbstractClient {
|
|
|
6
6
|
async DescribeAttackType(req, cb) {
|
|
7
7
|
return this.request("DescribeAttackType", req, cb);
|
|
8
8
|
}
|
|
9
|
+
async DeleteBatchCustomRule(req, cb) {
|
|
10
|
+
return this.request("DeleteBatchCustomRule", req, cb);
|
|
11
|
+
}
|
|
9
12
|
async DescribePeakPoints(req, cb) {
|
|
10
13
|
return this.request("DescribePeakPoints", req, cb);
|
|
11
14
|
}
|
|
@@ -15,6 +18,9 @@ export class Client extends AbstractClient {
|
|
|
15
18
|
async DescribeExports(req, cb) {
|
|
16
19
|
return this.request("DescribeExports", req, cb);
|
|
17
20
|
}
|
|
21
|
+
async ModifyBatchCustomRule(req, cb) {
|
|
22
|
+
return this.request("ModifyBatchCustomRule", req, cb);
|
|
23
|
+
}
|
|
18
24
|
async DescribeDomains(req, cb) {
|
|
19
25
|
return this.request("DescribeDomains", req, cb);
|
|
20
26
|
}
|
|
@@ -111,12 +117,18 @@ export class Client extends AbstractClient {
|
|
|
111
117
|
async DeleteCCRule(req, cb) {
|
|
112
118
|
return this.request("DeleteCCRule", req, cb);
|
|
113
119
|
}
|
|
120
|
+
async DeleteProtectGroupDomain(req, cb) {
|
|
121
|
+
return this.request("DeleteProtectGroupDomain", req, cb);
|
|
122
|
+
}
|
|
114
123
|
async DescribeAntiInfoLeakageRules(req, cb) {
|
|
115
124
|
return this.request("DescribeAntiInfoLeakageRules", req, cb);
|
|
116
125
|
}
|
|
117
126
|
async SearchAccessLog(req, cb) {
|
|
118
127
|
return this.request("SearchAccessLog", req, cb);
|
|
119
128
|
}
|
|
129
|
+
async ModifyBatchCustomWhiteRule(req, cb) {
|
|
130
|
+
return this.request("ModifyBatchCustomWhiteRule", req, cb);
|
|
131
|
+
}
|
|
120
132
|
async DescribeWafThreatenIntelligence(req, cb) {
|
|
121
133
|
return this.request("DescribeWafThreatenIntelligence", req, cb);
|
|
122
134
|
}
|
|
@@ -174,14 +186,14 @@ export class Client extends AbstractClient {
|
|
|
174
186
|
async ModifyHostStatus(req, cb) {
|
|
175
187
|
return this.request("ModifyHostStatus", req, cb);
|
|
176
188
|
}
|
|
177
|
-
async
|
|
178
|
-
return this.request("
|
|
189
|
+
async AddBatchCustomWhiteRule(req, cb) {
|
|
190
|
+
return this.request("AddBatchCustomWhiteRule", req, cb);
|
|
179
191
|
}
|
|
180
192
|
async ModifyBotSceneUCBRule(req, cb) {
|
|
181
193
|
return this.request("ModifyBotSceneUCBRule", req, cb);
|
|
182
194
|
}
|
|
183
|
-
async
|
|
184
|
-
return this.request("
|
|
195
|
+
async DeleteBatchCustomWhiteRule(req, cb) {
|
|
196
|
+
return this.request("DeleteBatchCustomWhiteRule", req, cb);
|
|
185
197
|
}
|
|
186
198
|
async UpsertIpAccessControl(req, cb) {
|
|
187
199
|
return this.request("UpsertIpAccessControl", req, cb);
|
|
@@ -240,8 +252,8 @@ export class Client extends AbstractClient {
|
|
|
240
252
|
async DescribeCCRule(req, cb) {
|
|
241
253
|
return this.request("DescribeCCRule", req, cb);
|
|
242
254
|
}
|
|
243
|
-
async
|
|
244
|
-
return this.request("
|
|
255
|
+
async DescribeBatchCustomRuleList(req, cb) {
|
|
256
|
+
return this.request("DescribeBatchCustomRuleList", req, cb);
|
|
245
257
|
}
|
|
246
258
|
async DescribePeakValue(req, cb) {
|
|
247
259
|
return this.request("DescribePeakValue", req, cb);
|
|
@@ -270,6 +282,9 @@ export class Client extends AbstractClient {
|
|
|
270
282
|
async GetOrganizationRole(req, cb) {
|
|
271
283
|
return this.request("GetOrganizationRole", req, cb);
|
|
272
284
|
}
|
|
285
|
+
async ModifyOwaspRuleTypeAction(req, cb) {
|
|
286
|
+
return this.request("ModifyOwaspRuleTypeAction", req, cb);
|
|
287
|
+
}
|
|
273
288
|
async ModifyOwaspWhiteRule(req, cb) {
|
|
274
289
|
return this.request("ModifyOwaspWhiteRule", req, cb);
|
|
275
290
|
}
|
|
@@ -282,6 +297,9 @@ export class Client extends AbstractClient {
|
|
|
282
297
|
async AddSpartaProtection(req, cb) {
|
|
283
298
|
return this.request("AddSpartaProtection", req, cb);
|
|
284
299
|
}
|
|
300
|
+
async ModifyBatchCustomRuleStatus(req, cb) {
|
|
301
|
+
return this.request("ModifyBatchCustomRuleStatus", req, cb);
|
|
302
|
+
}
|
|
285
303
|
async DescribePolicyStatus(req, cb) {
|
|
286
304
|
return this.request("DescribePolicyStatus", req, cb);
|
|
287
305
|
}
|
|
@@ -309,9 +327,15 @@ export class Client extends AbstractClient {
|
|
|
309
327
|
async ModifyBotStatus(req, cb) {
|
|
310
328
|
return this.request("ModifyBotStatus", req, cb);
|
|
311
329
|
}
|
|
330
|
+
async AddBatchCustomRule(req, cb) {
|
|
331
|
+
return this.request("AddBatchCustomRule", req, cb);
|
|
332
|
+
}
|
|
312
333
|
async ModifyProtectionStatus(req, cb) {
|
|
313
334
|
return this.request("ModifyProtectionStatus", req, cb);
|
|
314
335
|
}
|
|
336
|
+
async DescribeProtectGroup(req, cb) {
|
|
337
|
+
return this.request("DescribeProtectGroup", req, cb);
|
|
338
|
+
}
|
|
315
339
|
async DescribeCiphersDetail(req, cb) {
|
|
316
340
|
return this.request("DescribeCiphersDetail", req, cb);
|
|
317
341
|
}
|
|
@@ -363,6 +387,9 @@ export class Client extends AbstractClient {
|
|
|
363
387
|
async CreateRateLimitV2(req, cb) {
|
|
364
388
|
return this.request("CreateRateLimitV2", req, cb);
|
|
365
389
|
}
|
|
390
|
+
async DescribeUserClbWafRegions(req, cb) {
|
|
391
|
+
return this.request("DescribeUserClbWafRegions", req, cb);
|
|
392
|
+
}
|
|
366
393
|
async DescribeObjects(req, cb) {
|
|
367
394
|
return this.request("DescribeObjects", req, cb);
|
|
368
395
|
}
|
|
@@ -375,6 +402,9 @@ export class Client extends AbstractClient {
|
|
|
375
402
|
async DeleteAttackWhiteRule(req, cb) {
|
|
376
403
|
return this.request("DeleteAttackWhiteRule", req, cb);
|
|
377
404
|
}
|
|
405
|
+
async CreateProtectGroup(req, cb) {
|
|
406
|
+
return this.request("CreateProtectGroup", req, cb);
|
|
407
|
+
}
|
|
378
408
|
async DescribeIpAccessControl(req, cb) {
|
|
379
409
|
return this.request("DescribeIpAccessControl", req, cb);
|
|
380
410
|
}
|
|
@@ -426,6 +456,9 @@ export class Client extends AbstractClient {
|
|
|
426
456
|
async DescribeOwaspRules(req, cb) {
|
|
427
457
|
return this.request("DescribeOwaspRules", req, cb);
|
|
428
458
|
}
|
|
459
|
+
async ModifySpartaProtectionMode(req, cb) {
|
|
460
|
+
return this.request("ModifySpartaProtectionMode", req, cb);
|
|
461
|
+
}
|
|
429
462
|
async DeleteSession(req, cb) {
|
|
430
463
|
return this.request("DeleteSession", req, cb);
|
|
431
464
|
}
|
|
@@ -471,12 +504,18 @@ export class Client extends AbstractClient {
|
|
|
471
504
|
async DeleteAccessExport(req, cb) {
|
|
472
505
|
return this.request("DeleteAccessExport", req, cb);
|
|
473
506
|
}
|
|
507
|
+
async DescribeBatchCustomWhiteRules(req, cb) {
|
|
508
|
+
return this.request("DescribeBatchCustomWhiteRules", req, cb);
|
|
509
|
+
}
|
|
474
510
|
async DeleteDomainWhiteRules(req, cb) {
|
|
475
511
|
return this.request("DeleteDomainWhiteRules", req, cb);
|
|
476
512
|
}
|
|
477
513
|
async DescribeDomainVerifyResult(req, cb) {
|
|
478
514
|
return this.request("DescribeDomainVerifyResult", req, cb);
|
|
479
515
|
}
|
|
516
|
+
async ModifyAttackWhiteRule(req, cb) {
|
|
517
|
+
return this.request("ModifyAttackWhiteRule", req, cb);
|
|
518
|
+
}
|
|
480
519
|
async CreateAccessExport(req, cb) {
|
|
481
520
|
return this.request("CreateAccessExport", req, cb);
|
|
482
521
|
}
|
|
@@ -486,8 +525,8 @@ export class Client extends AbstractClient {
|
|
|
486
525
|
async DescribeInstances(req, cb) {
|
|
487
526
|
return this.request("DescribeInstances", req, cb);
|
|
488
527
|
}
|
|
489
|
-
async
|
|
490
|
-
return this.request("
|
|
528
|
+
async DeleteProtectGroup(req, cb) {
|
|
529
|
+
return this.request("DeleteProtectGroup", req, cb);
|
|
491
530
|
}
|
|
492
531
|
async AddCustomRule(req, cb) {
|
|
493
532
|
return this.request("AddCustomRule", req, cb);
|
|
@@ -537,14 +576,17 @@ export class Client extends AbstractClient {
|
|
|
537
576
|
async DescribePorts(req, cb) {
|
|
538
577
|
return this.request("DescribePorts", req, cb);
|
|
539
578
|
}
|
|
579
|
+
async ModifyProtectGroup(req, cb) {
|
|
580
|
+
return this.request("ModifyProtectGroup", req, cb);
|
|
581
|
+
}
|
|
540
582
|
async ModifyHostMode(req, cb) {
|
|
541
583
|
return this.request("ModifyHostMode", req, cb);
|
|
542
584
|
}
|
|
543
585
|
async ModifyDomainPostAction(req, cb) {
|
|
544
586
|
return this.request("ModifyDomainPostAction", req, cb);
|
|
545
587
|
}
|
|
546
|
-
async
|
|
547
|
-
return this.request("
|
|
588
|
+
async DescribeModuleStatus(req, cb) {
|
|
589
|
+
return this.request("DescribeModuleStatus", req, cb);
|
|
548
590
|
}
|
|
549
591
|
async UpsertCCRule(req, cb) {
|
|
550
592
|
return this.request("UpsertCCRule", req, cb);
|
|
@@ -600,6 +642,9 @@ export class Client extends AbstractClient {
|
|
|
600
642
|
async ModifyDomainIpv6Status(req, cb) {
|
|
601
643
|
return this.request("ModifyDomainIpv6Status", req, cb);
|
|
602
644
|
}
|
|
645
|
+
async ModifyBatchCustomWhiteRuleStatus(req, cb) {
|
|
646
|
+
return this.request("ModifyBatchCustomWhiteRuleStatus", req, cb);
|
|
647
|
+
}
|
|
603
648
|
async UpdateProtectionModes(req, cb) {
|
|
604
649
|
return this.request("UpdateProtectionModes", req, cb);
|
|
605
650
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tencentcloud-sdk-nodejs",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.220",
|
|
4
4
|
"description": "腾讯云 API NODEJS SDK",
|
|
5
5
|
"main": "./tencentcloud/index.js",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"form-data": "^3.0.4",
|
|
37
37
|
"get-stream": "^6.0.0",
|
|
38
38
|
"https-proxy-agent": "^5.0.0",
|
|
39
|
-
"ini": "^
|
|
39
|
+
"ini": "^2.0.0",
|
|
40
40
|
"is-stream": "^2.0.0",
|
|
41
41
|
"json-bigint": "^1.0.0",
|
|
42
42
|
"node-fetch": "^2.2.0",
|
|
@@ -16,6 +16,11 @@ export interface RequestOptions extends Partial<Pick<HttpProfile, "headers">> {
|
|
|
16
16
|
* Abort request signal
|
|
17
17
|
*/
|
|
18
18
|
signal?: AbortSignal;
|
|
19
|
+
/**
|
|
20
|
+
* Set Authorization with SKIP
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
skipSign?: boolean;
|
|
19
24
|
}
|
|
20
25
|
type ResponseData = any;
|
|
21
26
|
/**
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DefaultCredentialProvider = exports.OIDCRoleArnCredential = exports.CvmRoleCredential = exports.STSCredential = exports.ProfileCredential = exports.EnvironmentVariableCredential = exports.BasicCredential = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
+
const util_1 = require("util");
|
|
6
7
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
8
|
const os_1 = require("os");
|
|
8
9
|
const ini_1 = require("ini");
|
|
@@ -162,7 +163,7 @@ class OIDCRoleArnCredential {
|
|
|
162
163
|
};
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
|
-
initFromTke() {
|
|
166
|
+
async initFromTke() {
|
|
166
167
|
const region = process.env.TKE_REGION;
|
|
167
168
|
if (!region) {
|
|
168
169
|
throw new Error("env TKE_REGION not exist");
|
|
@@ -177,7 +178,7 @@ class OIDCRoleArnCredential {
|
|
|
177
178
|
}
|
|
178
179
|
let wbIdentityToken;
|
|
179
180
|
try {
|
|
180
|
-
wbIdentityToken = fs_1.default.
|
|
181
|
+
wbIdentityToken = (await (0, util_1.promisify)(fs_1.default.readFile)(tokenFile)).toString();
|
|
181
182
|
}
|
|
182
183
|
catch (error) {
|
|
183
184
|
throw new Error(`failed to read token file: ${error.message}`);
|
|
@@ -197,14 +198,16 @@ class OIDCRoleArnCredential {
|
|
|
197
198
|
async getCredentialWithStsAssumeRoleWithWebIdentity() {
|
|
198
199
|
try {
|
|
199
200
|
if (this.isTke) {
|
|
200
|
-
this.initFromTke();
|
|
201
|
+
await this.initFromTke();
|
|
201
202
|
}
|
|
202
203
|
const { endpoint, version, action, region, clientConfig, assumeRoleWithWebIdentityParams } = this;
|
|
203
204
|
const client = new common_client_1.CommonClient(endpoint, version, {
|
|
204
205
|
region: region,
|
|
205
206
|
...clientConfig,
|
|
206
207
|
});
|
|
207
|
-
const result = await client.request(action, assumeRoleWithWebIdentityParams
|
|
208
|
+
const result = await client.request(action, assumeRoleWithWebIdentityParams, {
|
|
209
|
+
skipSign: true,
|
|
210
|
+
});
|
|
208
211
|
return {
|
|
209
212
|
TmpSecretId: result.Credentials.TmpSecretId,
|
|
210
213
|
TmpSecretKey: result.Credentials.TmpSecretKey,
|
|
@@ -14,7 +14,7 @@ export declare class HttpConnection {
|
|
|
14
14
|
proxy?: string;
|
|
15
15
|
signal?: AbortSignal;
|
|
16
16
|
}): Promise<Response>;
|
|
17
|
-
static doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart, timeout, token, requestClient, language, headers, agent, proxy, signal, }: {
|
|
17
|
+
static doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart, timeout, token, requestClient, language, headers, agent, proxy, signal, skipSign, }: {
|
|
18
18
|
method: string;
|
|
19
19
|
url: string;
|
|
20
20
|
data: any;
|
|
@@ -33,5 +33,6 @@ export declare class HttpConnection {
|
|
|
33
33
|
agent?: Agent;
|
|
34
34
|
proxy?: string;
|
|
35
35
|
signal?: AbortSignal;
|
|
36
|
+
skipSign?: boolean;
|
|
36
37
|
}): Promise<Response>;
|
|
37
38
|
}
|
|
@@ -33,7 +33,7 @@ class HttpConnection {
|
|
|
33
33
|
}
|
|
34
34
|
return await (0, fetch_1.default)(url, config);
|
|
35
35
|
}
|
|
36
|
-
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, agent, proxy, signal, }) {
|
|
36
|
+
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, agent, proxy, signal, skipSign = false, }) {
|
|
37
37
|
// Convert readStream to Buffer to calculate the hash of the entire body
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
39
39
|
await convertReadStreamToBuffer(data);
|
|
@@ -94,19 +94,24 @@ class HttpConnection {
|
|
|
94
94
|
config.body = form;
|
|
95
95
|
config.headers = Object.assign({}, config.headers, form.getHeaders());
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
97
|
+
if (skipSign) {
|
|
98
|
+
config.headers["Authorization"] = "SKIP";
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const signature = sign_1.default.sign3({
|
|
102
|
+
method,
|
|
103
|
+
url,
|
|
104
|
+
payload,
|
|
105
|
+
timestamp,
|
|
106
|
+
service,
|
|
107
|
+
secretId,
|
|
108
|
+
secretKey,
|
|
109
|
+
multipart,
|
|
110
|
+
boundary: form ? form.getBoundary() : undefined,
|
|
111
|
+
headers: config.headers,
|
|
112
|
+
});
|
|
113
|
+
config.headers["Authorization"] = signature;
|
|
114
|
+
}
|
|
110
115
|
return await (0, fetch_1.default)(url, config);
|
|
111
116
|
}
|
|
112
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const sdkVersion = "4.1.
|
|
1
|
+
export declare const sdkVersion = "4.1.220";
|