-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
300 lines (300 loc) · 12.6 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const client_1 = __importDefault(require("../../core/client"));
const request_1 = __importDefault(require("../../core/request"));
/**
* This client is used to call actions of **ucdn** service
*/
class UCDNClient extends client_1.default {
constructor({ config, credential, }) {
super({ config, credential });
}
/**
* AddCertificate - 添加证书
*
* See also: https://docs.ucloud.cn/api/ucdn-api/add_certificate
*/
addCertificate(request) {
const args = Object.assign({ Action: 'AddCertificate' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCertificateBaseInfoList - 配置CDN获取证书列表
*/
getCertificateBaseInfoList(request) {
const args = Object.assign({ Action: 'GetCertificateBaseInfoList' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* UpdateUcdnDomainHttpsConfig - 配置CDN域名HTTPS
*/
updateUcdnDomainHttpsConfig(request) {
const args = Object.assign({ Action: 'UpdateUcdnDomainHttpsConfig' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* ControlUcdnDomainCacheAccess - 封禁解封缓存访问
*
* See also: https://docs.ucloud.cn/api/ucdn-api/control_ucdn_domain_cache_access
*/
controlUcdnDomainCacheAccess(request) {
const args = Object.assign({ Action: 'ControlUcdnDomainCacheAccess' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* DeleteCertificate - 删除证书
*
* See also: https://docs.ucloud.cn/api/ucdn-api/delete_certificate
*/
deleteCertificate(request) {
const args = Object.assign({ Action: 'DeleteCertificate' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态
*
* See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_prefetch_cache_task
*/
describeNewUcdnPrefetchCacheTask(request) {
const args = Object.assign({ Action: 'DescribeNewUcdnPrefetchCacheTask' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态
*
* See also: https://docs.ucloud.cn/api/ucdn-api/describe_new_ucdn_refresh_cache_task
*/
describeNewUcdnRefreshCacheTask(request) {
const args = Object.assign({ Action: 'DescribeNewUcdnRefreshCacheTask' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCertificateV2 - 获取证书列表(新)
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_certificate_v2
*/
getCertificateV2(request) {
const args = Object.assign({ Action: 'GetCertificateV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetNewUcdnDomainHitRate - 获取域名命中率
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_domain_hit_rate
*/
getNewUcdnDomainHitRate(request) {
const args = Object.assign({ Action: 'GetNewUcdnDomainHitRate' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetNewUcdnLogRefererStatistics - 获取热点referer统计
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_log_referer_statistics
*/
getNewUcdnLogRefererStatistics(request) {
const args = Object.assign({ Action: 'GetNewUcdnLogRefererStatistics' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetNewUcdnLogUrlStatistics - 获取日志url统计
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_new_ucdn_log_url_statistics
*/
getNewUcdnLogUrlStatistics(request) {
const args = Object.assign({ Action: 'GetNewUcdnLogUrlStatistics' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain95_bandwidth_v2
*/
getUcdnDomain95BandwidthV2(request) {
const args = Object.assign({ Action: 'GetUcdnDomain95BandwidthV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新)
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_bandwidth_v2
*/
getUcdnDomainBandwidthV2(request) {
const args = Object.assign({ Action: 'GetUcdnDomainBandwidthV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainConfig - 批量获取加速域名配置
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_config
*/
getUcdnDomainConfig(request) {
const args = Object.assign({ Action: 'GetUcdnDomainConfig' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainHitRate - 获取域名命中率
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_hit_rate
*/
getUcdnDomainHitRate(request) {
const args = Object.assign({ Action: 'GetUcdnDomainHitRate' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainHttpCodeV2 - 获取域名状态码信息
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_http_code_v2
*/
getUcdnDomainHttpCodeV2(request) {
const args = Object.assign({ Action: 'GetUcdnDomainHttpCodeV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainInfoList - 获取域名基本信息
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_info_list
*/
getUcdnDomainInfoList(request) {
const args = Object.assign({ Action: 'GetUcdnDomainInfoList' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainLog - 获取加速域名原始日志
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_log
*/
getUcdnDomainLog(request) {
const args = Object.assign({ Action: 'GetUcdnDomainLog' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainLogV2 - 获取域名5分钟日志
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_log_v2
*/
getUcdnDomainLogV2(request) {
const args = Object.assign({ Action: 'GetUcdnDomainLogV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainOriginHttpCode - 获取域名源站状态码监控
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_http_code
*/
getUcdnDomainOriginHttpCode(request) {
const args = Object.assign({ Action: 'GetUcdnDomainOriginHttpCode' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainOriginHttpCodeDetail - 获取域名源站详细状态码监控
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_http_code_detail
*/
getUcdnDomainOriginHttpCodeDetail(request) {
const args = Object.assign({ Action: 'GetUcdnDomainOriginHttpCodeDetail' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainOriginRequestNum - 获取域名回源请求数
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_origin_request_num
*/
getUcdnDomainOriginRequestNum(request) {
const args = Object.assign({ Action: 'GetUcdnDomainOriginRequestNum' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainPrefetchEnable - 获取域名预取开启状态
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_prefetch_enable
*/
getUcdnDomainPrefetchEnable(request) {
const args = Object.assign({ Action: 'GetUcdnDomainPrefetchEnable' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnDomainRequestNumV3 - 获取域名请求数
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_domain_request_num_v3
*/
getUcdnDomainRequestNumV3(request) {
const args = Object.assign({ Action: 'GetUcdnDomainRequestNumV3' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分)
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pass_bandwidth_v2
*/
getUcdnPassBandwidthV2(request) {
const args = Object.assign({ Action: 'GetUcdnPassBandwidthV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_bandwidth_v2
*/
getUcdnProIspBandwidthV2(request) {
const args = Object.assign({ Action: 'GetUcdnProIspBandwidthV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_pro_isp_request_num_v2
*/
getUcdnProIspRequestNumV2(request) {
const args = Object.assign({ Action: 'GetUcdnProIspRequestNumV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetUcdnTrafficV2 - 获取流量信息
*
* See also: https://docs.ucloud.cn/api/ucdn-api/get_ucdn_traffic_v2
*/
getUcdnTrafficV2(request) {
const args = Object.assign({ Action: 'GetUcdnTrafficV2' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* PrefetchNewUcdnDomainCache - 提交预取任务
*
* See also: https://docs.ucloud.cn/api/ucdn-api/prefetch_new_ucdn_domain_cache
*/
prefetchNewUcdnDomainCache(request) {
const args = Object.assign({ Action: 'PrefetchNewUcdnDomainCache' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* QueryIpLocation - 查询IP信息
*
* See also: https://docs.ucloud.cn/api/ucdn-api/query_ip_location
*/
queryIpLocation(request) {
const args = Object.assign({ Action: 'QueryIpLocation' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* RefreshNewUcdnDomainCache - 刷新缓存
*
* See also: https://docs.ucloud.cn/api/ucdn-api/refresh_new_ucdn_domain_cache
*/
refreshNewUcdnDomainCache(request) {
const args = Object.assign({ Action: 'RefreshNewUcdnDomainCache' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* SwitchUcdnChargeType - 切换账号计费方式
*
* See also: https://docs.ucloud.cn/api/ucdn-api/switch_ucdn_charge_type
*/
switchUcdnChargeType(request) {
const args = Object.assign({ Action: 'SwitchUcdnChargeType' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
}
exports.default = UCDNClient;