@ucloud-sdks/ucloud-sdk-js 0.2.28 → 0.2.30

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.
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const client_1 = __importDefault(require("../../core/client"));
7
+ const request_1 = __importDefault(require("../../core/request"));
8
+ /**
9
+ * This client is used to call actions of **cloudwatch** service
10
+ */
11
+ class CloudWatchClient extends client_1.default {
12
+ constructor({ config, credential, }) {
13
+ super({ config, credential });
14
+ }
15
+ /**
16
+ * BindAlertStrategy - 绑定告警策略
17
+ *
18
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/bind_alert_strategy
19
+ */
20
+ bindAlertStrategy(request) {
21
+ const args = Object.assign({ Action: 'BindAlertStrategy' }, (request || {}));
22
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
23
+ }
24
+ /**
25
+ * CreateAlertStrategy - 创建告警策略
26
+ *
27
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/create_alert_strategy
28
+ */
29
+ createAlertStrategy(request) {
30
+ const args = Object.assign({ Action: 'CreateAlertStrategy' }, (request || {}));
31
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
32
+ }
33
+ /**
34
+ * CreateAlertStrategyTemplate - 新建条件模板
35
+ *
36
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/create_alert_strategy_template
37
+ */
38
+ createAlertStrategyTemplate(request) {
39
+ const args = Object.assign({ Action: 'CreateAlertStrategyTemplate' }, (request || {}));
40
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
41
+ }
42
+ /**
43
+ * DeleteAlertStrategyTemplate - 删除告警条件模板
44
+ *
45
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/delete_alert_strategy_template
46
+ */
47
+ deleteAlertStrategyTemplate(request) {
48
+ const args = Object.assign({ Action: 'DeleteAlertStrategyTemplate' }, (request || {}));
49
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
50
+ }
51
+ /**
52
+ * EnableAlertStrategy - 是否启用告警策略
53
+ *
54
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/enable_alert_strategy
55
+ */
56
+ enableAlertStrategy(request) {
57
+ const args = Object.assign({ Action: 'EnableAlertStrategy' }, (request || {}));
58
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
59
+ }
60
+ /**
61
+ * GetMetricDataAggregationMethod - 获取指标数据聚合方式
62
+ *
63
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/get_metric_data_aggregation_method
64
+ */
65
+ getMetricDataAggregationMethod(request) {
66
+ const args = Object.assign({ Action: 'GetMetricDataAggregationMethod' }, (request || {}));
67
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
68
+ }
69
+ /**
70
+ * GetProductMetrics - 获取云产品关联的指标列表
71
+ *
72
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/get_product_metrics
73
+ */
74
+ getProductMetrics(request) {
75
+ const args = Object.assign({ Action: 'GetProductMetrics' }, (request || {}));
76
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
77
+ }
78
+ /**
79
+ * ListAlertRecord - 获取时间段内的告警记录
80
+ *
81
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_record
82
+ */
83
+ listAlertRecord(request) {
84
+ const args = Object.assign({ Action: 'ListAlertRecord' }, (request || {}));
85
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
86
+ }
87
+ /**
88
+ * ListAlertStrategy - 获取告警策略列表
89
+ *
90
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_strategy
91
+ */
92
+ listAlertStrategy(request) {
93
+ const args = Object.assign({ Action: 'ListAlertStrategy' }, (request || {}));
94
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
95
+ }
96
+ /**
97
+ * ListAlertStrategyTemplate - 条件模板列表
98
+ *
99
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_strategy_template
100
+ */
101
+ listAlertStrategyTemplate(request) {
102
+ const args = Object.assign({ Action: 'ListAlertStrategyTemplate' }, (request || {}));
103
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
104
+ }
105
+ /**
106
+ * ListMonitorProduct - 获取监控对象类型列表
107
+ *
108
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/list_monitor_product
109
+ */
110
+ listMonitorProduct(request) {
111
+ const args = Object.assign({ Action: 'ListMonitorProduct' }, (request || {}));
112
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
113
+ }
114
+ /**
115
+ * ModifyAlertStrategyRemark - 修改告警策略备注
116
+ *
117
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/modify_alert_strategy_remark
118
+ */
119
+ modifyAlertStrategyRemark(request) {
120
+ const args = Object.assign({ Action: 'ModifyAlertStrategyRemark' }, (request || {}));
121
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
122
+ }
123
+ /**
124
+ * QueryMetricDataSet - 查询监控指标数据集
125
+ *
126
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/query_metric_data_set
127
+ */
128
+ queryMetricDataSet(request) {
129
+ const args = Object.assign({ Action: 'QueryMetricDataSet' }, (request || {}));
130
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
131
+ }
132
+ /**
133
+ * QueryMetricDataSummary - 获取资源看图属性列表
134
+ *
135
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/query_metric_data_summary
136
+ */
137
+ queryMetricDataSummary(request) {
138
+ const args = Object.assign({ Action: 'QueryMetricDataSummary' }, (request || {}));
139
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
140
+ }
141
+ /**
142
+ * UnBindAlertStrategy - 解绑告警策略
143
+ *
144
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/un_bind_alert_strategy
145
+ */
146
+ unBindAlertStrategy(request) {
147
+ const args = Object.assign({ Action: 'UnBindAlertStrategy' }, (request || {}));
148
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
149
+ }
150
+ /**
151
+ * UpdateAlertStrategy - 更新告警策略
152
+ *
153
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/update_alert_strategy
154
+ */
155
+ updateAlertStrategy(request) {
156
+ const args = Object.assign({ Action: 'UpdateAlertStrategy' }, (request || {}));
157
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
158
+ }
159
+ /**
160
+ * UpdateAlertStrategyTemplate - 编辑条件模板
161
+ *
162
+ * See also: https://docs.ucloud.cn/api/cloudwatch-api/update_alert_strategy_template
163
+ */
164
+ updateAlertStrategyTemplate(request) {
165
+ const args = Object.assign({ Action: 'UpdateAlertStrategyTemplate' }, (request || {}));
166
+ return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
167
+ }
168
+ }
169
+ exports.default = CloudWatchClient;
@@ -6,6 +6,7 @@ export declare class Client extends BaseClient {
6
6
  config: ConfigOptions;
7
7
  credential: CredentialOptions;
8
8
  });
