Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 669fc50

Browse files
新增SDK 设置视频拖拽
SetVideoSeekConfig 获取视频拖拽信息 GetVideoSeekConfig 设置Http响应头 SetHttpHeadersConfig 删除Http响应头 DeleteHttpHeadersConfig 获取Http响应头列表 GetHttpHeaderList
1 parent 29cfcb4 commit 669fc50

File tree

2 files changed

+158
-5
lines changed

2 files changed

+158
-5
lines changed

examples/cdn.py

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,11 +1484,61 @@
14841484
#res = client.get_domains_by_origin(Origin='10.33.33.33')
14851485

14861486
'''
1487-
GetCnameSuffixs
1487+
GetCnameSuffixs
14881488
此接口用于获取我们公司在CDN平台已配置的加速域名的CNAME后缀列表。
14891489
'''
1490-
res = client.get_cname_suffixs()
1491-
print res
1492-
1493-
1490+
#res = client.get_cname_suffixs()
1491+
#print res
1492+
1493+
'''
1494+
SetVideoSeekConfig
1495+
此接口用于设置视频拖拽
1496+
Parameters:
1497+
DomainId 是 String 表示域名
1498+
Enable 是 枚举值为:on,off 表示开关
1499+
'''
1500+
#res = client.set_video_seek_config(DomainId="2D09HG3",Enable='off')
1501+
#print res
1502+
1503+
'''
1504+
GetVideoSeekConfig
1505+
此接口用于获取域名拖拽信息
1506+
Parameters:
1507+
DomainId 是 String 表示域名
1508+
'''
1509+
#res = client.get_video_seek_config(DomainId="2D09HG3")
1510+
#print res
1511+
1512+
'''
1513+
SetHttpHeadersConfig
1514+
此接口用于设置Http响应头
1515+
Parameters:
1516+
DomainId 是 String 表示域名
1517+
HeaderKey 是 String 表示设置的http头 只支持 Content-Type,Cache-Control,Content-Disposition,Content-Language,Expires,Access-Control-Allow-Origin,Access-Control-Allow-Methods,Access-Control-Max-Age,Access-Control-Expose-Headers 这9种
1518+
HeaderValue 是 String 表示设置http头vaule值
1519+
'''
1520+
#res = client.set_http_headers_config(DomainId='2D09HG3',HeaderKey='Expires',HeaderValue='20')
1521+
#print res
1522+
1523+
'''
1524+
DeleteHttpHeadersConfig
1525+
此接口用于删除Http响应头
1526+
Parameters:
1527+
DomainId 是 String 表示域名
1528+
HeaderKey 是 String 表示设置的http头 只支持 Content-Type,Cache-Control,Content-Disposition,Content-Language,Expires,Access-Control-Allow-Origin,Access-Control-Allow-Methods,Access-Control-Max-Age,Access-Control-Expose-Headers 这9种
1529+
'''
1530+
#res = client.delete_http_headers_config(DomainId='2D09HG3',HeaderKey='Expires')
1531+
#print res
1532+
1533+
'''
1534+
GetHttpHeaderList
1535+
此接口用于获取http响应头
1536+
Parameters:
1537+
DomainId 是 String 表示域名
1538+
'''
1539+
#res = client.get_http_header_list(DomainId='2D09HG3')
1540+
#print res
1541+
1542+
1543+
14941544

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

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,51 @@ operations:
629629
shape: HttpsGetCertRequest
630630
output:
631631
shape: HttpsGetCertResponse
632+
633+
SetVideoSeekConfig:
634+
name: SetVideoSeekConfig
635+
http:
636+
method: POST
637+
requestUri: /2016-09-01/domain/SetVideoSeekConfig
638+
input:
639+
shape: SetVideoSeekConfigRequest
640+
641+
GetVideoSeekConfig:
642+
name: GetVideoSeekConfig
643+
http:
644+
method: POST
645+
requestUri: /2016-09-01/domain/GetVideoSeekConfig
646+
input:
647+
shape: GetVideoSeekConfigRequest
648+
output:
649+
shape: VideoSeekConfigShape
650+
651+
SetHttpHeadersConfig:
652+
name: SetHttpHeadersConfig
653+
http:
654+
method: POST
655+
requestUri: /2016-09-01/domain/SetHttpHeadersConfig
656+
input:
657+
shape: SetHttpHeadersConfigRequest
658+
659+
DeleteHttpHeadersConfig:
660+
name: DeleteHttpHeadersConfig
661+
http:
662+
method: POST
663+
requestUri: /2016-09-01/domain/DeleteHttpHeadersConfig
664+
input:
665+
shape: DeleteHttpHeadersConfigRequest
666+
667+
GetHttpHeaderList:
668+
name: GetHttpHeaderList
669+
http:
670+
method: POST
671+
requestUri: /2016-09-01/domain/GetHttpHeaderList
672+
input:
673+
shape: GetHttpHeaderListRequest
674+
output:
675+
shape: HttpHeadListResponse
676+
632677
#####################################
633678
shapes:
634679

@@ -698,6 +743,64 @@ shapes:
698743
type: list
699744
member:
700745
shape: Domain
746+
747+
SetVideoSeekConfigRequest:
748+
type: structure
749+
required:
750+
- DomainId
751+
- Enable
752+
members:
753+
DomainId:
754+
shape: String
755+
Enable:
756+
shape: String
757+
758+
GetVideoSeekConfigRequest:
759+
type: structure
760+
required:
761+
- DomainId
762+
members:
763+
DomainId:
764+
shape: String
765+
766+
SetHttpHeadersConfigRequest:
767+
type: structure
768+
required:
769+
- DomainId
770+
- HeaderKey
771+
- HeaderValue
772+
members:
773+
DomainId:
774+
shape: String
775+
HeaderKey:
776+
shape: String
777+
HeaderValue:
778+
shape: String
779+
780+
DeleteHttpHeadersConfigRequest:
781+
type: structure
782+
required:
783+
- DomainId
784+
- HeaderKey
785+
members:
786+
DomainId:
787+
shape: String
788+
HeaderKey:
789+
shape: String
790+
791+
GetHttpHeaderListRequest:
792+
type: structure
793+
required:
794+
- DomainId
795+
members:
796+
DomainId:
797+
shape: String
798+
799+
HttpHeadListResponse:
800+
type: structure
801+
members:
802+
HttpHeadList:
803+
shape: HttpHeaderRuleList
701804

702805
GetDomainLogsRequest:
703806
type: structure

0 commit comments

Comments
 (0)