tencentcloud-sdk-ecdn 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41b4288881df406a5d9347c099782419d90abbdb
4
+ data.tar.gz: 0f8763b5831938b2747ef54d0ea3062839796500
5
+ SHA512:
6
+ metadata.gz: fc41dcbf67efba400d948a5c8f07a7433a6371ed151cd4467ef3cd6982a3ef1f1f361a6e9c687d37b7cf5915ff6b9620595e32b48b4b314eb717a7f54a3a4a00
7
+ data.tar.gz: d402a40491b1924ea9b9145cb298dcbe4aa417c3546ce8a5ec96cfd48a6c825bc6f959e3f93d3283c39576c0b69d12c7aa030942e2db0d5c21262c233ab97366
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20191012/client'
6
+ require_relative 'v20191012/models'
7
+
8
+ module TencentCloud
9
+ module Ecdn
10
+ end
11
+ end
@@ -0,0 +1,431 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-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, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Ecdn
21
+ module V20191012
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-10-12'
26
+ api_endpoint = 'ecdn.tencentcloudapi.com'
27
+ sdk_version = 'ECDN_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口(AddEcdnDomain)用于创建加速域名。
33
+
34
+ # @param request: Request instance for AddEcdnDomain.
35
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::AddEcdnDomainRequest`
36
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::AddEcdnDomainResponse`
37
+ def AddEcdnDomain(request)
38
+ body = send_request('AddEcdnDomain', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = AddEcdnDomainResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 生成一条子域名解析,提示客户添加到域名解析上,用于泛域名及域名取回校验归属权
57
+
58
+ # @param request: Request instance for CreateVerifyRecord.
59
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::CreateVerifyRecordRequest`
60
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::CreateVerifyRecordResponse`
61
+ def CreateVerifyRecord(request)
62
+ body = send_request('CreateVerifyRecord', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = CreateVerifyRecordResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 本接口(DeleteEcdnDomain)用于删除指定加速域名。待删除域名必须处于已停用状态。
81
+
82
+ # @param request: Request instance for DeleteEcdnDomain.
83
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DeleteEcdnDomainRequest`
84
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DeleteEcdnDomainResponse`
85
+ def DeleteEcdnDomain(request)
86
+ body = send_request('DeleteEcdnDomain', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DeleteEcdnDomainResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 本接口(DescribeDomains)用于查询CDN域名基本信息,包括项目id,状态,业务类型,创建时间,更新时间等。
105
+
106
+ # @param request: Request instance for DescribeDomains.
107
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeDomainsRequest`
108
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeDomainsResponse`
109
+ def DescribeDomains(request)
110
+ body = send_request('DescribeDomains', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = DescribeDomainsResponse.new
114
+ model.deserialize(response['Response'])
115
+ model
116
+ else
117
+ code = response['Response']['Error']['Code']
118
+ message = response['Response']['Error']['Message']
119
+ reqid = response['Response']['RequestId']
120
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
+ end
122
+ rescue TencentCloud::Common::TencentCloudSDKException => e
123
+ raise e
124
+ rescue StandardError => e
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
+ end
127
+
128
+ # 本接口(DescribeDomainsConfig)用于查询CDN加速域名详细配置信息。
129
+
130
+ # @param request: Request instance for DescribeDomainsConfig.
131
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeDomainsConfigRequest`
132
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeDomainsConfigResponse`
133
+ def DescribeDomainsConfig(request)
134
+ body = send_request('DescribeDomainsConfig', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = DescribeDomainsConfigResponse.new
138
+ model.deserialize(response['Response'])
139
+ model
140
+ else
141
+ code = response['Response']['Error']['Code']
142
+ message = response['Response']['Error']['Message']
143
+ reqid = response['Response']['RequestId']
144
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
145
+ end
146
+ rescue TencentCloud::Common::TencentCloudSDKException => e
147
+ raise e
148
+ rescue StandardError => e
149
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
150
+ end
151
+
152
+ # 本接口(DescribeEcdnDomainLogs)用于查询域名的访问日志下载地址。
153
+
154
+ # @param request: Request instance for DescribeEcdnDomainLogs.
155
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnDomainLogsRequest`
156
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnDomainLogsResponse`
157
+ def DescribeEcdnDomainLogs(request)
158
+ body = send_request('DescribeEcdnDomainLogs', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = DescribeEcdnDomainLogsResponse.new
162
+ model.deserialize(response['Response'])
163
+ model
164
+ else
165
+ code = response['Response']['Error']['Code']
166
+ message = response['Response']['Error']['Message']
167
+ reqid = response['Response']['RequestId']
168
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
169
+ end
170
+ rescue TencentCloud::Common::TencentCloudSDKException => e
171
+ raise e
172
+ rescue StandardError => e
173
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
174
+ end
175
+
176
+ # 本接口(DescribeEcdnDomainStatistics)用于查询指定时间段内的域名访问统计指标
177
+
178
+ # @param request: Request instance for DescribeEcdnDomainStatistics.
179
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnDomainStatisticsRequest`
180
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnDomainStatisticsResponse`
181
+ def DescribeEcdnDomainStatistics(request)
182
+ body = send_request('DescribeEcdnDomainStatistics', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = DescribeEcdnDomainStatisticsResponse.new
186
+ model.deserialize(response['Response'])
187
+ model
188
+ else
189
+ code = response['Response']['Error']['Code']
190
+ message = response['Response']['Error']['Message']
191
+ reqid = response['Response']['RequestId']
192
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
193
+ end
194
+ rescue TencentCloud::Common::TencentCloudSDKException => e
195
+ raise e
196
+ rescue StandardError => e
197
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
198
+ end
199
+
200
+ # DescribeEcdnStatistics用于查询 ECDN 实时访问监控数据,支持以下指标查询:
201
+
202
+ # + 流量(单位为 byte)
203
+ # + 带宽(单位为 bps)
204
+ # + 请求数(单位为 次)
205
+ # + 状态码 2xx 汇总及各 2 开头状态码明细(单位为 个)
206
+ # + 状态码 3xx 汇总及各 3 开头状态码明细(单位为 个)
207
+ # + 状态码 4xx 汇总及各 4 开头状态码明细(单位为 个)
208
+ # + 状态码 5xx 汇总及各 5 开头状态码明细(单位为 个)
209
+
210
+ # @param request: Request instance for DescribeEcdnStatistics.
211
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnStatisticsRequest`
212
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeEcdnStatisticsResponse`
213
+ def DescribeEcdnStatistics(request)
214
+ body = send_request('DescribeEcdnStatistics', request.serialize)
215
+ response = JSON.parse(body)
216
+ if response['Response'].key?('Error') == false
217
+ model = DescribeEcdnStatisticsResponse.new
218
+ model.deserialize(response['Response'])
219
+ model
220
+ else
221
+ code = response['Response']['Error']['Code']
222
+ message = response['Response']['Error']['Message']
223
+ reqid = response['Response']['RequestId']
224
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
225
+ end
226
+ rescue TencentCloud::Common::TencentCloudSDKException => e
227
+ raise e
228
+ rescue StandardError => e
229
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
230
+ end
231
+
232
+ # DescribeIpStatus 用于查询域名所在加速平台的所有节点信息, 如果您的源站有白名单设置,可以通过本接口获取ECDN服务的节点IP进行加白, 本接口为内测接口,请联系腾讯云工程师开白。
233
+
234
+ # 由于产品服务节点常有更新,对于源站开白的使用场景,请定期调用接口获取最新节点信息,若新增服务节点发布7日后您尚未更新加白导致回源失败等问题,ECDN侧不对此承担责任。
235
+
236
+ # @param request: Request instance for DescribeIpStatus.
237
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribeIpStatusRequest`
238
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribeIpStatusResponse`
239
+ def DescribeIpStatus(request)
240
+ body = send_request('DescribeIpStatus', request.serialize)
241
+ response = JSON.parse(body)
242
+ if response['Response'].key?('Error') == false
243
+ model = DescribeIpStatusResponse.new
244
+ model.deserialize(response['Response'])
245
+ model
246
+ else
247
+ code = response['Response']['Error']['Code']
248
+ message = response['Response']['Error']['Message']
249
+ reqid = response['Response']['RequestId']
250
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
251
+ end
252
+ rescue TencentCloud::Common::TencentCloudSDKException => e
253
+ raise e
254
+ rescue StandardError => e
255
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
256
+ end
257
+
258
+ # 查询刷新接口的用量配额。
259
+
260
+ # @param request: Request instance for DescribePurgeQuota.
261
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribePurgeQuotaRequest`
262
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribePurgeQuotaResponse`
263
+ def DescribePurgeQuota(request)
264
+ body = send_request('DescribePurgeQuota', request.serialize)
265
+ response = JSON.parse(body)
266
+ if response['Response'].key?('Error') == false
267
+ model = DescribePurgeQuotaResponse.new
268
+ model.deserialize(response['Response'])
269
+ model
270
+ else
271
+ code = response['Response']['Error']['Code']
272
+ message = response['Response']['Error']['Message']
273
+ reqid = response['Response']['RequestId']
274
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
275
+ end
276
+ rescue TencentCloud::Common::TencentCloudSDKException => e
277
+ raise e
278
+ rescue StandardError => e
279
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
280
+ end
281
+
282
+ # DescribePurgeTasks 用于查询刷新任务提交历史记录及执行进度。
283
+
284
+ # @param request: Request instance for DescribePurgeTasks.
285
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::DescribePurgeTasksRequest`
286
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::DescribePurgeTasksResponse`
287
+ def DescribePurgeTasks(request)
288
+ body = send_request('DescribePurgeTasks', request.serialize)
289
+ response = JSON.parse(body)
290
+ if response['Response'].key?('Error') == false
291
+ model = DescribePurgeTasksResponse.new
292
+ model.deserialize(response['Response'])
293
+ model
294
+ else
295
+ code = response['Response']['Error']['Code']
296
+ message = response['Response']['Error']['Message']
297
+ reqid = response['Response']['RequestId']
298
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
299
+ end
300
+ rescue TencentCloud::Common::TencentCloudSDKException => e
301
+ raise e
302
+ rescue StandardError => e
303
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
304
+ end
305
+
306
+ # PurgePathCache 用于批量刷新目录缓存,一次提交将返回一个刷新任务id。
307
+
308
+ # @param request: Request instance for PurgePathCache.
309
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::PurgePathCacheRequest`
310
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::PurgePathCacheResponse`
311
+ def PurgePathCache(request)
312
+ body = send_request('PurgePathCache', request.serialize)
313
+ response = JSON.parse(body)
314
+ if response['Response'].key?('Error') == false
315
+ model = PurgePathCacheResponse.new
316
+ model.deserialize(response['Response'])
317
+ model
318
+ else
319
+ code = response['Response']['Error']['Code']
320
+ message = response['Response']['Error']['Message']
321
+ reqid = response['Response']['RequestId']
322
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
323
+ end
324
+ rescue TencentCloud::Common::TencentCloudSDKException => e
325
+ raise e
326
+ rescue StandardError => e
327
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
328
+ end
329
+
330
+ # PurgeUrlsCache 用于批量刷新Url,一次提交将返回一个刷新任务id。
331
+
332
+ # @param request: Request instance for PurgeUrlsCache.
333
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::PurgeUrlsCacheRequest`
334
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::PurgeUrlsCacheResponse`
335
+ def PurgeUrlsCache(request)
336
+ body = send_request('PurgeUrlsCache', request.serialize)
337
+ response = JSON.parse(body)
338
+ if response['Response'].key?('Error') == false
339
+ model = PurgeUrlsCacheResponse.new
340
+ model.deserialize(response['Response'])
341
+ model
342
+ else
343
+ code = response['Response']['Error']['Code']
344
+ message = response['Response']['Error']['Message']
345
+ reqid = response['Response']['RequestId']
346
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
347
+ end
348
+ rescue TencentCloud::Common::TencentCloudSDKException => e
349
+ raise e
350
+ rescue StandardError => e
351
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
352
+ end
353
+
354
+ # 本接口(StartEcdnDomain)用于启用加速域名,待启用域名必须处于已下线状态。
355
+
356
+ # @param request: Request instance for StartEcdnDomain.
357
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::StartEcdnDomainRequest`
358
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::StartEcdnDomainResponse`
359
+ def StartEcdnDomain(request)
360
+ body = send_request('StartEcdnDomain', request.serialize)
361
+ response = JSON.parse(body)
362
+ if response['Response'].key?('Error') == false
363
+ model = StartEcdnDomainResponse.new
364
+ model.deserialize(response['Response'])
365
+ model
366
+ else
367
+ code = response['Response']['Error']['Code']
368
+ message = response['Response']['Error']['Message']
369
+ reqid = response['Response']['RequestId']
370
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
371
+ end
372
+ rescue TencentCloud::Common::TencentCloudSDKException => e
373
+ raise e
374
+ rescue StandardError => e
375
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
376
+ end
377
+
378
+ # 本接口(StopCdnDomain)用于停止加速域名,待停用加速域名必须处于已上线或部署中状态。
379
+
380
+ # @param request: Request instance for StopEcdnDomain.
381
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::StopEcdnDomainRequest`
382
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::StopEcdnDomainResponse`
383
+ def StopEcdnDomain(request)
384
+ body = send_request('StopEcdnDomain', request.serialize)
385
+ response = JSON.parse(body)
386
+ if response['Response'].key?('Error') == false
387
+ model = StopEcdnDomainResponse.new
388
+ model.deserialize(response['Response'])
389
+ model
390
+ else
391
+ code = response['Response']['Error']['Code']
392
+ message = response['Response']['Error']['Message']
393
+ reqid = response['Response']['RequestId']
394
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
395
+ end
396
+ rescue TencentCloud::Common::TencentCloudSDKException => e
397
+ raise e
398
+ rescue StandardError => e
399
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
400
+ end
401
+
402
+ # 本接口(UpdateDomainConfig)用于更新ECDN加速域名配置信息。
403
+ # 注意:如果需要更新复杂类型的配置项,必须传递整个对象的所有属性,未传递的属性将使用默认值。建议通过查询接口获取配置属性后,直接修改后传递给本接口。Https配置由于证书的特殊性,更新时不用传递证书和密钥字段。
404
+
405
+ # @param request: Request instance for UpdateDomainConfig.
406
+ # @type request: :class:`Tencentcloud::ecdn::V20191012::UpdateDomainConfigRequest`
407
+ # @rtype: :class:`Tencentcloud::ecdn::V20191012::UpdateDomainConfigResponse`
408
+ def UpdateDomainConfig(request)
409
+ body = send_request('UpdateDomainConfig', request.serialize)
410
+ response = JSON.parse(body)
411
+ if response['Response'].key?('Error') == false
412
+ model = UpdateDomainConfigResponse.new
413
+ model.deserialize(response['Response'])
414
+ model
415
+ else
416
+ code = response['Response']['Error']['Code']
417
+ message = response['Response']['Error']['Message']
418
+ reqid = response['Response']['RequestId']
419
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
420
+ end
421
+ rescue TencentCloud::Common::TencentCloudSDKException => e
422
+ raise e
423
+ rescue StandardError => e
424
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
425
+ end
426
+
427
+
428
+ end
429
+ end
430
+ end
431
+ end