@ucloud-sdks/ucloud-sdk-js 0.2.29 → 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,1785 @@
|
|
|
1
|
+
import Client from '../../core/client';
|
|
2
|
+
import { ConfigOptions } from '../../core/config';
|
|
3
|
+
import { CredentialOptions } from '../../core/credential';
|
|
4
|
+
/**
|
|
5
|
+
* This client is used to call actions of **cloudwatch** service
|
|
6
|
+
*/
|
|
7
|
+
export default class CloudWatchClient extends Client {
|
|
8
|
+
constructor({ config, credential, }: {
|
|
9
|
+
config: ConfigOptions;
|
|
10
|
+
credential: CredentialOptions;
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* BindAlertStrategy - 绑定告警策略
|
|
14
|
+
*
|
|
15
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/bind_alert_strategy
|
|
16
|
+
*/
|
|
17
|
+
bindAlertStrategy(request?: BindAlertStrategyRequest): Promise<BindAlertStrategyResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* CreateAlertStrategy - 创建告警策略
|
|
20
|
+
*
|
|
21
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/create_alert_strategy
|
|
22
|
+
*/
|
|
23
|
+
createAlertStrategy(request?: CreateAlertStrategyRequest): Promise<CreateAlertStrategyResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* CreateAlertStrategyTemplate - 新建条件模板
|
|
26
|
+
*
|
|
27
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/create_alert_strategy_template
|
|
28
|
+
*/
|
|
29
|
+
createAlertStrategyTemplate(request?: CreateAlertStrategyTemplateRequest): Promise<CreateAlertStrategyTemplateResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* DeleteAlertStrategyTemplate - 删除告警条件模板
|
|
32
|
+
*
|
|
33
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/delete_alert_strategy_template
|
|
34
|
+
*/
|
|
35
|
+
deleteAlertStrategyTemplate(request?: DeleteAlertStrategyTemplateRequest): Promise<DeleteAlertStrategyTemplateResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* EnableAlertStrategy - 是否启用告警策略
|
|
38
|
+
*
|
|
39
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/enable_alert_strategy
|
|
40
|
+
*/
|
|
41
|
+
enableAlertStrategy(request?: EnableAlertStrategyRequest): Promise<EnableAlertStrategyResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* GetMetricDataAggregationMethod - 获取指标数据聚合方式
|
|
44
|
+
*
|
|
45
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/get_metric_data_aggregation_method
|
|
46
|
+
*/
|
|
47
|
+
getMetricDataAggregationMethod(request?: GetMetricDataAggregationMethodRequest): Promise<GetMetricDataAggregationMethodResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* GetProductMetrics - 获取云产品关联的指标列表
|
|
50
|
+
*
|
|
51
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/get_product_metrics
|
|
52
|
+
*/
|
|
53
|
+
getProductMetrics(request?: GetProductMetricsRequest): Promise<GetProductMetricsResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* ListAlertRecord - 获取时间段内的告警记录
|
|
56
|
+
*
|
|
57
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_record
|
|
58
|
+
*/
|
|
59
|
+
listAlertRecord(request?: ListAlertRecordRequest): Promise<ListAlertRecordResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* ListAlertStrategy - 获取告警策略列表
|
|
62
|
+
*
|
|
63
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_strategy
|
|
64
|
+
*/
|
|
65
|
+
listAlertStrategy(request?: ListAlertStrategyRequest): Promise<ListAlertStrategyResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* ListAlertStrategyTemplate - 条件模板列表
|
|
68
|
+
*
|
|
69
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/list_alert_strategy_template
|
|
70
|
+
*/
|
|
71
|
+
listAlertStrategyTemplate(request?: ListAlertStrategyTemplateRequest): Promise<ListAlertStrategyTemplateResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* ListMonitorProduct - 获取监控对象类型列表
|
|
74
|
+
*
|
|
75
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/list_monitor_product
|
|
76
|
+
*/
|
|
77
|
+
listMonitorProduct(request?: ListMonitorProductRequest): Promise<ListMonitorProductResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* ModifyAlertStrategyRemark - 修改告警策略备注
|
|
80
|
+
*
|
|
81
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/modify_alert_strategy_remark
|
|
82
|
+
*/
|
|
83
|
+
modifyAlertStrategyRemark(request?: ModifyAlertStrategyRemarkRequest): Promise<ModifyAlertStrategyRemarkResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* QueryMetricDataSet - 查询监控指标数据集
|
|
86
|
+
*
|
|
87
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/query_metric_data_set
|
|
88
|
+
*/
|
|
89
|
+
queryMetricDataSet(request?: QueryMetricDataSetRequest): Promise<QueryMetricDataSetResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* QueryMetricDataSummary - 获取资源看图属性列表
|
|
92
|
+
*
|
|
93
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/query_metric_data_summary
|
|
94
|
+
*/
|
|
95
|
+
queryMetricDataSummary(request?: QueryMetricDataSummaryRequest): Promise<QueryMetricDataSummaryResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* UnBindAlertStrategy - 解绑告警策略
|
|
98
|
+
*
|
|
99
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/un_bind_alert_strategy
|
|
100
|
+
*/
|
|
101
|
+
unBindAlertStrategy(request?: UnBindAlertStrategyRequest): Promise<UnBindAlertStrategyResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* UpdateAlertStrategy - 更新告警策略
|
|
104
|
+
*
|
|
105
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/update_alert_strategy
|
|
106
|
+
*/
|
|
107
|
+
updateAlertStrategy(request?: UpdateAlertStrategyRequest): Promise<UpdateAlertStrategyResponse>;
|
|
108
|
+
/**
|
|
109
|
+
* UpdateAlertStrategyTemplate - 编辑条件模板
|
|
110
|
+
*
|
|
111
|
+
* See also: https://docs.ucloud.cn/api/cloudwatch-api/update_alert_strategy_template
|
|
112
|
+
*/
|
|
113
|
+
updateAlertStrategyTemplate(request?: UpdateAlertStrategyTemplateRequest): Promise<UpdateAlertStrategyTemplateResponse>;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* BindAlertStrategy - 绑定告警策略
|
|
117
|
+
*/
|
|
118
|
+
export interface BindAlertStrategyRequest {
|
|
119
|
+
/**
|
|
120
|
+
* 告警策略id数组
|
|
121
|
+
*/
|
|
122
|
+
AlertStrategyIDs: number[];
|
|
123
|
+
/**
|
|
124
|
+
* 资源数组
|
|
125
|
+
*/
|
|
126
|
+
Resources: string[];
|
|
127
|
+
/**
|
|
128
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
129
|
+
*/
|
|
130
|
+
ProductKey: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* BindAlertStrategy - 绑定告警策略
|
|
134
|
+
*/
|
|
135
|
+
export interface BindAlertStrategyResponse {
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* CreateAlertStrategy - 创建告警策略
|
|
139
|
+
*/
|
|
140
|
+
export interface CreateAlertStrategyRequest {
|
|
141
|
+
/**
|
|
142
|
+
* 告警策略名称。最大长度255个字符
|
|
143
|
+
*/
|
|
144
|
+
Name: string;
|
|
145
|
+
/**
|
|
146
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
147
|
+
*/
|
|
148
|
+
ProductKey: string;
|
|
149
|
+
/**
|
|
150
|
+
* 绑定资源类型1 - 资源组 2 - 资源
|
|
151
|
+
*/
|
|
152
|
+
ObjectType: number;
|
|
153
|
+
/**
|
|
154
|
+
* 条件设置方式1 - 手动配置 2 - 选择模版
|
|
155
|
+
*/
|
|
156
|
+
ConfigMode: number;
|
|
157
|
+
/**
|
|
158
|
+
* 绑定资源,对应绑定资源类型ObjectType=2
|
|
159
|
+
*/
|
|
160
|
+
Resources?: string[];
|
|
161
|
+
/**
|
|
162
|
+
* 绑定资源组,对应绑定资源类型ObjectType=1
|
|
163
|
+
*/
|
|
164
|
+
ResourceGroupIDs?: number[];
|
|
165
|
+
/**
|
|
166
|
+
* 模板id.对应ConfigMode=2时候需要填写
|
|
167
|
+
*/
|
|
168
|
+
TemplateId?: number;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
RuleSet?: {
|
|
173
|
+
/**
|
|
174
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
175
|
+
*/
|
|
176
|
+
MetricID?: number;
|
|
177
|
+
/**
|
|
178
|
+
* 阈值比较方式。 枚举值:1:>= 2:<= 3:> 4:< 5:== 6:!=
|
|
179
|
+
*/
|
|
180
|
+
ThresholdCompare?: number;
|
|
181
|
+
/**
|
|
182
|
+
* 触发阈值
|
|
183
|
+
*/
|
|
184
|
+
ThresholdValue?: number;
|
|
185
|
+
/**
|
|
186
|
+
* 触发次数
|
|
187
|
+
*/
|
|
188
|
+
TriggerCount?: number;
|
|
189
|
+
/**
|
|
190
|
+
* 触发周期。枚举值continuous - 连续exponent - 指数single - 不重复
|
|
191
|
+
*/
|
|
192
|
+
SendPeriodType?: string;
|
|
193
|
+
/**
|
|
194
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
195
|
+
*/
|
|
196
|
+
Level?: string;
|
|
197
|
+
/**
|
|
198
|
+
* 告警状态。枚举值0 - 关闭1 - 开启
|
|
199
|
+
*/
|
|
200
|
+
Status?: number;
|
|
201
|
+
/**
|
|
202
|
+
* 沉默周期(告警周期选择为连续时必填)
|
|
203
|
+
*/
|
|
204
|
+
SendInterval?: number;
|
|
205
|
+
}[];
|
|
206
|
+
/**
|
|
207
|
+
* 通知类型。枚举值: group - 通知组 user - 通知人
|
|
208
|
+
*/
|
|
209
|
+
NotifyType?: string;
|
|
210
|
+
/**
|
|
211
|
+
* 通知人id
|
|
212
|
+
*/
|
|
213
|
+
NotifyUserIDs?: number[];
|
|
214
|
+
/**
|
|
215
|
+
* 通知人组id
|
|
216
|
+
*/
|
|
217
|
+
NotifyGroupIDs?: number[];
|
|
218
|
+
/**
|
|
219
|
+
* 通知渠道。枚举值:sms - 短信email - 邮件webhook - 回调
|
|
220
|
+
*/
|
|
221
|
+
NotifyChannelDs?: string[];
|
|
222
|
+
/**
|
|
223
|
+
* 当通知渠道=回调webhook时,需要设置回调语言。枚举值:cn - 中文en - 英文
|
|
224
|
+
*/
|
|
225
|
+
CallbackLanguage?: string;
|
|
226
|
+
/**
|
|
227
|
+
* 回调URL地址
|
|
228
|
+
*/
|
|
229
|
+
CallbackUrls?: string[];
|
|
230
|
+
/**
|
|
231
|
+
* 通知模板id
|
|
232
|
+
*/
|
|
233
|
+
NotifyTemplateId?: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* CreateAlertStrategy - 创建告警策略
|
|
237
|
+
*/
|
|
238
|
+
export interface CreateAlertStrategyResponse {
|
|
239
|
+
/**
|
|
240
|
+
* 创建告警策略返回对象
|
|
241
|
+
*/
|
|
242
|
+
Data?: {
|
|
243
|
+
/**
|
|
244
|
+
* 告警策略id
|
|
245
|
+
*/
|
|
246
|
+
AlertStrategyID?: number;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* CreateAlertStrategyTemplate - 新建条件模板
|
|
251
|
+
*/
|
|
252
|
+
export interface CreateAlertStrategyTemplateRequest {
|
|
253
|
+
/**
|
|
254
|
+
* 告警模板名称。最大长度64个字符
|
|
255
|
+
*/
|
|
256
|
+
Name: string;
|
|
257
|
+
/**
|
|
258
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
259
|
+
*/
|
|
260
|
+
ProductKey: string;
|
|
261
|
+
/**
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
RuleSet?: {
|
|
265
|
+
/**
|
|
266
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
267
|
+
*/
|
|
268
|
+
MetricID: number;
|
|
269
|
+
/**
|
|
270
|
+
* 阈值比较方式。枚举值: 1:>= 2:<= 3:> 4:< 5:== 6:!=
|
|
271
|
+
*/
|
|
272
|
+
ThresholdCompare: number;
|
|
273
|
+
/**
|
|
274
|
+
* 触发阈值
|
|
275
|
+
*/
|
|
276
|
+
ThresholdValue: number;
|
|
277
|
+
/**
|
|
278
|
+
* 触发次数
|
|
279
|
+
*/
|
|
280
|
+
TriggerCount: number;
|
|
281
|
+
/**
|
|
282
|
+
* 触发周期。枚举值:continuous连续 exponent 指数 single 不重复
|
|
283
|
+
*/
|
|
284
|
+
SendPeriodType: string;
|
|
285
|
+
/**
|
|
286
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
287
|
+
*/
|
|
288
|
+
Level: string;
|
|
289
|
+
/**
|
|
290
|
+
* 告警状态。枚举值:0-关闭 1-开启
|
|
291
|
+
*/
|
|
292
|
+
Status: number;
|
|
293
|
+
/**
|
|
294
|
+
* 沉默周期(告警周期选择为连续时必填)
|
|
295
|
+
*/
|
|
296
|
+
SendInterval?: number;
|
|
297
|
+
}[];
|
|
298
|
+
/**
|
|
299
|
+
* 备注
|
|
300
|
+
*/
|
|
301
|
+
Remark?: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* CreateAlertStrategyTemplate - 新建条件模板
|
|
305
|
+
*/
|
|
306
|
+
export interface CreateAlertStrategyTemplateResponse {
|
|
307
|
+
/**
|
|
308
|
+
* 创建告警模板返回对象
|
|
309
|
+
*/
|
|
310
|
+
Data?: {
|
|
311
|
+
/**
|
|
312
|
+
* 告警模板ID
|
|
313
|
+
*/
|
|
314
|
+
TemplateID: number;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* DeleteAlertStrategyTemplate - 删除告警条件模板
|
|
319
|
+
*/
|
|
320
|
+
export interface DeleteAlertStrategyTemplateRequest {
|
|
321
|
+
/**
|
|
322
|
+
* 告警模板ID(支持批量删除)
|
|
323
|
+
*/
|
|
324
|
+
TemplateID: number[];
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* DeleteAlertStrategyTemplate - 删除告警条件模板
|
|
328
|
+
*/
|
|
329
|
+
export interface DeleteAlertStrategyTemplateResponse {
|
|
330
|
+
/**
|
|
331
|
+
* 删除告警模板返回对象
|
|
332
|
+
*/
|
|
333
|
+
Data?: {
|
|
334
|
+
/**
|
|
335
|
+
* 模板ID
|
|
336
|
+
*/
|
|
337
|
+
TemplateID: number[];
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* EnableAlertStrategy - 是否启用告警策略
|
|
342
|
+
*/
|
|
343
|
+
export interface EnableAlertStrategyRequest {
|
|
344
|
+
/**
|
|
345
|
+
* 告警策略id
|
|
346
|
+
*/
|
|
347
|
+
AlertStrategyID: number;
|
|
348
|
+
/**
|
|
349
|
+
* 启用状态0 停用 1 启用
|
|
350
|
+
*/
|
|
351
|
+
Status: number;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* EnableAlertStrategy - 是否启用告警策略
|
|
355
|
+
*/
|
|
356
|
+
export interface EnableAlertStrategyResponse {
|
|
357
|
+
/**
|
|
358
|
+
* 返回数据
|
|
359
|
+
*/
|
|
360
|
+
Data?: {
|
|
361
|
+
/**
|
|
362
|
+
* 告警策略id
|
|
363
|
+
*/
|
|
364
|
+
AlertStrategyID?: number;
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* GetMetricDataAggregationMethod - 获取指标数据聚合方式
|
|
369
|
+
*/
|
|
370
|
+
export interface GetMetricDataAggregationMethodRequest {
|
|
371
|
+
/**
|
|
372
|
+
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
|
|
373
|
+
*/
|
|
374
|
+
Zone?: string;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* GetMetricDataAggregationMethod - 获取指标数据聚合方式
|
|
378
|
+
*/
|
|
379
|
+
export interface GetMetricDataAggregationMethodResponse {
|
|
380
|
+
/**
|
|
381
|
+
* 获取指标数据聚合方式返回结果
|
|
382
|
+
*/
|
|
383
|
+
Data: {
|
|
384
|
+
/**
|
|
385
|
+
* 聚合方式列表
|
|
386
|
+
*/
|
|
387
|
+
List: {
|
|
388
|
+
/**
|
|
389
|
+
* 标签
|
|
390
|
+
*/
|
|
391
|
+
Label: string;
|
|
392
|
+
/**
|
|
393
|
+
* 值
|
|
394
|
+
*/
|
|
395
|
+
Value: string;
|
|
396
|
+
/**
|
|
397
|
+
* 是否是默认方式
|
|
398
|
+
*/
|
|
399
|
+
IsDefault: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* 描述
|
|
402
|
+
*/
|
|
403
|
+
Description: string;
|
|
404
|
+
}[];
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* GetProductMetrics - 获取云产品关联的指标列表
|
|
409
|
+
*/
|
|
410
|
+
export interface GetProductMetricsRequest {
|
|
411
|
+
/**
|
|
412
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
413
|
+
*/
|
|
414
|
+
ProductKey: string;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* GetProductMetrics - 获取云产品关联的指标列表
|
|
418
|
+
*/
|
|
419
|
+
export interface GetProductMetricsResponse {
|
|
420
|
+
/**
|
|
421
|
+
* 返回数据
|
|
422
|
+
*/
|
|
423
|
+
Data: {
|
|
424
|
+
/**
|
|
425
|
+
* 查询结果总数
|
|
426
|
+
*/
|
|
427
|
+
Total?: number;
|
|
428
|
+
/**
|
|
429
|
+
* 指标列表
|
|
430
|
+
*/
|
|
431
|
+
List?: {
|
|
432
|
+
/**
|
|
433
|
+
* 云产品ID
|
|
434
|
+
*/
|
|
435
|
+
ProductType?: number;
|
|
436
|
+
/**
|
|
437
|
+
* 单位ID
|
|
438
|
+
*/
|
|
439
|
+
UnitID?: number;
|
|
440
|
+
/**
|
|
441
|
+
* 指标ID
|
|
442
|
+
*/
|
|
443
|
+
MetricID?: number;
|
|
444
|
+
/**
|
|
445
|
+
* 指标唯一标识 (uhost_cpu_usage)
|
|
446
|
+
*/
|
|
447
|
+
Metric?: string;
|
|
448
|
+
/**
|
|
449
|
+
* 指标英文名称
|
|
450
|
+
*/
|
|
451
|
+
MetricEnName?: string;
|
|
452
|
+
/**
|
|
453
|
+
* 指标中文名称
|
|
454
|
+
*/
|
|
455
|
+
MetricChName?: string;
|
|
456
|
+
/**
|
|
457
|
+
* 指标英文描述
|
|
458
|
+
*/
|
|
459
|
+
MetricEnDesc?: string;
|
|
460
|
+
/**
|
|
461
|
+
* 指标中文描述
|
|
462
|
+
*/
|
|
463
|
+
MetricChDesc?: string;
|
|
464
|
+
/**
|
|
465
|
+
* 指标分类/指标组
|
|
466
|
+
*/
|
|
467
|
+
MetricGroup?: string;
|
|
468
|
+
/**
|
|
469
|
+
* 上报频率毫秒
|
|
470
|
+
*/
|
|
471
|
+
FrequencyMs?: number;
|
|
472
|
+
/**
|
|
473
|
+
* 单位
|
|
474
|
+
*/
|
|
475
|
+
Unit?: {
|
|
476
|
+
/**
|
|
477
|
+
* 单位id
|
|
478
|
+
*/
|
|
479
|
+
UnitID?: number;
|
|
480
|
+
/**
|
|
481
|
+
* GroupId
|
|
482
|
+
*/
|
|
483
|
+
GroupId?: number;
|
|
484
|
+
/**
|
|
485
|
+
* 单位英文名称
|
|
486
|
+
*/
|
|
487
|
+
UnitEnName?: string;
|
|
488
|
+
/**
|
|
489
|
+
* 单位中文名称
|
|
490
|
+
*/
|
|
491
|
+
UnitChName?: string;
|
|
492
|
+
/**
|
|
493
|
+
* 单位描述
|
|
494
|
+
*/
|
|
495
|
+
UnitDesc?: string;
|
|
496
|
+
/**
|
|
497
|
+
* 转换因子
|
|
498
|
+
*/
|
|
499
|
+
ConversionFactor?: number;
|
|
500
|
+
/**
|
|
501
|
+
* 创建人
|
|
502
|
+
*/
|
|
503
|
+
CreatedBy?: string;
|
|
504
|
+
/**
|
|
505
|
+
* 修改人
|
|
506
|
+
*/
|
|
507
|
+
UpdatedBy?: string;
|
|
508
|
+
/**
|
|
509
|
+
* 创建时间
|
|
510
|
+
*/
|
|
511
|
+
CreatedAt?: string;
|
|
512
|
+
/**
|
|
513
|
+
* 修改时间
|
|
514
|
+
*/
|
|
515
|
+
UpdatedAt?: string;
|
|
516
|
+
/**
|
|
517
|
+
* 删除时间
|
|
518
|
+
*/
|
|
519
|
+
DeletedAt?: number;
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* 创建者
|
|
523
|
+
*/
|
|
524
|
+
CreatedBy?: string;
|
|
525
|
+
/**
|
|
526
|
+
* 创建时间
|
|
527
|
+
*/
|
|
528
|
+
CreatedAt?: string;
|
|
529
|
+
/**
|
|
530
|
+
* 修改者
|
|
531
|
+
*/
|
|
532
|
+
UpdatedBy?: string;
|
|
533
|
+
/**
|
|
534
|
+
* 修改时间
|
|
535
|
+
*/
|
|
536
|
+
UpdatedAt?: string;
|
|
537
|
+
}[];
|
|
538
|
+
/**
|
|
539
|
+
* 单位转换信息
|
|
540
|
+
*/
|
|
541
|
+
UnitConfigs?: {
|
|
542
|
+
/**
|
|
543
|
+
* 指标中文名列表
|
|
544
|
+
*/
|
|
545
|
+
UnitCnNames?: string[];
|
|
546
|
+
/**
|
|
547
|
+
* 指标英文名列表
|
|
548
|
+
*/
|
|
549
|
+
UnitEnNames?: string[];
|
|
550
|
+
/**
|
|
551
|
+
* 转换因子
|
|
552
|
+
*/
|
|
553
|
+
ConversionFactor?: number;
|
|
554
|
+
/**
|
|
555
|
+
* 转换规则
|
|
556
|
+
*/
|
|
557
|
+
ConversionRules?: {
|
|
558
|
+
/**
|
|
559
|
+
* 来源
|
|
560
|
+
*/
|
|
561
|
+
From?: string;
|
|
562
|
+
/**
|
|
563
|
+
* 目标
|
|
564
|
+
*/
|
|
565
|
+
To?: string;
|
|
566
|
+
/**
|
|
567
|
+
* 转换因子
|
|
568
|
+
*/
|
|
569
|
+
ConversionFactor?: number;
|
|
570
|
+
}[];
|
|
571
|
+
}[];
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* ListAlertRecord - 获取时间段内的告警记录
|
|
576
|
+
*/
|
|
577
|
+
export interface ListAlertRecordRequest {
|
|
578
|
+
/**
|
|
579
|
+
* 开始时间,查询告警记录开始时间,不支持查询距当前时间一年前的数据),值为10位数时间戳
|
|
580
|
+
*/
|
|
581
|
+
StartAt: number;
|
|
582
|
+
/**
|
|
583
|
+
* 结束时间,查询告警记录结束时间(查询开始时间和结束时间不能超过一个月),值为10位数时间戳
|
|
584
|
+
*/
|
|
585
|
+
EndAt: number;
|
|
586
|
+
/**
|
|
587
|
+
* 模糊查询(支持资源id模糊搜索)
|
|
588
|
+
*/
|
|
589
|
+
Fuzzy?: string;
|
|
590
|
+
/**
|
|
591
|
+
*
|
|
592
|
+
*/
|
|
593
|
+
Filter?: {
|
|
594
|
+
/**
|
|
595
|
+
* 产品ID,根据产品类型精确搜索对应的告警记录,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
596
|
+
*/
|
|
597
|
+
ProductTypes?: number[];
|
|
598
|
+
/**
|
|
599
|
+
* 告警级别,根据告警级别精确搜索对应的告警记录,枚举值:P0,P1,P2,P3
|
|
600
|
+
*/
|
|
601
|
+
Levels?: string[];
|
|
602
|
+
/**
|
|
603
|
+
* 告警状态,根据告警状态精确搜索对应的告警记录,枚举值:firing-告警中,resolved-已恢复
|
|
604
|
+
*/
|
|
605
|
+
Status?: string[];
|
|
606
|
+
};
|
|
607
|
+
/**
|
|
608
|
+
* 排序(默认根据告警发生时间倒序),枚举值:asc-升序,desc-降序
|
|
609
|
+
*/
|
|
610
|
+
OrderType?: string;
|
|
611
|
+
/**
|
|
612
|
+
* 查询返回数量,默认值300,最大值:300。
|
|
613
|
+
*/
|
|
614
|
+
Limit?: number;
|
|
615
|
+
/**
|
|
616
|
+
* 数据偏移量 (默认0)
|
|
617
|
+
*/
|
|
618
|
+
Offset?: number;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* ListAlertRecord - 获取时间段内的告警记录
|
|
622
|
+
*/
|
|
623
|
+
export interface ListAlertRecordResponse {
|
|
624
|
+
/**
|
|
625
|
+
* 告警记录集合
|
|
626
|
+
*/
|
|
627
|
+
Data?: {
|
|
628
|
+
/**
|
|
629
|
+
* 可用区
|
|
630
|
+
*/
|
|
631
|
+
Region?: string;
|
|
632
|
+
/**
|
|
633
|
+
* 告警记录RecordID
|
|
634
|
+
*/
|
|
635
|
+
RecordID?: number;
|
|
636
|
+
/**
|
|
637
|
+
* 项目ProjectID
|
|
638
|
+
*/
|
|
639
|
+
ProjectID?: number;
|
|
640
|
+
/**
|
|
641
|
+
* 告警记录触发告警策略名称
|
|
642
|
+
*/
|
|
643
|
+
StrategyName?: string;
|
|
644
|
+
/**
|
|
645
|
+
* 产品类型
|
|
646
|
+
*/
|
|
647
|
+
ProductType?: number;
|
|
648
|
+
/**
|
|
649
|
+
* 产品类型名称
|
|
650
|
+
*/
|
|
651
|
+
ProductName?: string;
|
|
652
|
+
/**
|
|
653
|
+
* 资源id
|
|
654
|
+
*/
|
|
655
|
+
ResourceID?: string;
|
|
656
|
+
/**
|
|
657
|
+
* 指标id
|
|
658
|
+
*/
|
|
659
|
+
MetricID?: number;
|
|
660
|
+
/**
|
|
661
|
+
* 指标名称
|
|
662
|
+
*/
|
|
663
|
+
MetricName?: string;
|
|
664
|
+
/**
|
|
665
|
+
* 指标单位名称
|
|
666
|
+
*/
|
|
667
|
+
UnitName?: string;
|
|
668
|
+
/**
|
|
669
|
+
* 告警记录触发告警策略Id
|
|
670
|
+
*/
|
|
671
|
+
StrategyID?: number;
|
|
672
|
+
/**
|
|
673
|
+
* 告警记录触发告警规则Id
|
|
674
|
+
*/
|
|
675
|
+
RuleID?: number;
|
|
676
|
+
/**
|
|
677
|
+
* 告警点tag信息
|
|
678
|
+
*/
|
|
679
|
+
Tag?: string[];
|
|
680
|
+
/**
|
|
681
|
+
* 告警当前值
|
|
682
|
+
*/
|
|
683
|
+
Value?: number;
|
|
684
|
+
/**
|
|
685
|
+
* 比较符
|
|
686
|
+
*/
|
|
687
|
+
ThresholdCompare?: number;
|
|
688
|
+
/**
|
|
689
|
+
* 告警阈值
|
|
690
|
+
*/
|
|
691
|
+
ThresholdValue?: number;
|
|
692
|
+
/**
|
|
693
|
+
* 告警屏蔽规则id(如果配置了屏蔽规则,并且满足条件)
|
|
694
|
+
*/
|
|
695
|
+
ShieldRuleID?: number;
|
|
696
|
+
/**
|
|
697
|
+
* 告警等级
|
|
698
|
+
*/
|
|
699
|
+
Level?: string;
|
|
700
|
+
/**
|
|
701
|
+
* 告警状态
|
|
702
|
+
*/
|
|
703
|
+
Status?: string;
|
|
704
|
+
/**
|
|
705
|
+
* 告警触发时间
|
|
706
|
+
*/
|
|
707
|
+
StartAt?: number;
|
|
708
|
+
/**
|
|
709
|
+
* 告警结束时间
|
|
710
|
+
*/
|
|
711
|
+
EndAt?: number;
|
|
712
|
+
/**
|
|
713
|
+
* 产品相关的额外属性列表
|
|
714
|
+
*/
|
|
715
|
+
ContentAttrList?: string[];
|
|
716
|
+
}[];
|
|
717
|
+
/**
|
|
718
|
+
* 告警记录总数
|
|
719
|
+
*/
|
|
720
|
+
TotalCount?: number;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* ListAlertStrategy - 获取告警策略列表
|
|
724
|
+
*/
|
|
725
|
+
export interface ListAlertStrategyRequest {
|
|
726
|
+
/**
|
|
727
|
+
* 模糊查询(支持告警策略名称模糊搜索)
|
|
728
|
+
*/
|
|
729
|
+
Fuzzy?: string;
|
|
730
|
+
/**
|
|
731
|
+
*
|
|
732
|
+
*/
|
|
733
|
+
Filter?: {
|
|
734
|
+
/**
|
|
735
|
+
* 产品ID,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
736
|
+
*/
|
|
737
|
+
ProductTypes?: number[];
|
|
738
|
+
/**
|
|
739
|
+
* 告警策略id,根据策略id获取告警策略列表
|
|
740
|
+
*/
|
|
741
|
+
AlertStrategyIDs?: number[];
|
|
742
|
+
/**
|
|
743
|
+
* 告警策略状态,根据告警策略状态精确搜索对应的告警策略,枚举值:0-停用,1-启用
|
|
744
|
+
*/
|
|
745
|
+
Status?: number[];
|
|
746
|
+
};
|
|
747
|
+
/**
|
|
748
|
+
* 资源id集合,根据资源id返回绑定的告警策略列表
|
|
749
|
+
*/
|
|
750
|
+
Resources?: string[];
|
|
751
|
+
/**
|
|
752
|
+
* 查询返回数量,默认值300,最大值:300。
|
|
753
|
+
*/
|
|
754
|
+
Limit?: number;
|
|
755
|
+
/**
|
|
756
|
+
* 数据偏移量 (默认0)
|
|
757
|
+
*/
|
|
758
|
+
Offset?: number;
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* ListAlertStrategy - 获取告警策略列表
|
|
762
|
+
*/
|
|
763
|
+
export interface ListAlertStrategyResponse {
|
|
764
|
+
/**
|
|
765
|
+
* 告警策略集合
|
|
766
|
+
*/
|
|
767
|
+
Data?: {
|
|
768
|
+
/**
|
|
769
|
+
* 告警规则集合
|
|
770
|
+
*/
|
|
771
|
+
RuleSet?: {
|
|
772
|
+
/**
|
|
773
|
+
* 规则ID
|
|
774
|
+
*/
|
|
775
|
+
RuleID?: number;
|
|
776
|
+
/**
|
|
777
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
778
|
+
*/
|
|
779
|
+
MetricID?: number;
|
|
780
|
+
/**
|
|
781
|
+
* 指标名称
|
|
782
|
+
*/
|
|
783
|
+
MetricName?: string;
|
|
784
|
+
/**
|
|
785
|
+
* 阈值比较方式枚举值比较方式:1->=2-<=3->4-<5-==6-!=
|
|
786
|
+
*/
|
|
787
|
+
ThresholdCompare?: number;
|
|
788
|
+
/**
|
|
789
|
+
* 触发阈值
|
|
790
|
+
*/
|
|
791
|
+
ThresholdValue?: number;
|
|
792
|
+
/**
|
|
793
|
+
* 触发次数
|
|
794
|
+
*/
|
|
795
|
+
TriggerCount?: number;
|
|
796
|
+
/**
|
|
797
|
+
* 触发周期。枚举值:continuous连续 exponent 指数 single 不重复
|
|
798
|
+
*/
|
|
799
|
+
SendPeriodType?: string;
|
|
800
|
+
/**
|
|
801
|
+
* 发送间隔
|
|
802
|
+
*/
|
|
803
|
+
SendInterval?: number;
|
|
804
|
+
/**
|
|
805
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
806
|
+
*/
|
|
807
|
+
Level?: string;
|
|
808
|
+
/**
|
|
809
|
+
* 告警状态。枚举值:0-关闭 1-开启
|
|
810
|
+
*/
|
|
811
|
+
Status?: number;
|
|
812
|
+
/**
|
|
813
|
+
* 单位id
|
|
814
|
+
*/
|
|
815
|
+
UnitID?: number;
|
|
816
|
+
/**
|
|
817
|
+
* 单位名称
|
|
818
|
+
*/
|
|
819
|
+
UnitName?: string;
|
|
820
|
+
}[];
|
|
821
|
+
/**
|
|
822
|
+
* 告警策略Id
|
|
823
|
+
*/
|
|
824
|
+
AlertStrategyID?: number;
|
|
825
|
+
/**
|
|
826
|
+
* 告警策略名称
|
|
827
|
+
*/
|
|
828
|
+
Name?: string;
|
|
829
|
+
/**
|
|
830
|
+
* 资源类型
|
|
831
|
+
*/
|
|
832
|
+
ProductType?: number;
|
|
833
|
+
/**
|
|
834
|
+
* 资源类型名称
|
|
835
|
+
*/
|
|
836
|
+
ProductKey?: string;
|
|
837
|
+
/**
|
|
838
|
+
* 告警规则配置类型(基于模板配置、基于手工配置)
|
|
839
|
+
*/
|
|
840
|
+
ConfigMode?: number;
|
|
841
|
+
/**
|
|
842
|
+
* 模板Id
|
|
843
|
+
*/
|
|
844
|
+
TemplateId?: number;
|
|
845
|
+
/**
|
|
846
|
+
* 通知方式(通知组:group,通知人:user)
|
|
847
|
+
*/
|
|
848
|
+
NotifyType?: string;
|
|
849
|
+
/**
|
|
850
|
+
* 通知人用户id集合
|
|
851
|
+
*/
|
|
852
|
+
NotifyUserIDs?: number[];
|
|
853
|
+
/**
|
|
854
|
+
* 通知组id集合
|
|
855
|
+
*/
|
|
856
|
+
NotifyGroupIDs?: number[];
|
|
857
|
+
/**
|
|
858
|
+
* 通知渠道('email', 'sms', 'webhook')
|
|
859
|
+
*/
|
|
860
|
+
NotifyChannelDs?: string[];
|
|
861
|
+
/**
|
|
862
|
+
* 回调语言(cn,en)
|
|
863
|
+
*/
|
|
864
|
+
CallbackLanguage?: string;
|
|
865
|
+
/**
|
|
866
|
+
* 回调地址
|
|
867
|
+
*/
|
|
868
|
+
CallbackUrls?: string[];
|
|
869
|
+
/**
|
|
870
|
+
* 告警策略状态
|
|
871
|
+
*/
|
|
872
|
+
Status?: number;
|
|
873
|
+
/**
|
|
874
|
+
* 告警策略备注
|
|
875
|
+
*/
|
|
876
|
+
Remark?: string;
|
|
877
|
+
/**
|
|
878
|
+
* 创建人
|
|
879
|
+
*/
|
|
880
|
+
CreatedBy?: string;
|
|
881
|
+
/**
|
|
882
|
+
* 更新人
|
|
883
|
+
*/
|
|
884
|
+
UpdatedBy?: string;
|
|
885
|
+
/**
|
|
886
|
+
* 创建时间
|
|
887
|
+
*/
|
|
888
|
+
CreatedAt?: number;
|
|
889
|
+
/**
|
|
890
|
+
* 更新时间
|
|
891
|
+
*/
|
|
892
|
+
UpdatedAt?: number;
|
|
893
|
+
}[];
|
|
894
|
+
/**
|
|
895
|
+
* 告警策略总数
|
|
896
|
+
*/
|
|
897
|
+
TotalCount?: number;
|
|
898
|
+
/**
|
|
899
|
+
* 链路ID
|
|
900
|
+
*/
|
|
901
|
+
TraceId?: string;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* ListAlertStrategyTemplate - 条件模板列表
|
|
905
|
+
*/
|
|
906
|
+
export interface ListAlertStrategyTemplateRequest {
|
|
907
|
+
/**
|
|
908
|
+
*
|
|
909
|
+
*/
|
|
910
|
+
Filter?: {
|
|
911
|
+
/**
|
|
912
|
+
* 模板id集合,根据模板id获取告警条件模板列表
|
|
913
|
+
*/
|
|
914
|
+
TemplateIDs?: number[];
|
|
915
|
+
};
|
|
916
|
+
/**
|
|
917
|
+
* 查询返回数量,默认值300,最大值:300。
|
|
918
|
+
*/
|
|
919
|
+
Limit?: number;
|
|
920
|
+
/**
|
|
921
|
+
* 数据偏移量 (默认0)
|
|
922
|
+
*/
|
|
923
|
+
Offset?: number;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* ListAlertStrategyTemplate - 条件模板列表
|
|
927
|
+
*/
|
|
928
|
+
export interface ListAlertStrategyTemplateResponse {
|
|
929
|
+
/**
|
|
930
|
+
* 条件模板列表
|
|
931
|
+
*/
|
|
932
|
+
Data?: {
|
|
933
|
+
/**
|
|
934
|
+
* 公司id
|
|
935
|
+
*/
|
|
936
|
+
CompanyID?: number;
|
|
937
|
+
/**
|
|
938
|
+
* 模板Id
|
|
939
|
+
*/
|
|
940
|
+
TemplateID?: number;
|
|
941
|
+
/**
|
|
942
|
+
* 告警模板名称
|
|
943
|
+
*/
|
|
944
|
+
Name?: string;
|
|
945
|
+
/**
|
|
946
|
+
* 产品类型(数值型)。参考ListMonitorProduct获取监控对象类型列表
|
|
947
|
+
*/
|
|
948
|
+
ProductType?: number;
|
|
949
|
+
/**
|
|
950
|
+
* 产品类型(字符型)。参考ListMonitorProduct获取监控对象类型列表
|
|
951
|
+
*/
|
|
952
|
+
ProductKey?: string;
|
|
953
|
+
/**
|
|
954
|
+
* 告警条件规则
|
|
955
|
+
*/
|
|
956
|
+
RuleSet?: {
|
|
957
|
+
/**
|
|
958
|
+
* 规则ID
|
|
959
|
+
*/
|
|
960
|
+
RuleID?: number;
|
|
961
|
+
/**
|
|
962
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
963
|
+
*/
|
|
964
|
+
MetricID?: number;
|
|
965
|
+
/**
|
|
966
|
+
* 指标名称
|
|
967
|
+
*/
|
|
968
|
+
MetricName?: string;
|
|
969
|
+
/**
|
|
970
|
+
* 阈值比较方式枚举值比较方式:1->=2-<=3->4-<5-==6-!=
|
|
971
|
+
*/
|
|
972
|
+
ThresholdCompare?: number;
|
|
973
|
+
/**
|
|
974
|
+
* 触发阈值
|
|
975
|
+
*/
|
|
976
|
+
ThresholdValue?: number;
|
|
977
|
+
/**
|
|
978
|
+
* 触发次数
|
|
979
|
+
*/
|
|
980
|
+
TriggerCount?: number;
|
|
981
|
+
/**
|
|
982
|
+
* 触发周期。枚举值:continuous连续 exponent 指数 single 不重复
|
|
983
|
+
*/
|
|
984
|
+
SendPeriodType?: string;
|
|
985
|
+
/**
|
|
986
|
+
* 发送间隔
|
|
987
|
+
*/
|
|
988
|
+
SendInterval?: number;
|
|
989
|
+
/**
|
|
990
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
991
|
+
*/
|
|
992
|
+
Level?: string;
|
|
993
|
+
/**
|
|
994
|
+
* 告警状态。枚举值:0-关闭 1-开启
|
|
995
|
+
*/
|
|
996
|
+
Status?: number;
|
|
997
|
+
/**
|
|
998
|
+
* 单位id
|
|
999
|
+
*/
|
|
1000
|
+
UnitID?: number;
|
|
1001
|
+
/**
|
|
1002
|
+
* 单位名称
|
|
1003
|
+
*/
|
|
1004
|
+
UnitName?: string;
|
|
1005
|
+
}[];
|
|
1006
|
+
/**
|
|
1007
|
+
* 条件模板备注
|
|
1008
|
+
*/
|
|
1009
|
+
Remark?: string;
|
|
1010
|
+
}[];
|
|
1011
|
+
/**
|
|
1012
|
+
* 条件模板总条数
|
|
1013
|
+
*/
|
|
1014
|
+
TotalCount?: number;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* ListMonitorProduct - 获取监控对象类型列表
|
|
1018
|
+
*/
|
|
1019
|
+
export interface ListMonitorProductRequest {
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* ListMonitorProduct - 获取监控对象类型列表
|
|
1023
|
+
*/
|
|
1024
|
+
export interface ListMonitorProductResponse {
|
|
1025
|
+
/**
|
|
1026
|
+
* 返回数据
|
|
1027
|
+
*/
|
|
1028
|
+
Data: {
|
|
1029
|
+
/**
|
|
1030
|
+
* 查询结果总数
|
|
1031
|
+
*/
|
|
1032
|
+
Total?: number;
|
|
1033
|
+
/**
|
|
1034
|
+
* 查询结果列表
|
|
1035
|
+
*/
|
|
1036
|
+
List?: {
|
|
1037
|
+
/**
|
|
1038
|
+
* ID
|
|
1039
|
+
*/
|
|
1040
|
+
Id?: number;
|
|
1041
|
+
/**
|
|
1042
|
+
* 资源类型ID
|
|
1043
|
+
*/
|
|
1044
|
+
ProductType?: number;
|
|
1045
|
+
/**
|
|
1046
|
+
* 资源类型唯一key
|
|
1047
|
+
*/
|
|
1048
|
+
ProductKey?: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* 产品名称
|
|
1051
|
+
*/
|
|
1052
|
+
ProductName?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* 产品子名称
|
|
1055
|
+
*/
|
|
1056
|
+
ProductName1?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* 产品中文名称
|
|
1059
|
+
*/
|
|
1060
|
+
ProductChName?: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* 产品英文名称
|
|
1063
|
+
*/
|
|
1064
|
+
ProductEnName?: string;
|
|
1065
|
+
/**
|
|
1066
|
+
* {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
|
|
1067
|
+
*/
|
|
1068
|
+
Metas?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* 产品分组
|
|
1071
|
+
*/
|
|
1072
|
+
ProductGroup?: string;
|
|
1073
|
+
}[];
|
|
1074
|
+
};
|
|
1075
|
+
/**
|
|
1076
|
+
* 链路ID
|
|
1077
|
+
*/
|
|
1078
|
+
TraceId?: string;
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* ModifyAlertStrategyRemark - 修改告警策略备注
|
|
1082
|
+
*/
|
|
1083
|
+
export interface ModifyAlertStrategyRemarkRequest {
|
|
1084
|
+
/**
|
|
1085
|
+
* 策略id
|
|
1086
|
+
*/
|
|
1087
|
+
AlertStrategyID: number;
|
|
1088
|
+
/**
|
|
1089
|
+
* 策略名称
|
|
1090
|
+
*/
|
|
1091
|
+
Name: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* 策略备注
|
|
1094
|
+
*/
|
|
1095
|
+
Remark?: string;
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* ModifyAlertStrategyRemark - 修改告警策略备注
|
|
1099
|
+
*/
|
|
1100
|
+
export interface ModifyAlertStrategyRemarkResponse {
|
|
1101
|
+
/**
|
|
1102
|
+
* 返回数据
|
|
1103
|
+
*/
|
|
1104
|
+
Data?: {
|
|
1105
|
+
/**
|
|
1106
|
+
* 告警策略id
|
|
1107
|
+
*/
|
|
1108
|
+
AlertStrategyID?: number;
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* QueryMetricDataSet - 查询监控指标数据集
|
|
1113
|
+
*/
|
|
1114
|
+
export interface QueryMetricDataSetRequest {
|
|
1115
|
+
/**
|
|
1116
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
1117
|
+
*/
|
|
1118
|
+
ProductKey: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* 开始时间,值为10位数时间戳
|
|
1121
|
+
*/
|
|
1122
|
+
StartTime: number;
|
|
1123
|
+
/**
|
|
1124
|
+
* 截止时间,值为10位数时间戳
|
|
1125
|
+
*/
|
|
1126
|
+
EndTime: number;
|
|
1127
|
+
/**
|
|
1128
|
+
* 计算方式,枚举值如下:raw:原始值,max:最大值,min:最小值,avg:平均值,sum:求和
|
|
1129
|
+
*/
|
|
1130
|
+
CalcMethod: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* 周期,单位为秒,即:数据查询时,返回数据点的时间间隔。不同的查询时间范围,对应的周期不同:0<时间范围<=1h——周期:1分钟/5分钟,对应的枚举值为60、300;1h<时间范围<=12h——周期:1分钟/5分钟/1小时,对应的枚举值为60、300、3600;12h<时间范围<=24h——周期:5分钟/1小时,对应的枚举值为300、3600;1天<时间范围<=30天——周期:1小时/6小时/24小时,对应的枚举值为3600、21600、86400
|
|
1133
|
+
*/
|
|
1134
|
+
Period: number;
|
|
1135
|
+
/**
|
|
1136
|
+
*
|
|
1137
|
+
*/
|
|
1138
|
+
MetricInfos?: {
|
|
1139
|
+
/**
|
|
1140
|
+
* 指标名,参数中N的取值范围为 0~9
|
|
1141
|
+
*/
|
|
1142
|
+
Metric: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* 指标所属资源id,参数中N的取值范围为 0~9
|
|
1145
|
+
*/
|
|
1146
|
+
ResourceId: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* 多个 Tag 条件的匹配方式;可选 and(默认)或 or。TagList 中使用 or 时最多支持 3 个 Tag。
|
|
1149
|
+
*/
|
|
1150
|
+
TagOperation?: string;
|
|
1151
|
+
/**
|
|
1152
|
+
*
|
|
1153
|
+
*/
|
|
1154
|
+
TagList?: {
|
|
1155
|
+
/**
|
|
1156
|
+
* 要查询指标的Tag的key,参数中N的取值范围为 0~9
|
|
1157
|
+
*/
|
|
1158
|
+
TagKey?: string;
|
|
1159
|
+
/**
|
|
1160
|
+
* 要查询指标的Tag的Value,参数中N的取值范围为 0~9
|
|
1161
|
+
*/
|
|
1162
|
+
TagValues?: string[];
|
|
1163
|
+
}[];
|
|
1164
|
+
}[];
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* QueryMetricDataSet - 查询监控指标数据集
|
|
1168
|
+
*/
|
|
1169
|
+
export interface QueryMetricDataSetResponse {
|
|
1170
|
+
/**
|
|
1171
|
+
* 日志链路id
|
|
1172
|
+
*/
|
|
1173
|
+
TraceId?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* QueryMetricDataResp
|
|
1176
|
+
*/
|
|
1177
|
+
Data?: {
|
|
1178
|
+
/**
|
|
1179
|
+
* 无效或无权限资源的 ID 列表
|
|
1180
|
+
*/
|
|
1181
|
+
InvalidResourceIds?: string[];
|
|
1182
|
+
/**
|
|
1183
|
+
* 查询的结果集
|
|
1184
|
+
*/
|
|
1185
|
+
List?: {
|
|
1186
|
+
/**
|
|
1187
|
+
* 指标名
|
|
1188
|
+
*/
|
|
1189
|
+
Metric?: string;
|
|
1190
|
+
/**
|
|
1191
|
+
* 该指标查询的处理状态码
|
|
1192
|
+
*/
|
|
1193
|
+
ErrCode?: number;
|
|
1194
|
+
/**
|
|
1195
|
+
* 该指标查询的状态说明
|
|
1196
|
+
*/
|
|
1197
|
+
ErrMsg?: string;
|
|
1198
|
+
/**
|
|
1199
|
+
* 标签列表。每项为 TagEntry:TagName(标签名)和 KeyList(该标签的全部候选值)。
|
|
1200
|
+
*/
|
|
1201
|
+
TagEntries?: {
|
|
1202
|
+
/**
|
|
1203
|
+
* ID
|
|
1204
|
+
*/
|
|
1205
|
+
Id?: number;
|
|
1206
|
+
/**
|
|
1207
|
+
* 资源类型ID
|
|
1208
|
+
*/
|
|
1209
|
+
ObjectType?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* 资源类型
|
|
1212
|
+
*/
|
|
1213
|
+
ObjectTypeKey?: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* 产品名称
|
|
1216
|
+
*/
|
|
1217
|
+
ProductName?: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* 产品子名称
|
|
1220
|
+
*/
|
|
1221
|
+
ProductName1?: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* 产品中文名称
|
|
1224
|
+
*/
|
|
1225
|
+
ProductCNName?: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* 产品英文名称
|
|
1228
|
+
*/
|
|
1229
|
+
ProductENName?: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* {type: spec|basic, key:string, name: string}[] -> JSON字符串
|
|
1232
|
+
*/
|
|
1233
|
+
Metas?: string;
|
|
1234
|
+
}[];
|
|
1235
|
+
/**
|
|
1236
|
+
* 查询到的时间序列列表
|
|
1237
|
+
*/
|
|
1238
|
+
Results?: {
|
|
1239
|
+
/**
|
|
1240
|
+
* 资源的短id
|
|
1241
|
+
*/
|
|
1242
|
+
ResourceId?: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* 资源名称
|
|
1245
|
+
*/
|
|
1246
|
+
ResourceName?: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* 资源标签列表。每项为 TagListItem:Tag(标签名)和 TagValue(标签值)。
|
|
1249
|
+
*/
|
|
1250
|
+
TagList?: number[];
|
|
1251
|
+
/**
|
|
1252
|
+
* 指标数据点列表,元素为 MetricPoint
|
|
1253
|
+
*/
|
|
1254
|
+
Values?: {
|
|
1255
|
+
/**
|
|
1256
|
+
* 时间戳
|
|
1257
|
+
*/
|
|
1258
|
+
Timestamp?: number;
|
|
1259
|
+
/**
|
|
1260
|
+
* 样本值
|
|
1261
|
+
*/
|
|
1262
|
+
Value?: number;
|
|
1263
|
+
}[];
|
|
1264
|
+
}[];
|
|
1265
|
+
}[];
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* QueryMetricDataSummary - 获取资源看图属性列表
|
|
1270
|
+
*/
|
|
1271
|
+
export interface QueryMetricDataSummaryRequest {
|
|
1272
|
+
/**
|
|
1273
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
1274
|
+
*/
|
|
1275
|
+
ProductKey: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* 跳过的数量
|
|
1278
|
+
*/
|
|
1279
|
+
Offset: number;
|
|
1280
|
+
/**
|
|
1281
|
+
* 当前页数据尺寸
|
|
1282
|
+
*/
|
|
1283
|
+
Limit: number;
|
|
1284
|
+
/**
|
|
1285
|
+
* 指定要查询的指标列表,不指定则使用默认的指标集合
|
|
1286
|
+
*/
|
|
1287
|
+
Metrics?: string[];
|
|
1288
|
+
/**
|
|
1289
|
+
* 指定要查询的资源ID列表
|
|
1290
|
+
*/
|
|
1291
|
+
ResourceIds?: string[];
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* QueryMetricDataSummary - 获取资源看图属性列表
|
|
1295
|
+
*/
|
|
1296
|
+
export interface QueryMetricDataSummaryResponse {
|
|
1297
|
+
/**
|
|
1298
|
+
* 链路id
|
|
1299
|
+
*/
|
|
1300
|
+
TraceId?: string;
|
|
1301
|
+
/**
|
|
1302
|
+
* 总数
|
|
1303
|
+
*/
|
|
1304
|
+
TotalCount?: number;
|
|
1305
|
+
/**
|
|
1306
|
+
* 数据
|
|
1307
|
+
*/
|
|
1308
|
+
Data?: {
|
|
1309
|
+
/**
|
|
1310
|
+
* 总数
|
|
1311
|
+
*/
|
|
1312
|
+
Total?: number;
|
|
1313
|
+
/**
|
|
1314
|
+
* 结果集
|
|
1315
|
+
*/
|
|
1316
|
+
List?: {
|
|
1317
|
+
/**
|
|
1318
|
+
* 地域
|
|
1319
|
+
*/
|
|
1320
|
+
Region?: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* 可用区
|
|
1323
|
+
*/
|
|
1324
|
+
Zone?: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* 项目id
|
|
1327
|
+
*/
|
|
1328
|
+
ProjectId?: number;
|
|
1329
|
+
/**
|
|
1330
|
+
* 资源扩展属性列表
|
|
1331
|
+
*/
|
|
1332
|
+
ResourceExtendAttrList?: {
|
|
1333
|
+
/**
|
|
1334
|
+
* 指标名
|
|
1335
|
+
*/
|
|
1336
|
+
Metric?: string;
|
|
1337
|
+
/**
|
|
1338
|
+
* 指标数据数组
|
|
1339
|
+
*/
|
|
1340
|
+
MetricValues?: {
|
|
1341
|
+
/**
|
|
1342
|
+
* 指标名
|
|
1343
|
+
*/
|
|
1344
|
+
Metric?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* 指标标签列表
|
|
1347
|
+
*/
|
|
1348
|
+
TagsList?: {
|
|
1349
|
+
/**
|
|
1350
|
+
* ID
|
|
1351
|
+
*/
|
|
1352
|
+
Id?: number;
|
|
1353
|
+
/**
|
|
1354
|
+
* 资源类型ID
|
|
1355
|
+
*/
|
|
1356
|
+
ProductType?: number;
|
|
1357
|
+
/**
|
|
1358
|
+
* 资源类型唯一key
|
|
1359
|
+
*/
|
|
1360
|
+
ProductKey?: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* 产品名称
|
|
1363
|
+
*/
|
|
1364
|
+
ProductName?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* 产品子名称
|
|
1367
|
+
*/
|
|
1368
|
+
ProductName1?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* 产品中文名称
|
|
1371
|
+
*/
|
|
1372
|
+
ProductChName?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* 产品英文名称
|
|
1375
|
+
*/
|
|
1376
|
+
ProductEnName?: string;
|
|
1377
|
+
/**
|
|
1378
|
+
* {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
|
|
1379
|
+
*/
|
|
1380
|
+
Metas?: string;
|
|
1381
|
+
/**
|
|
1382
|
+
* 产品分组
|
|
1383
|
+
*/
|
|
1384
|
+
ProductGroup?: string;
|
|
1385
|
+
}[];
|
|
1386
|
+
/**
|
|
1387
|
+
* 指标单个样本点对象
|
|
1388
|
+
*/
|
|
1389
|
+
Value?: {
|
|
1390
|
+
/**
|
|
1391
|
+
* 时间戳
|
|
1392
|
+
*/
|
|
1393
|
+
Timestamp?: number;
|
|
1394
|
+
/**
|
|
1395
|
+
* 样本值
|
|
1396
|
+
*/
|
|
1397
|
+
Value?: number;
|
|
1398
|
+
};
|
|
1399
|
+
}[];
|
|
1400
|
+
}[];
|
|
1401
|
+
/**
|
|
1402
|
+
* 资源标签属性列表
|
|
1403
|
+
*/
|
|
1404
|
+
LabelAttrList?: {
|
|
1405
|
+
/**
|
|
1406
|
+
* 指标名
|
|
1407
|
+
*/
|
|
1408
|
+
Metric?: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* 指标数据数组
|
|
1411
|
+
*/
|
|
1412
|
+
MetricValues?: {
|
|
1413
|
+
/**
|
|
1414
|
+
* 指标名
|
|
1415
|
+
*/
|
|
1416
|
+
Metric?: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* 指标标签列表
|
|
1419
|
+
*/
|
|
1420
|
+
TagsList?: {
|
|
1421
|
+
/**
|
|
1422
|
+
* ID
|
|
1423
|
+
*/
|
|
1424
|
+
Id?: number;
|
|
1425
|
+
/**
|
|
1426
|
+
* 资源类型ID
|
|
1427
|
+
*/
|
|
1428
|
+
ProductType?: number;
|
|
1429
|
+
/**
|
|
1430
|
+
* 资源类型唯一key
|
|
1431
|
+
*/
|
|
1432
|
+
ProductKey?: string;
|
|
1433
|
+
/**
|
|
1434
|
+
* 产品名称
|
|
1435
|
+
*/
|
|
1436
|
+
ProductName?: string;
|
|
1437
|
+
/**
|
|
1438
|
+
* 产品子名称
|
|
1439
|
+
*/
|
|
1440
|
+
ProductName1?: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* 产品中文名称
|
|
1443
|
+
*/
|
|
1444
|
+
ProductChName?: string;
|
|
1445
|
+
/**
|
|
1446
|
+
* 产品英文名称
|
|
1447
|
+
*/
|
|
1448
|
+
ProductEnName?: string;
|
|
1449
|
+
/**
|
|
1450
|
+
* {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
|
|
1451
|
+
*/
|
|
1452
|
+
Metas?: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* 产品分组
|
|
1455
|
+
*/
|
|
1456
|
+
ProductGroup?: string;
|
|
1457
|
+
}[];
|
|
1458
|
+
/**
|
|
1459
|
+
* 指标单个样本点对象
|
|
1460
|
+
*/
|
|
1461
|
+
Value?: {
|
|
1462
|
+
/**
|
|
1463
|
+
* 时间戳
|
|
1464
|
+
*/
|
|
1465
|
+
Timestamp?: number;
|
|
1466
|
+
/**
|
|
1467
|
+
* 样本值
|
|
1468
|
+
*/
|
|
1469
|
+
Value?: number;
|
|
1470
|
+
};
|
|
1471
|
+
}[];
|
|
1472
|
+
}[];
|
|
1473
|
+
/**
|
|
1474
|
+
* 公司id
|
|
1475
|
+
*/
|
|
1476
|
+
CompanyId?: number;
|
|
1477
|
+
/**
|
|
1478
|
+
* 资源id
|
|
1479
|
+
*/
|
|
1480
|
+
ResourceId?: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* 资源名称
|
|
1483
|
+
*/
|
|
1484
|
+
Name?: string;
|
|
1485
|
+
/**
|
|
1486
|
+
* 地域中文名
|
|
1487
|
+
*/
|
|
1488
|
+
RegionCN?: string;
|
|
1489
|
+
/**
|
|
1490
|
+
* 可用区中文
|
|
1491
|
+
*/
|
|
1492
|
+
ZoneCN?: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* 产品类型
|
|
1495
|
+
*/
|
|
1496
|
+
ProductKey?: string;
|
|
1497
|
+
/**
|
|
1498
|
+
* 项目id
|
|
1499
|
+
*/
|
|
1500
|
+
OrganizationId?: number;
|
|
1501
|
+
/**
|
|
1502
|
+
* 资源状态
|
|
1503
|
+
*/
|
|
1504
|
+
Status?: number;
|
|
1505
|
+
/**
|
|
1506
|
+
* 资源的各项指标当前值列表
|
|
1507
|
+
*/
|
|
1508
|
+
MonitorAttr?: {
|
|
1509
|
+
/**
|
|
1510
|
+
* 指标名
|
|
1511
|
+
*/
|
|
1512
|
+
Metric?: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* 指标数据数组
|
|
1515
|
+
*/
|
|
1516
|
+
MetricValues?: {
|
|
1517
|
+
/**
|
|
1518
|
+
* 指标名
|
|
1519
|
+
*/
|
|
1520
|
+
Metric?: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* 指标标签列表
|
|
1523
|
+
*/
|
|
1524
|
+
TagsList?: {
|
|
1525
|
+
/**
|
|
1526
|
+
* ID
|
|
1527
|
+
*/
|
|
1528
|
+
Id?: number;
|
|
1529
|
+
/**
|
|
1530
|
+
* 资源类型ID
|
|
1531
|
+
*/
|
|
1532
|
+
ProductType?: number;
|
|
1533
|
+
/**
|
|
1534
|
+
* 资源类型唯一key
|
|
1535
|
+
*/
|
|
1536
|
+
ProductKey?: string;
|
|
1537
|
+
/**
|
|
1538
|
+
* 产品名称
|
|
1539
|
+
*/
|
|
1540
|
+
ProductName?: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* 产品子名称
|
|
1543
|
+
*/
|
|
1544
|
+
ProductName1?: string;
|
|
1545
|
+
/**
|
|
1546
|
+
* 产品中文名称
|
|
1547
|
+
*/
|
|
1548
|
+
ProductChName?: string;
|
|
1549
|
+
/**
|
|
1550
|
+
* 产品英文名称
|
|
1551
|
+
*/
|
|
1552
|
+
ProductEnName?: string;
|
|
1553
|
+
/**
|
|
1554
|
+
* {Type: 1|2, Key:string, Name: string}[] -> JSON字符串
|
|
1555
|
+
*/
|
|
1556
|
+
Metas?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* 产品分组
|
|
1559
|
+
*/
|
|
1560
|
+
ProductGroup?: string;
|
|
1561
|
+
}[];
|
|
1562
|
+
/**
|
|
1563
|
+
* 指标单个样本点对象
|
|
1564
|
+
*/
|
|
1565
|
+
Value?: {
|
|
1566
|
+
/**
|
|
1567
|
+
* 时间戳
|
|
1568
|
+
*/
|
|
1569
|
+
Timestamp?: number;
|
|
1570
|
+
/**
|
|
1571
|
+
* 样本值
|
|
1572
|
+
*/
|
|
1573
|
+
Value?: number;
|
|
1574
|
+
};
|
|
1575
|
+
}[];
|
|
1576
|
+
}[];
|
|
1577
|
+
}[];
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
/**
|
|
1581
|
+
* UnBindAlertStrategy - 解绑告警策略
|
|
1582
|
+
*/
|
|
1583
|
+
export interface UnBindAlertStrategyRequest {
|
|
1584
|
+
/**
|
|
1585
|
+
* 告警策略数组
|
|
1586
|
+
*/
|
|
1587
|
+
AlertStrategyIDs: number[];
|
|
1588
|
+
/**
|
|
1589
|
+
* 资源数组
|
|
1590
|
+
*/
|
|
1591
|
+
Resources: string[];
|
|
1592
|
+
/**
|
|
1593
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
1594
|
+
*/
|
|
1595
|
+
ProductKey: string;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* UnBindAlertStrategy - 解绑告警策略
|
|
1599
|
+
*/
|
|
1600
|
+
export interface UnBindAlertStrategyResponse {
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* UpdateAlertStrategy - 更新告警策略
|
|
1604
|
+
*/
|
|
1605
|
+
export interface UpdateAlertStrategyRequest {
|
|
1606
|
+
/**
|
|
1607
|
+
* 告警策略id
|
|
1608
|
+
*/
|
|
1609
|
+
AlertStrategyID: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* 告警策略名称。最大长度255个字符
|
|
1612
|
+
*/
|
|
1613
|
+
Name: string;
|
|
1614
|
+
/**
|
|
1615
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
1616
|
+
*/
|
|
1617
|
+
ProductKey: string;
|
|
1618
|
+
/**
|
|
1619
|
+
* 绑定资源类型 1 资源组 2 资源
|
|
1620
|
+
*/
|
|
1621
|
+
ObjectType: number;
|
|
1622
|
+
/**
|
|
1623
|
+
* 条件设置方式 1. 手动配置 2.选择模版
|
|
1624
|
+
*/
|
|
1625
|
+
ConfigMode: number;
|
|
1626
|
+
/**
|
|
1627
|
+
* 绑定资源,对应绑定资源类型ObjectType=2
|
|
1628
|
+
*/
|
|
1629
|
+
Resources?: string[];
|
|
1630
|
+
/**
|
|
1631
|
+
* 绑定资源组,对应绑定资源类型ObjectType=1
|
|
1632
|
+
*/
|
|
1633
|
+
ResourceGroupIDs?: number[];
|
|
1634
|
+
/**
|
|
1635
|
+
* 模板id.对应ConfigMode=2
|
|
1636
|
+
*/
|
|
1637
|
+
TemplateId?: number;
|
|
1638
|
+
/**
|
|
1639
|
+
*
|
|
1640
|
+
*/
|
|
1641
|
+
RuleSet?: {
|
|
1642
|
+
/**
|
|
1643
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
1644
|
+
*/
|
|
1645
|
+
MetricID?: number;
|
|
1646
|
+
/**
|
|
1647
|
+
* 阈值比较方式。 枚举值:1:>= 2:<= 3:> 4:< 5:== 6:!=
|
|
1648
|
+
*/
|
|
1649
|
+
ThresholdCompare?: number;
|
|
1650
|
+
/**
|
|
1651
|
+
* 触发阈值
|
|
1652
|
+
*/
|
|
1653
|
+
ThresholdValue?: number;
|
|
1654
|
+
/**
|
|
1655
|
+
* 触发次数
|
|
1656
|
+
*/
|
|
1657
|
+
TriggerCount?: number;
|
|
1658
|
+
/**
|
|
1659
|
+
* 触发周期。枚举值:continuous连续 exponent 指数 single 不重复
|
|
1660
|
+
*/
|
|
1661
|
+
SendPeriodType?: string;
|
|
1662
|
+
/**
|
|
1663
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
1664
|
+
*/
|
|
1665
|
+
Level?: string;
|
|
1666
|
+
/**
|
|
1667
|
+
* 告警状态。枚举值:0-关闭 1-开启
|
|
1668
|
+
*/
|
|
1669
|
+
Status?: number;
|
|
1670
|
+
/**
|
|
1671
|
+
* 沉默周期(告警周期选择为连续时必填)
|
|
1672
|
+
*/
|
|
1673
|
+
SendInterval?: number;
|
|
1674
|
+
}[];
|
|
1675
|
+
/**
|
|
1676
|
+
* 通知类型 通知组 group 通知人 user
|
|
1677
|
+
*/
|
|
1678
|
+
NotifyType?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* 通知人id
|
|
1681
|
+
*/
|
|
1682
|
+
NotifyUserIDs?: number[];
|
|
1683
|
+
/**
|
|
1684
|
+
* 通知人组id
|
|
1685
|
+
*/
|
|
1686
|
+
NotifyGroupIDs?: number[];
|
|
1687
|
+
/**
|
|
1688
|
+
* 通知渠道 短信sms 邮件email 回调webhook
|
|
1689
|
+
*/
|
|
1690
|
+
NotifyChannelDs?: string[];
|
|
1691
|
+
/**
|
|
1692
|
+
* 通知渠道回调webhook 回调语言 中文cn 英文en
|
|
1693
|
+
*/
|
|
1694
|
+
CallbackLanguage?: string;
|
|
1695
|
+
/**
|
|
1696
|
+
* 回调url
|
|
1697
|
+
*/
|
|
1698
|
+
CallbackUrls?: string[];
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* UpdateAlertStrategy - 更新告警策略
|
|
1702
|
+
*/
|
|
1703
|
+
export interface UpdateAlertStrategyResponse {
|
|
1704
|
+
/**
|
|
1705
|
+
* 更新告警策略返回对象
|
|
1706
|
+
*/
|
|
1707
|
+
Data?: {
|
|
1708
|
+
/**
|
|
1709
|
+
* 告警策略id
|
|
1710
|
+
*/
|
|
1711
|
+
AlertStrategyID?: number;
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* UpdateAlertStrategyTemplate - 编辑条件模板
|
|
1716
|
+
*/
|
|
1717
|
+
export interface UpdateAlertStrategyTemplateRequest {
|
|
1718
|
+
/**
|
|
1719
|
+
* 条件模板ID
|
|
1720
|
+
*/
|
|
1721
|
+
TemplateID: number;
|
|
1722
|
+
/**
|
|
1723
|
+
* 告警模板名称。最大长度64个字符
|
|
1724
|
+
*/
|
|
1725
|
+
Name: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* 产品唯一标识,参见 [产品概览](https://docs.ucloud.cn/cloudwatch/metric/intro)
|
|
1728
|
+
*/
|
|
1729
|
+
ProductKey: string;
|
|
1730
|
+
/**
|
|
1731
|
+
*
|
|
1732
|
+
*/
|
|
1733
|
+
RuleSet?: {
|
|
1734
|
+
/**
|
|
1735
|
+
* 规则指标ID。参考该类型产品下返回的指标列表GetProductMetrics
|
|
1736
|
+
*/
|
|
1737
|
+
MetricID: number;
|
|
1738
|
+
/**
|
|
1739
|
+
* 阈值比较方式。枚举值比较方式: 1->=2-<= 3-> 4-< 5-== 6-!=
|
|
1740
|
+
*/
|
|
1741
|
+
ThresholdCompare: number;
|
|
1742
|
+
/**
|
|
1743
|
+
* 触发阈值
|
|
1744
|
+
*/
|
|
1745
|
+
ThresholdValue: number;
|
|
1746
|
+
/**
|
|
1747
|
+
* 触发次数
|
|
1748
|
+
*/
|
|
1749
|
+
TriggerCount: number;
|
|
1750
|
+
/**
|
|
1751
|
+
* 触发周期。枚举值:continuous连续 exponent 指数 single 不重复
|
|
1752
|
+
*/
|
|
1753
|
+
SendPeriodType: string;
|
|
1754
|
+
/**
|
|
1755
|
+
* 告警等级。枚举值:P0,P1,P2,P3
|
|
1756
|
+
*/
|
|
1757
|
+
Level: string;
|
|
1758
|
+
/**
|
|
1759
|
+
* 告警状态。枚举值:0-关闭 1-开启
|
|
1760
|
+
*/
|
|
1761
|
+
Status: number;
|
|
1762
|
+
/**
|
|
1763
|
+
* 沉默周期(告警周期选择为连续时必填)
|
|
1764
|
+
*/
|
|
1765
|
+
SendInterval?: number;
|
|
1766
|
+
}[];
|
|
1767
|
+
/**
|
|
1768
|
+
* 备注
|
|
1769
|
+
*/
|
|
1770
|
+
Remark?: string;
|
|
1771
|
+
}
|
|
1772
|
+
/**
|
|
1773
|
+
* UpdateAlertStrategyTemplate - 编辑条件模板
|
|
1774
|
+
*/
|
|
1775
|
+
export interface UpdateAlertStrategyTemplateResponse {
|
|
1776
|
+
/**
|
|
1777
|
+
* 更新条件模板ID
|
|
1778
|
+
*/
|
|
1779
|
+
Data?: {
|
|
1780
|
+
/**
|
|
1781
|
+
* 告警模板ID
|
|
1782
|
+
*/
|
|
1783
|
+
TemplateID: number;
|
|
1784
|
+
};
|
|
1785
|
+
}
|