@ucloud-sdks/ucloud-sdk-js 0.2.29 → 0.2.31
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;
|
package/lib/services/index.d.ts
CHANGED
package/lib/services/index.js
CHANGED
|
@@ -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
|