Skip to content

Commit dc6f682

Browse files
author
齐超
committed
add get peak bandwidth data
1 parent 5368b94 commit dc6f682

File tree

2 files changed

+69
-3
lines changed

2 files changed

+69
-3
lines changed

examples/cdn.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,5 +1137,23 @@
11371137
Parameters:
11381138
DomainId String 域名ID,输入需要查询的域名ID,仅支持单个域名ID
11391139
'''
1140-
res = client.get_service_ip_data(DomainId='2D09NK5')
1141-
print res
1140+
# res = client.get_service_ip_data(DomainId='2D09NK5')
1141+
# print res
1142+
1143+
'''
1144+
GetPeakBandwidthData
1145+
获取域名带宽峰值,峰值时间点
1146+
1、峰值带宽计算方法:在选定时间段内,取每5分钟有效带宽值进行降序排列,最高带宽就是峰值带宽
1147+
2、realtime,峰值时间点,取每5分钟一个时间点,最高峰出现的时间点即为峰值时间
1148+
最多可获取最近一年内93天跨度的数据
1149+
1150+
请求参数:
1151+
Parameters:
1152+
DomainIds String 域名ID,缺省为当前产品类型下的全部域名,可输入需要查询的域名ID,支持批量域名查询,多个域名ID用逗号(半角)分隔
1153+
StartTime String 获取数据起始时间点,日期格式按ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如:2016-08-01T21:14+0800
1154+
EndTime String 结束时间需大于起始时间;获取日期格式按照ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如: 2016-08-01T21:14+0800
1155+
CdnType String 产品类型,只允许输入一种类型,取值为download:下载类加速,;live:直播加速
1156+
Regions String 区域名称, 取值为CN:中国大陆,HK:香港,TW:台湾,AS:亚洲其他,NA:北美洲,SA:南美洲,EU:欧洲,AU:大洋洲,AF:非洲,支持多区域查询,多个区域用逗号(半角)分隔,缺省为 CN
1157+
'''
1158+
res = client.get_peak_bandwidth_data(StartTime='2017-02-01T00:00+0800',EndTime='2017-02-28T23:56+0800',CdnType='download',Regions='CN,AS,NA,AU')
1159+
print res

kscore/data/cdn/2016-09-01/service-2.yaml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,17 @@ operations:
517517
shape: GetBillingDataRequest
518518
output:
519519
shape: GetBillingDataResponse
520+
521+
GetPeakBandwidthData:
522+
name: GetPeakBandwidthData
523+
http:
524+
method: GET
525+
requestUri: /2016-09-01/statistics/GetPeakBandwidthData
526+
input:
527+
shape: GetPeakBandwidthDataRequest
528+
output:
529+
shape: GetPeakBandwidthDataResponse
530+
520531
#####################################
521532
shapes:
522533

@@ -3369,4 +3380,41 @@ shapes:
33693380
DomainId:
33703381
shape: String
33713382
Datas:
3372-
shape: GetServiceIpDatas
3383+
shape: GetServiceIpDatas
3384+
3385+
GetPeakBandwidthDataRequest:
3386+
type: structure
3387+
required:
3388+
- StartTime
3389+
- EndTime
3390+
- CdnType
3391+
members:
3392+
StartTime:
3393+
shape: String
3394+
EndTime:
3395+
shape: String
3396+
CdnType:
3397+
shape: String
3398+
DomainIds:
3399+
shape: String
3400+
Regions:
3401+
shape: String
3402+
3403+
3404+
GetPeakBandwidthDataResponse:
3405+
type: structure
3406+
members:
3407+
StartTime:
3408+
shape: String
3409+
EndTime:
3410+
shape: String
3411+
CdnType:
3412+
shape: String
3413+
DomainIds:
3414+
shape: String
3415+
Regions:
3416+
shape: String
3417+
PeakBw:
3418+
shape: Long
3419+
RealTime:
3420+
shape: String

0 commit comments

Comments
 (0)