tencentcloud-sdk-nodejs 4.0.1032 → 4.0.1033
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/package.json +1 -1
- package/src/common/sdk_version.ts +1 -1
- package/src/services/billing/v20180709/billing_client.ts +7 -51
- package/src/services/billing/v20180709/billing_models.ts +0 -229
- package/src/services/domain/v20180808/domain_models.ts +4 -4
- package/src/services/facefusion/v20220927/facefusion_client.ts +0 -1
- package/src/services/gme/v20180711/gme_models.ts +5 -11
- package/src/services/keewidb/v20220308/keewidb_client.ts +3 -2
- package/src/services/keewidb/v20220308/keewidb_models.ts +1 -1
- package/src/services/lcic/v20220817/lcic_models.ts +0 -2
- package/src/services/lighthouse/v20200324/lighthouse_models.ts +2 -8
- package/src/services/lkeap/v20240522/lkeap_client.ts +4 -4
- package/src/services/lkeap/v20240522/lkeap_models.ts +2 -3
- package/src/services/mna/v20210119/mna_client.ts +28 -3
- package/src/services/mna/v20210119/mna_models.ts +158 -40
- package/src/services/monitor/index.ts +2 -0
- package/src/services/monitor/v20230616/index.ts +6 -0
- package/src/services/monitor/v20230616/monitor_client.ts +53 -0
- package/src/services/monitor/v20230616/monitor_models.ts +143 -0
- package/src/services/mqtt/v20240516/mqtt_client.ts +150 -52
- package/src/services/mqtt/v20240516/mqtt_models.ts +378 -30
- package/src/services/ocr/v20181119/ocr_models.ts +4 -0
- package/src/services/ssl/v20191205/ssl_models.ts +1 -1
- package/src/services/trtc/v20190722/trtc_models.ts +0 -3
- package/src/services/vclm/v20240523/vclm_client.ts +7 -80
- package/src/services/vclm/v20240523/vclm_models.ts +103 -347
- package/src/services/wedata/v20210820/wedata_client.ts +22 -10
- package/src/services/wedata/v20210820/wedata_models.ts +125 -110
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/billing/v20180709/billing_client.d.ts +3 -21
- package/tencentcloud/services/billing/v20180709/billing_client.js +3 -27
- package/tencentcloud/services/billing/v20180709/billing_models.d.ts +0 -221
- package/tencentcloud/services/domain/v20180808/domain_models.d.ts +4 -4
- package/tencentcloud/services/facefusion/v20220927/facefusion_client.d.ts +0 -1
- package/tencentcloud/services/facefusion/v20220927/facefusion_client.js +0 -1
- package/tencentcloud/services/gme/v20180711/gme_models.d.ts +5 -11
- package/tencentcloud/services/keewidb/v20220308/keewidb_client.d.ts +1 -0
- package/tencentcloud/services/keewidb/v20220308/keewidb_client.js +1 -0
- package/tencentcloud/services/keewidb/v20220308/keewidb_models.d.ts +1 -1
- package/tencentcloud/services/lcic/v20220817/lcic_models.d.ts +0 -2
- package/tencentcloud/services/lighthouse/v20200324/lighthouse_models.d.ts +2 -8
- package/tencentcloud/services/lkeap/v20240522/lkeap_client.d.ts +4 -4
- package/tencentcloud/services/lkeap/v20240522/lkeap_client.js +4 -4
- package/tencentcloud/services/lkeap/v20240522/lkeap_models.d.ts +2 -3
- package/tencentcloud/services/mna/v20210119/mna_client.d.ts +9 -1
- package/tencentcloud/services/mna/v20210119/mna_client.js +12 -0
- package/tencentcloud/services/mna/v20210119/mna_models.d.ts +153 -40
- package/tencentcloud/services/monitor/index.d.ts +4 -0
- package/tencentcloud/services/monitor/index.js +2 -0
- package/tencentcloud/services/monitor/v20230616/index.d.ts +6 -0
- package/tencentcloud/services/monitor/v20230616/index.js +9 -0
- package/tencentcloud/services/monitor/v20230616/monitor_client.d.ts +20 -0
- package/tencentcloud/services/monitor/v20230616/monitor_client.js +43 -0
- package/tencentcloud/services/monitor/v20230616/monitor_models.d.ts +121 -0
- package/tencentcloud/services/monitor/v20230616/monitor_models.js +18 -0
- package/tencentcloud/services/mqtt/v20240516/mqtt_client.d.ts +53 -20
- package/tencentcloud/services/mqtt/v20240516/mqtt_client.js +75 -26
- package/tencentcloud/services/mqtt/v20240516/mqtt_models.d.ts +361 -30
- package/tencentcloud/services/ocr/v20181119/ocr_models.d.ts +4 -0
- package/tencentcloud/services/ssl/v20191205/ssl_models.d.ts +1 -1
- package/tencentcloud/services/trtc/v20190722/trtc_models.d.ts +0 -3
- package/tencentcloud/services/vclm/v20240523/vclm_client.d.ts +1 -48
- package/tencentcloud/services/vclm/v20240523/vclm_client.js +0 -53
- package/tencentcloud/services/vclm/v20240523/vclm_models.d.ts +101 -337
- package/tencentcloud/services/wedata/v20210820/wedata_client.d.ts +7 -3
- package/tencentcloud/services/wedata/v20210820/wedata_client.js +9 -3
- package/tencentcloud/services/wedata/v20210820/wedata_models.d.ts +123 -110
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
GetFlowPackagesResponse,
|
|
37
37
|
DeleteL3ConnRequest,
|
|
38
38
|
GetVendorHardwareResponse,
|
|
39
|
+
GetActiveDeviceCountResponse,
|
|
39
40
|
DeviceBaseInfo,
|
|
40
41
|
AddGroupRequest,
|
|
41
42
|
GetGroupListRequest,
|
|
@@ -73,18 +74,19 @@ import {
|
|
|
73
74
|
SetNotifyUrlRequest,
|
|
74
75
|
GetDevicePayModeRequest,
|
|
75
76
|
Capacity,
|
|
76
|
-
|
|
77
|
+
GetFlowStatisticRequest,
|
|
77
78
|
SlotNetInfo,
|
|
78
79
|
DeviceNetInfo,
|
|
79
80
|
NetDetails,
|
|
80
81
|
CreateQosResponse,
|
|
81
82
|
ActivateHardware,
|
|
83
|
+
DownloadActiveDeviceCountResponse,
|
|
82
84
|
GetHardwareListRequest,
|
|
83
85
|
FlowDetails,
|
|
84
86
|
GroupDeleteDeviceRequest,
|
|
85
87
|
DeviceDetails,
|
|
86
88
|
GetFlowStatisticByRegionResponse,
|
|
87
|
-
|
|
89
|
+
ActiveDeviceList,
|
|
88
90
|
GetMultiFlowStatisticRequest,
|
|
89
91
|
ExpectedThreshold,
|
|
90
92
|
GetFlowAlarmInfoResponse,
|
|
@@ -93,6 +95,7 @@ import {
|
|
|
93
95
|
UpdateGroupResponse,
|
|
94
96
|
GetL3ConnListRequest,
|
|
95
97
|
FlowPackageInfo,
|
|
98
|
+
DownloadActiveDeviceCountRequest,
|
|
96
99
|
GetHardwareListResponse,
|
|
97
100
|
AddDeviceRequest,
|
|
98
101
|
OrderPerLicenseRequest,
|
|
@@ -105,15 +108,17 @@ import {
|
|
|
105
108
|
OrderFlowPackageResponse,
|
|
106
109
|
UpdateDeviceResponse,
|
|
107
110
|
L3ConnInfo,
|
|
111
|
+
ActivateHardwareRequest,
|
|
108
112
|
GroupAddDeviceResponse,
|
|
109
113
|
GetStatisticDataRequest,
|
|
110
114
|
UpdateDeviceRequest,
|
|
111
115
|
DeleteGroupResponse,
|
|
112
116
|
GetPublicKeyResponse,
|
|
113
117
|
AddHardwareResponse,
|
|
114
|
-
|
|
118
|
+
Context,
|
|
115
119
|
AddDeviceResponse,
|
|
116
120
|
GetDevicePayModeResponse,
|
|
121
|
+
GetActiveDeviceCountRequest,
|
|
117
122
|
UpdateL3ConnRequest,
|
|
118
123
|
DevicePayModeInfo,
|
|
119
124
|
MonitorData,
|
|
@@ -154,6 +159,16 @@ export class Client extends AbstractClient {
|
|
|
154
159
|
return this.request("UpdateHardware", req, cb)
|
|
155
160
|
}
|
|
156
161
|
|
|
162
|
+
/**
|
|
163
|
+
* 下载活跃设备数量统计
|
|
164
|
+
*/
|
|
165
|
+
async DownloadActiveDeviceCount(
|
|
166
|
+
req: DownloadActiveDeviceCountRequest,
|
|
167
|
+
cb?: (error: string, rep: DownloadActiveDeviceCountResponse) => void
|
|
168
|
+
): Promise<DownloadActiveDeviceCountResponse> {
|
|
169
|
+
return this.request("DownloadActiveDeviceCount", req, cb)
|
|
170
|
+
}
|
|
171
|
+
|
|
157
172
|
/**
|
|
158
173
|
* 可开启/关闭流量包自动续费,不影响当前周期正在生效的流量包。
|
|
159
174
|
*/
|
|
@@ -308,6 +323,16 @@ export class Client extends AbstractClient {
|
|
|
308
323
|
return this.request("DescribeQos", req, cb)
|
|
309
324
|
}
|
|
310
325
|
|
|
326
|
+
/**
|
|
327
|
+
* 活跃设备数量统计
|
|
328
|
+
*/
|
|
329
|
+
async GetActiveDeviceCount(
|
|
330
|
+
req: GetActiveDeviceCountRequest,
|
|
331
|
+
cb?: (error: string, rep: GetActiveDeviceCountResponse) => void
|
|
332
|
+
): Promise<GetActiveDeviceCountResponse> {
|
|
333
|
+
return this.request("GetActiveDeviceCount", req, cb)
|
|
334
|
+
}
|
|
335
|
+
|
|
311
336
|
/**
|
|
312
337
|
* 删除设备信息
|
|
313
338
|
*/
|
|
@@ -311,6 +311,44 @@ export interface GetVendorHardwareResponse {
|
|
|
311
311
|
RequestId?: string
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
/**
|
|
315
|
+
* GetActiveDeviceCount返回参数结构体
|
|
316
|
+
*/
|
|
317
|
+
export interface GetActiveDeviceCountResponse {
|
|
318
|
+
/**
|
|
319
|
+
* 激活设备统计
|
|
320
|
+
*/
|
|
321
|
+
ActiveDeviceList?: Array<ActiveDeviceList>
|
|
322
|
+
/**
|
|
323
|
+
* 查询粒度,0:day, 1:week, 2:month, 不传默认为day
|
|
324
|
+
*/
|
|
325
|
+
Period?: number
|
|
326
|
+
/**
|
|
327
|
+
* 开始时间
|
|
328
|
+
*/
|
|
329
|
+
StartTime?: string
|
|
330
|
+
/**
|
|
331
|
+
* 结束时间
|
|
332
|
+
*/
|
|
333
|
+
EndTime?: string
|
|
334
|
+
/**
|
|
335
|
+
* 设备组
|
|
336
|
+
*/
|
|
337
|
+
DevGroup?: string
|
|
338
|
+
/**
|
|
339
|
+
* license类型, 不传查询全部, 1: 租户月付,2:厂商月付,3:永久授权
|
|
340
|
+
*/
|
|
341
|
+
LicenseType?: string
|
|
342
|
+
/**
|
|
343
|
+
* 租户ID
|
|
344
|
+
*/
|
|
345
|
+
AppId?: string
|
|
346
|
+
/**
|
|
347
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
348
|
+
*/
|
|
349
|
+
RequestId?: string
|
|
350
|
+
}
|
|
351
|
+
|
|
314
352
|
/**
|
|
315
353
|
* 设备的基本信息
|
|
316
354
|
*/
|
|
@@ -1109,21 +1147,41 @@ export interface Capacity {
|
|
|
1109
1147
|
}
|
|
1110
1148
|
|
|
1111
1149
|
/**
|
|
1112
|
-
*
|
|
1150
|
+
* GetFlowStatistic请求参数结构体
|
|
1113
1151
|
*/
|
|
1114
|
-
export interface
|
|
1152
|
+
export interface GetFlowStatisticRequest {
|
|
1115
1153
|
/**
|
|
1116
|
-
*
|
|
1154
|
+
* 设备ID
|
|
1117
1155
|
*/
|
|
1118
|
-
|
|
1156
|
+
DeviceId: string
|
|
1119
1157
|
/**
|
|
1120
|
-
*
|
|
1158
|
+
* 开始查找时间
|
|
1121
1159
|
*/
|
|
1122
|
-
|
|
1160
|
+
BeginTime: number
|
|
1123
1161
|
/**
|
|
1124
|
-
*
|
|
1162
|
+
* 截止时间
|
|
1125
1163
|
*/
|
|
1126
|
-
|
|
1164
|
+
EndTime: number
|
|
1165
|
+
/**
|
|
1166
|
+
* 流量种类(1:上行流量,2:下行流量,3:上下行总和)
|
|
1167
|
+
*/
|
|
1168
|
+
Type: number
|
|
1169
|
+
/**
|
|
1170
|
+
* 时间粒度(1:按小时统计,2:按天统计)
|
|
1171
|
+
*/
|
|
1172
|
+
TimeGranularity: number
|
|
1173
|
+
/**
|
|
1174
|
+
* 接入区域。取值范围:['MC','AP','EU','AM'] MC=中国大陆 AP=亚太 EU=欧洲 AM=美洲。不填代表全量区域。
|
|
1175
|
+
*/
|
|
1176
|
+
AccessRegion?: string
|
|
1177
|
+
/**
|
|
1178
|
+
* 网关类型。0:公有云网关;1:自有网关。不传默认为0。
|
|
1179
|
+
*/
|
|
1180
|
+
GatewayType?: number
|
|
1181
|
+
/**
|
|
1182
|
+
* 设备ID列表,用于查询多设备流量,该字段启用时DeviceId可传"-1"
|
|
1183
|
+
*/
|
|
1184
|
+
DeviceList?: Array<string>
|
|
1127
1185
|
}
|
|
1128
1186
|
|
|
1129
1187
|
/**
|
|
@@ -1310,6 +1368,20 @@ export interface ActivateHardware {
|
|
|
1310
1368
|
DeviceId?: string
|
|
1311
1369
|
}
|
|
1312
1370
|
|
|
1371
|
+
/**
|
|
1372
|
+
* DownloadActiveDeviceCount返回参数结构体
|
|
1373
|
+
*/
|
|
1374
|
+
export interface DownloadActiveDeviceCountResponse {
|
|
1375
|
+
/**
|
|
1376
|
+
* URL地址
|
|
1377
|
+
*/
|
|
1378
|
+
FilePath?: string
|
|
1379
|
+
/**
|
|
1380
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
1381
|
+
*/
|
|
1382
|
+
RequestId?: string
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1313
1385
|
/**
|
|
1314
1386
|
* GetHardwareList请求参数结构体
|
|
1315
1387
|
*/
|
|
@@ -1421,13 +1493,17 @@ export interface GetFlowStatisticByRegionResponse {
|
|
|
1421
1493
|
}
|
|
1422
1494
|
|
|
1423
1495
|
/**
|
|
1424
|
-
*
|
|
1496
|
+
* 激活设备数统计
|
|
1425
1497
|
*/
|
|
1426
|
-
export interface
|
|
1498
|
+
export interface ActiveDeviceList {
|
|
1427
1499
|
/**
|
|
1428
|
-
*
|
|
1500
|
+
* 数量
|
|
1429
1501
|
*/
|
|
1430
|
-
|
|
1502
|
+
Count?: number
|
|
1503
|
+
/**
|
|
1504
|
+
* 时间
|
|
1505
|
+
*/
|
|
1506
|
+
Time?: string
|
|
1431
1507
|
}
|
|
1432
1508
|
|
|
1433
1509
|
/**
|
|
@@ -1677,6 +1753,32 @@ DEVICE_5_FLOW_500G,分别代表20G、50G、100G、500G档位的流量包。
|
|
|
1677
1753
|
CapacityRemainPrecise?: number
|
|
1678
1754
|
}
|
|
1679
1755
|
|
|
1756
|
+
/**
|
|
1757
|
+
* DownloadActiveDeviceCount请求参数结构体
|
|
1758
|
+
*/
|
|
1759
|
+
export interface DownloadActiveDeviceCountRequest {
|
|
1760
|
+
/**
|
|
1761
|
+
* 查询粒度。0:day, 1:week, 2:month, 不传默认为day
|
|
1762
|
+
*/
|
|
1763
|
+
Period?: number
|
|
1764
|
+
/**
|
|
1765
|
+
* 开始时间。单位秒
|
|
1766
|
+
*/
|
|
1767
|
+
StartTime?: number
|
|
1768
|
+
/**
|
|
1769
|
+
* 结束时间。单位秒
|
|
1770
|
+
*/
|
|
1771
|
+
EndTime?: number
|
|
1772
|
+
/**
|
|
1773
|
+
* 设备组, 不传查询全部
|
|
1774
|
+
*/
|
|
1775
|
+
DevGroup?: string
|
|
1776
|
+
/**
|
|
1777
|
+
* license类型, 不传查询全部, 1: 租户月付,2:厂商月付,3:永久授权
|
|
1778
|
+
*/
|
|
1779
|
+
LicenseType?: number
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1680
1782
|
/**
|
|
1681
1783
|
* GetHardwareList返回参数结构体
|
|
1682
1784
|
*/
|
|
@@ -1959,6 +2061,16 @@ export interface L3ConnInfo {
|
|
|
1959
2061
|
Description?: string
|
|
1960
2062
|
}
|
|
1961
2063
|
|
|
2064
|
+
/**
|
|
2065
|
+
* ActivateHardware请求参数结构体
|
|
2066
|
+
*/
|
|
2067
|
+
export interface ActivateHardwareRequest {
|
|
2068
|
+
/**
|
|
2069
|
+
* 待激活的设备列表
|
|
2070
|
+
*/
|
|
2071
|
+
Hardware: Array<ActivateHardware>
|
|
2072
|
+
}
|
|
2073
|
+
|
|
1962
2074
|
/**
|
|
1963
2075
|
* GroupAddDevice返回参数结构体
|
|
1964
2076
|
*/
|
|
@@ -2078,41 +2190,21 @@ export interface AddHardwareResponse {
|
|
|
2078
2190
|
}
|
|
2079
2191
|
|
|
2080
2192
|
/**
|
|
2081
|
-
*
|
|
2193
|
+
* 加速策略关键数据
|
|
2082
2194
|
*/
|
|
2083
|
-
export interface
|
|
2084
|
-
/**
|
|
2085
|
-
* 设备ID
|
|
2086
|
-
*/
|
|
2087
|
-
DeviceId: string
|
|
2088
|
-
/**
|
|
2089
|
-
* 开始查找时间
|
|
2090
|
-
*/
|
|
2091
|
-
BeginTime: number
|
|
2092
|
-
/**
|
|
2093
|
-
* 截止时间
|
|
2094
|
-
*/
|
|
2095
|
-
EndTime: number
|
|
2096
|
-
/**
|
|
2097
|
-
* 流量种类(1:上行流量,2:下行流量,3:上下行总和)
|
|
2098
|
-
*/
|
|
2099
|
-
Type: number
|
|
2100
|
-
/**
|
|
2101
|
-
* 时间粒度(1:按小时统计,2:按天统计)
|
|
2102
|
-
*/
|
|
2103
|
-
TimeGranularity: number
|
|
2195
|
+
export interface Context {
|
|
2104
2196
|
/**
|
|
2105
|
-
*
|
|
2197
|
+
* 测速数据
|
|
2106
2198
|
*/
|
|
2107
|
-
|
|
2199
|
+
NetworkData?: NetworkData
|
|
2108
2200
|
/**
|
|
2109
|
-
*
|
|
2201
|
+
* 用户期望最低门限
|
|
2110
2202
|
*/
|
|
2111
|
-
|
|
2203
|
+
ExpectedLowThreshold?: ExpectedThreshold
|
|
2112
2204
|
/**
|
|
2113
|
-
*
|
|
2205
|
+
* 用户期望最高门限
|
|
2114
2206
|
*/
|
|
2115
|
-
|
|
2207
|
+
ExpectedHighThreshold?: ExpectedThreshold
|
|
2116
2208
|
}
|
|
2117
2209
|
|
|
2118
2210
|
/**
|
|
@@ -2151,6 +2243,32 @@ export interface GetDevicePayModeResponse {
|
|
|
2151
2243
|
RequestId?: string
|
|
2152
2244
|
}
|
|
2153
2245
|
|
|
2246
|
+
/**
|
|
2247
|
+
* GetActiveDeviceCount请求参数结构体
|
|
2248
|
+
*/
|
|
2249
|
+
export interface GetActiveDeviceCountRequest {
|
|
2250
|
+
/**
|
|
2251
|
+
* 查询粒度。0:day, 1:week, 2:month, 不传默认为day
|
|
2252
|
+
*/
|
|
2253
|
+
Period?: number
|
|
2254
|
+
/**
|
|
2255
|
+
* 开始时间。单位秒
|
|
2256
|
+
*/
|
|
2257
|
+
StartTime?: number
|
|
2258
|
+
/**
|
|
2259
|
+
* 结束时间。单位秒
|
|
2260
|
+
*/
|
|
2261
|
+
EndTime?: number
|
|
2262
|
+
/**
|
|
2263
|
+
* 设备组, 不传查询全部
|
|
2264
|
+
*/
|
|
2265
|
+
DevGroup?: string
|
|
2266
|
+
/**
|
|
2267
|
+
* license类型, 不传查询全部, 1: 租户月付,2:厂商月付,3:永久授权
|
|
2268
|
+
*/
|
|
2269
|
+
LicenseType?: number
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2154
2272
|
/**
|
|
2155
2273
|
* UpdateL3Conn请求参数结构体
|
|
2156
2274
|
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { AbstractClient } from "../../../common/abstract_client"
|
|
19
|
+
import { ClientConfig } from "../../../common/interface"
|
|
20
|
+
import {
|
|
21
|
+
GetMonitorDataResponse,
|
|
22
|
+
Expr,
|
|
23
|
+
GetMonitorDataRequest,
|
|
24
|
+
Instance,
|
|
25
|
+
DataPoint,
|
|
26
|
+
Dimension,
|
|
27
|
+
} from "./monitor_models"
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* monitor client
|
|
31
|
+
* @class
|
|
32
|
+
*/
|
|
33
|
+
export class Client extends AbstractClient {
|
|
34
|
+
constructor(clientConfig: ClientConfig) {
|
|
35
|
+
super("monitor.tencentcloudapi.com", "2023-06-16", clientConfig)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 获取云产品的监控数据。此接口不适用于拉取容器服务监控数据,如需拉取容器服务监控数据,请使用[根据维度条件查询监控数据](https://cloud.tencent.com/document/product/248/51845)接口。
|
|
40
|
+
传入产品的命名空间、对象维度描述和监控指标即可获得相应的监控数据。
|
|
41
|
+
接口调用限制:单请求最多可支持批量拉取10个实例的监控数据,单请求的数据点数限制为1440个。
|
|
42
|
+
若您需要调用的指标、对象较多,可能存在因限频出现拉取失败的情况,建议尽量将请求按时间维度均摊。
|
|
43
|
+
|
|
44
|
+
>?
|
|
45
|
+
>- 2022年9月1日起,云监控开始对GetMonitorData接口计费。每个主账号每月可获得100万次免费请求额度,超过免费额度后如需继续调用接口需要开通 [API请求按量付费](https://buy.cloud.tencent.com/APIRequestBuy)。计费规则可查看[API计费文档](https://cloud.tencent.com/document/product/248/77914)。
|
|
46
|
+
*/
|
|
47
|
+
async GetMonitorData(
|
|
48
|
+
req: GetMonitorDataRequest,
|
|
49
|
+
cb?: (error: string, rep: GetMonitorDataResponse) => void
|
|
50
|
+
): Promise<GetMonitorDataResponse> {
|
|
51
|
+
return this.request("GetMonitorData", req, cb)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing,
|
|
11
|
+
* software distributed under the License is distributed on an
|
|
12
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
13
|
+
* KIND, either express or implied. See the License for the
|
|
14
|
+
* specific language governing permissions and limitations
|
|
15
|
+
* under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* GetMonitorData返回参数结构体
|
|
20
|
+
*/
|
|
21
|
+
export interface GetMonitorDataResponse {
|
|
22
|
+
/**
|
|
23
|
+
* 统计周期
|
|
24
|
+
*/
|
|
25
|
+
Period?: number
|
|
26
|
+
/**
|
|
27
|
+
* 指标名
|
|
28
|
+
*/
|
|
29
|
+
MetricName?: string
|
|
30
|
+
/**
|
|
31
|
+
* 数据点数组
|
|
32
|
+
*/
|
|
33
|
+
DataPoints?: Array<DataPoint>
|
|
34
|
+
/**
|
|
35
|
+
* 开始时间
|
|
36
|
+
*/
|
|
37
|
+
StartTime?: string
|
|
38
|
+
/**
|
|
39
|
+
* 结束时间
|
|
40
|
+
*/
|
|
41
|
+
EndTime?: string
|
|
42
|
+
/**
|
|
43
|
+
* 返回信息
|
|
44
|
+
*/
|
|
45
|
+
Msg?: string
|
|
46
|
+
/**
|
|
47
|
+
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
48
|
+
*/
|
|
49
|
+
RequestId?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 计算算子
|
|
54
|
+
*/
|
|
55
|
+
export interface Expr {
|
|
56
|
+
/**
|
|
57
|
+
* 算子名称
|
|
58
|
+
*/
|
|
59
|
+
Function?: string
|
|
60
|
+
/**
|
|
61
|
+
* 算子入参值
|
|
62
|
+
*/
|
|
63
|
+
N?: number
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* GetMonitorData请求参数结构体
|
|
68
|
+
*/
|
|
69
|
+
export interface GetMonitorDataRequest {
|
|
70
|
+
/**
|
|
71
|
+
* 命名空间,如QCE/CVM。各个云产品的详细命名空间说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档
|
|
72
|
+
*/
|
|
73
|
+
Namespace: string
|
|
74
|
+
/**
|
|
75
|
+
* 指标名称,如CPUUsage,仅支持单指标拉取。各个云产品的详细指标说明请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的指标英文名即为MetricName
|
|
76
|
+
*/
|
|
77
|
+
MetricName: string
|
|
78
|
+
/**
|
|
79
|
+
* 实例对象的维度组合,格式为key-value键值对形式的集合。不同类型的实例字段完全不同,如CVM为[{"Name":"InstanceId","Value":"ins-j0hk02zo"}],Ckafka为[{"Name":"instanceId","Value":"ckafka-l49k54dd"}],COS为[{"Name":"appid","Value":"1258344699"},{"Name":"bucket","Value":"rig-1258344699"}]。各个云产品的维度请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的维度列即为维度组合的key,value为key对应的值。单请求最多支持批量拉取10个实例的监控数据。
|
|
80
|
+
*/
|
|
81
|
+
Instances: Array<Instance>
|
|
82
|
+
/**
|
|
83
|
+
* 监控统计周期,如60。默认为取值为300,单位为s。每个指标支持的统计周期不一定相同,各个云产品支持的统计周期请参阅各个产品[监控指标](https://cloud.tencent.com/document/product/248/6140)文档,对应的统计周期列即为支持的统计周期。单请求的数据点数限制为1440个。
|
|
84
|
+
*/
|
|
85
|
+
Period?: number
|
|
86
|
+
/**
|
|
87
|
+
* 起始时间,如2018-09-22T19:51:23+08:00
|
|
88
|
+
*/
|
|
89
|
+
StartTime?: string
|
|
90
|
+
/**
|
|
91
|
+
* 结束时间,如2018-09-22T20:51:23+08:00,默认为当前时间。 EndTime不能小于StartTime
|
|
92
|
+
*/
|
|
93
|
+
EndTime?: string
|
|
94
|
+
/**
|
|
95
|
+
* 计算算子
|
|
96
|
+
*/
|
|
97
|
+
Expr?: Expr
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 实例维度组合数组
|
|
102
|
+
*/
|
|
103
|
+
export interface Instance {
|
|
104
|
+
/**
|
|
105
|
+
* 实例的维度组合
|
|
106
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
107
|
+
*/
|
|
108
|
+
Dimensions: Array<Dimension>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 监控数据点
|
|
113
|
+
*/
|
|
114
|
+
export interface DataPoint {
|
|
115
|
+
/**
|
|
116
|
+
* 实例对象维度组合
|
|
117
|
+
*/
|
|
118
|
+
Dimensions?: Array<Dimension>
|
|
119
|
+
/**
|
|
120
|
+
* 时间戳数组,表示那些时间点有数据,缺失的时间戳,没有数据点,可以理解为掉点了
|
|
121
|
+
*/
|
|
122
|
+
Timestamps?: Array<number>
|
|
123
|
+
/**
|
|
124
|
+
* 监控值数组,该数组和Timestamps一一对应
|
|
125
|
+
*/
|
|
126
|
+
Values?: Array<number>
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 实例对象的维度组合
|
|
131
|
+
*/
|
|
132
|
+
export interface Dimension {
|
|
133
|
+
/**
|
|
134
|
+
* 实例维度名称
|
|
135
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
136
|
+
*/
|
|
137
|
+
Name: string
|
|
138
|
+
/**
|
|
139
|
+
* 实例维度值
|
|
140
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
141
|
+
*/
|
|
142
|
+
Value: string
|
|
143
|
+
}
|