9
+ cloudwatch(): any;
9
10
  cube(): any;
10
11
  ipsecvpn(): any;
11
12
  pathx(): any;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Client = void 0;
4
4
  const BaseClient = require('../core/client').default;
5
+ const CloudWatchClient = require('./cloudwatch').default;
5
6
  const CubeClient = require('./cube').default;
6
7
  const IPSecVPNClient = require('./ipsecvpn').default;
7
8
  const PathXClient = require('./pathx').default;
@@ -40,6 +41,12 @@ class Client extends BaseClient {
40
41
  constructor({ config, credential, }) {
41
42
  super({ config, credential });
42
43
  }
44
+ cloudwatch() {
45
+ return new CloudWatchClient({
46
+ config: this.config,
47
+ credential: this.credential,
48
+ });
49
+ }
43
50
  cube() {
44
51
  return new CubeClient({
45
52
  config: this.config,
@@ -176,6 +176,18 @@ export interface CreateUMInferAPIKeyRequest {
176
176
  * 是否开启推理日志
177
177
  */
178
178
  InferenceLogEnabled?: number;
179
+ /**
180
+ * API Key 过期时间,Unix 时间戳,单位为秒。传 -1 表示永不过期。
181
+ */
182
+ ExpireTime?: number;
183
+ /**
184
+ * 模型访问策略:whitelist 表示白名单模式,blacklist 表示黑名单模式。
185
+ */
186
+ ModelAccessMode?: string;
187
+ /**
188
+ * API Key 禁止访问的模型列表。内容为数组格式。
189
+ */
190
+ DeniedModels?: string;
179
191
  }
180
192
  /**
181
193
  * CreateUMInferAPIKey - 创建apikey
@@ -193,6 +205,14 @@ export interface CreateUMInferAPIKeyResponse {
193
205
  * 是否开启推理日志
194
206
  */
195
207
  InferenceLogEnabled: number;
208
+ /**
209
+ * 禁止访问的模型列表。当 ModelAccessMode=blacklist 时生效。
210
+ */
211
+ DeniedModels?: string[];
212
+ /**
213
+ * 模型访问策略。可选值:whitelist(白名单模式,默认)或 blacklist(黑名单模式)。
214
+ */
215
+ ModelAccessMode?: string;
196
216
  /**
197
217
  * 资源ID
198
218
  */
@@ -1758,6 +1778,14 @@ export interface ListUMInferAPIKeyResponse {
1758
1778
  * 是否开启推理日志
1759
1779
  */
1760
1780
  InferenceLogEnabled: number;
1781
+ /**
1782
+ * 禁止访问的模型列表。当 ModelAccessMode=blacklist 时生效。
1783
+ */
1784
+ DeniedModels?: string[];
1785
+ /**
1786
+ * 模型访问策略。可选值:whitelist(白名单模式,默认)或 blacklist(黑名单模式)。
1787
+ */
1788
+ ModelAccessMode?: string;
1761
1789
  /**
1762
1790
  * 资源ID
1763
1791
  */
@@ -2410,6 +2438,18 @@ export interface UpdateUMInferAPIKeyRequest {
2410
2438
  * 是否开启推理日志
2411
2439
  */
2412
2440
  InferenceLogEnabled?: number;
2441
+ /**
2442
+ * API Key 过期时间,Unix 时间戳,单位为秒。传 -1 表示永不过期。
2443
+ */
2444
+ ExpireTime?: number;
2445
+ /**
2446
+ * 模型访问策略。可选值:whitelist(白名单模式,默认)或 blacklist(黑名单模式)。
2447
+ */
2448
+ ModelAccessMode?: string;
2449
+ /**
2450
+ * 禁止访问的模型列表。当 ModelAccessMode=blacklist 时生效。数组类型,示例 ["gpt-4o", "sora-2"]
2451
+ */
2452
+ DeniedModels?: string;
2413
2453
  }
2414
2454
  /**
2415
2455
  * UpdateUMInferAPIKey - 更新apikey
@@ -135,12 +135,6 @@ export default class UKMSClient extends Client {
135
135
  * See also: https://docs.ucloud.cn/api/ukms-api/list_keys
136
136
  */
137
137
  listKeys(request?: ListKeysRequest): Promise<ListKeysResponse>;
138
- /**
139
- * ListScheduleDeletionKeys - 获取计划删除密钥列表,调用ScheduleKeyDeletion命令后进入此列表, 默认30天后正式删除。正式删除前可调用CancelScheduleKeyDeletion恢复
140
- *
141
- * See also: https://docs.ucloud.cn/api/ukms-api/list_schedule_deletion_keys
142
- */
143
- listScheduleDeletionKeys(request?: ListScheduleDeletionKeysRequest): Promise<ListScheduleDeletionKeysResponse>;
144
138
  /**
145
139
  * RotateKeyOnDemand - 立即触发一次密钥轮转。
146
140
  *
@@ -178,7 +172,7 @@ export default class UKMSClient extends Client {
178
172
  */
179
173
  verify(request?: VerifyRequest): Promise<VerifyResponse>;
180
174
  /**
181
- * VerifyMac - 验证签名
175
+ * VerifyMac - 验证指定消息、HMAC KMS 密钥和 MAC 算法的基于哈希的消息认证码 (HMAC)。为了验证 HMAC,VerifyMac 会使用您指定的消息、HMAC KMS 密钥和 MAC 算法计算 HMAC,并将计算出的 HMAC 与您指定的 HMAC 进行比较。如果两个 HMAC 完全相同,则验证成功;否则,验证失败。 验证结果表明,自计算 HMAC 以来,消息未发生更改,并且使用了指定的密钥来生成和验证 HMAC。
182
176
  *
183
177
  * See also: https://docs.ucloud.cn/api/ukms-api/verify_mac
184
178
  */
@@ -399,10 +393,6 @@ export interface DescribeKeyResponse {
399
393
  * 计划删除时间,Unix 时间戳。
400
394
  */
401
395
  DeletionDate?: number;
402
- /**
403
- * 密钥所属组织的数字 ID,来源于密钥关联的资源交易记录。
404
- */
405
- OrganizationId?: number;
406
396
  };
407
397
  }
408
398
  /**
@@ -586,6 +576,26 @@ export interface GenerateDataKeyPairRequest {
586
576
  * GenerateDataKeyPair - 创建数据密钥对
587
577
  */
588
578
  export interface GenerateDataKeyPairResponse {
579
+ /**
580
+ * 用于加密私钥的 KMS 密钥
581
+ */
582
+ KeyId?: string;
583
+ /**
584
+ * 生成的数据键对类型。
585
+ */
586
+ KeyPairSpec?: string;
587
+ /**
588
+ * 私钥的加密副本。
589
+ */
590
+ PrivateKeyCiphertextBlob?: string;
591
+ /**
592
+ * 私钥的明文副本。
593
+ */
594
+ PrivateKeyPlaintext?: string;
595
+ /**
596
+ * 公钥(明文)。
597
+ */
598
+ DataPublicKey?: string;
589
599
  }
590
600
  /**
591
601
  * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回)
@@ -595,6 +605,14 @@ export interface GenerateDataKeyPairWithoutPlaintextRequest {
595
605
  * 密钥ID
596
606
  */
597
607
  KeyId: string;
608
+ /**
609
+ * 指定生成的数据密钥对类型。
610
+ */
611
+ KeyPairSpec: string;
612
+ /**
613
+ * 指定加密私钥时使用的加密上下文。
614
+ */
615
+ EncryptionContext?: string;
598
616
  }
599
617
  /**
600
618
  * GenerateDataKeyPairWithoutPlaintext - 创建数据密钥对(无明文返回)
@@ -682,6 +700,10 @@ export interface GenerateRandomRequest {
682
700
  * GenerateRandom - 生成随机数
683
701
  */
684
702
  export interface GenerateRandomResponse {
703
+ /**
704
+ * 随机字节串。
705
+ */
706
+ Plaintext?: string;
685
707
  }
686
708
  /**
687
709
  * GetKeyRotationStatus - 查询密钥自动轮转状态。
@@ -933,89 +955,6 @@ export interface ListKeysResponse {
933
955
  */
934
956
  TotalCount: number;
935
957
  }
936
- /**
937
- * ListScheduleDeletionKeys - 获取计划删除密钥列表,调用ScheduleKeyDeletion命令后进入此列表, 默认30天后正式删除。正式删除前可调用CancelScheduleKeyDeletion恢复
938
- */
939
- export interface ListScheduleDeletionKeysRequest {
940
- /**
941
- * 输出列表起始位置,默认从0开始
942
- */
943
- Offset?: number;
944
- /**
945
- * 输出列表数量,默认返回200个
946
- */
947
- Limit?: number;
948
- /**
949
- * 列表排序方式, 可选项: "-created_time", "created_time","plan_delete_time","-plan_delete_time";默认按-plan_delete_time 计划删除时间升序返回
950
- */
951
- OrderBy?: string;
952
- /**
953
- * 按密钥 ID 或别名模糊过滤
954
- */
955
- Alias?: string;
956
- /**
957
- * UKMS 实例资源 ID
958
- */
959
- ResourceId?: string;
960
- /**
961
- * 排序方向,默认 desc
962
- */
963
- Sort?: string;
964
- }
965
- /**
966
- * ListScheduleDeletionKeys - 获取计划删除密钥列表,调用ScheduleKeyDeletion命令后进入此列表, 默认30天后正式删除。正式删除前可调用CancelScheduleKeyDeletion恢复
967
- */
968
- export interface ListScheduleDeletionKeysResponse {
969
- /**
970
- * 主密钥信息组成的列表
971
- */
972
- Objects: {
973
- /**
974
- * CMK 的唯一标识符
975
- */
976
- KeyId: string;
977
- /**
978
- * 密钥类型,如RSA、EC、DES
979
- */
980
- KeyType: string;
981
- /**
982
- * 创建时间
983
- */
984
- CreatedTime: number;
985
- /**
986
- * 别名,与CMK一一对应
987
- */
988
- Alias: string;
989
- /**
990
- * 密钥状态 "Pre-Active", "Active", "Deactivated", "Compromised", "Destroyed", "Destroyed Compromised"
991
- */
992
- Status: string;
993
- /**
994
- * 更新时间
995
- */
996
- UpdateTime: number;
997
- /**
998
- * 对密钥的描述说明
999
- */
1000
- Description?: string;
1001
- /**
1002
- * 计划删除时间 时间戳
1003
- */
1004
- PlanDeleteTime?: number;
1005
- }[];
1006
- /**
1007
- * 操作结果
1008
- */
1009
- Status?: string;
1010
- /**
1011
- * 请求唯一标识符
1012
- */
1013
- RequestUuid?: string;
1014
- /**
1015
- * 符合条件的总数, 不同于Limit
1016
- */
1017
- TotalCount?: number;
1018
- }
1019
958
  /**
1020
959
  * RotateKeyOnDemand - 立即触发一次密钥轮转。
1021
960
  */
@@ -1201,7 +1140,7 @@ export interface VerifyResponse {
1201
1140
  SigningAlgorithm: string;
1202
1141
  }
1203
1142
  /**
1204
- * VerifyMac - 验证签名
1143
+ * VerifyMac - 验证指定消息、HMAC KMS 密钥和 MAC 算法的基于哈希的消息认证码 (HMAC)。为了验证 HMAC,VerifyMac 会使用您指定的消息、HMAC KMS 密钥和 MAC 算法计算 HMAC,并将计算出的 HMAC 与您指定的 HMAC 进行比较。如果两个 HMAC 完全相同,则验证成功;否则,验证失败。 验证结果表明,自计算 HMAC 以来,消息未发生更改,并且使用了指定的密钥来生成和验证 HMAC。
1205
1144
  */
1206
1145
  export interface VerifyMacRequest {
1207
1146
  /**
@@ -1222,7 +1161,7 @@ export interface VerifyMacRequest {
1222
1161
  MacAlgorithm: string;
1223
1162
  }
1224
1163
  /**
1225
- * VerifyMac - 验证签名
1164
+ * VerifyMac - 验证指定消息、HMAC KMS 密钥和 MAC 算法的基于哈希的消息认证码 (HMAC)。为了验证 HMAC,VerifyMac 会使用您指定的消息、HMAC KMS 密钥和 MAC 算法计算 HMAC,并将计算出的 HMAC 与您指定的 HMAC 进行比较。如果两个 HMAC 完全相同,则验证成功;否则,验证失败。 验证结果表明,自计算 HMAC 以来,消息未发生更改,并且使用了指定的密钥来生成和验证 HMAC。
1226
1165
  */
1227
1166
  export interface VerifyMacResponse {
1228
1167
  /**
@@ -201,15 +201,6 @@ class UKMSClient extends client_1.default {
201
201
  const args = Object.assign({ Action: 'ListKeys' }, (request || {}));
202
202
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
203
203
  }
204
- /**
205
- * ListScheduleDeletionKeys - 获取计划删除密钥列表,调用ScheduleKeyDeletion命令后进入此列表, 默认30天后正式删除。正式删除前可调用CancelScheduleKeyDeletion恢复
206
- *
207
- * See also: https://docs.ucloud.cn/api/ukms-api/list_schedule_deletion_keys
208
- */
209
- listScheduleDeletionKeys(request) {
210
- const args = Object.assign({ Action: 'ListScheduleDeletionKeys' }, (request || {}));
211
- return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
212
- }
213
204
  /**
214
205
  * RotateKeyOnDemand - 立即触发一次密钥轮转。
215
206
  *
@@ -265,7 +256,7 @@ class UKMSClient extends client_1.default {
265
256
  return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
266
257
  }
267
258
  /**
268
- * VerifyMac - 验证签名
259
+ * VerifyMac - 验证指定消息、HMAC KMS 密钥和 MAC 算法的基于哈希的消息认证码 (HMAC)。为了验证 HMAC,VerifyMac 会使用您指定的消息、HMAC KMS 密钥和 MAC 算法计算 HMAC,并将计算出的 HMAC 与您指定的 HMAC 进行比较。如果两个 HMAC 完全相同,则验证成功;否则,验证失败。 验证结果表明,自计算 HMAC 以来,消息未发生更改,并且使用了指定的密钥来生成和验证 HMAC。
269
260
  *
270
261
  * See also: https://docs.ucloud.cn/api/ukms-api/verify_mac
271
262
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ucloud-sdks/ucloud-sdk-js",
3
3
  "description": "ucloud-sdk-js",
4
- "version": "0.2.28",
4
+ "version": "0.2.30",
5
5
  "author": "oas@ucloud.cn",
6
6
  "license": "MIT",
7
7
  "private": false,