From 669fc50cd74effc8bbd3da9a28b611ca71dacf05 Mon Sep 17 00:00:00 2001 From: "CHENYIWEN@kingsoft.com" Date: Thu, 4 Jan 2018 11:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9ESDK=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=8B=96=E6=8B=BD=20=09=09SetVideoSeekConfig?= =?UTF-8?q?=20=09=09=E8=8E=B7=E5=8F=96=E8=A7=86=E9=A2=91=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=09=09GetVideoSeekConfig=20=09=09=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEHttp=E5=93=8D=E5=BA=94=E5=A4=B4=20=09=09SetHttpHeaders?= =?UTF-8?q?Config=20=09=09=E5=88=A0=E9=99=A4Http=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=B4=20=09=09DeleteHttpHeadersConfig=20=09=09=E8=8E=B7?= =?UTF-8?q?=E5=8F=96Http=E5=93=8D=E5=BA=94=E5=A4=B4=E5=88=97=E8=A1=A8=20?= =?UTF-8?q?=09=09GetHttpHeaderList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/cdn.py | 60 +++++++++++-- kscore/data/cdn/2016-09-01/service-2.yaml | 103 ++++++++++++++++++++++ 2 files changed, 158 insertions(+), 5 deletions(-) diff --git a/examples/cdn.py b/examples/cdn.py index 95300ee..69cd287 100644 --- a/examples/cdn.py +++ b/examples/cdn.py @@ -1484,11 +1484,61 @@ #res = client.get_domains_by_origin(Origin='10.33.33.33') ''' - GetCnameSuffixs + GetCnameSuffixs 此接口用于获取我们公司在CDN平台已配置的加速域名的CNAME后缀列表。 ''' - res = client.get_cname_suffixs() - print res - - + #res = client.get_cname_suffixs() + #print res + + ''' + SetVideoSeekConfig + 此接口用于设置视频拖拽 + Parameters: + DomainId 是 String 表示域名 + Enable 是 枚举值为:on,off 表示开关 + ''' + #res = client.set_video_seek_config(DomainId="2D09HG3",Enable='off') + #print res + + ''' + GetVideoSeekConfig + 此接口用于获取域名拖拽信息 + Parameters: + DomainId 是 String 表示域名 + ''' + #res = client.get_video_seek_config(DomainId="2D09HG3") + #print res + + ''' + SetHttpHeadersConfig + 此接口用于设置Http响应头 + Parameters: + DomainId 是 String 表示域名 + 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种 + HeaderValue 是 String 表示设置http头vaule值 + ''' + #res = client.set_http_headers_config(DomainId='2D09HG3',HeaderKey='Expires',HeaderValue='20') + #print res + + ''' + DeleteHttpHeadersConfig + 此接口用于删除Http响应头 + Parameters: + DomainId 是 String 表示域名 + 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种 + ''' + #res = client.delete_http_headers_config(DomainId='2D09HG3',HeaderKey='Expires') + #print res + + ''' + GetHttpHeaderList + 此接口用于获取http响应头 + Parameters: + DomainId 是 String 表示域名 + ''' + #res = client.get_http_header_list(DomainId='2D09HG3') + #print res + + + diff --git a/kscore/data/cdn/2016-09-01/service-2.yaml b/kscore/data/cdn/2016-09-01/service-2.yaml index 829b3ee..18358cd 100644 --- a/kscore/data/cdn/2016-09-01/service-2.yaml +++ b/kscore/data/cdn/2016-09-01/service-2.yaml @@ -629,6 +629,51 @@ operations: shape: HttpsGetCertRequest output: shape: HttpsGetCertResponse + + SetVideoSeekConfig: + name: SetVideoSeekConfig + http: + method: POST + requestUri: /2016-09-01/domain/SetVideoSeekConfig + input: + shape: SetVideoSeekConfigRequest + + GetVideoSeekConfig: + name: GetVideoSeekConfig + http: + method: POST + requestUri: /2016-09-01/domain/GetVideoSeekConfig + input: + shape: GetVideoSeekConfigRequest + output: + shape: VideoSeekConfigShape + + SetHttpHeadersConfig: + name: SetHttpHeadersConfig + http: + method: POST + requestUri: /2016-09-01/domain/SetHttpHeadersConfig + input: + shape: SetHttpHeadersConfigRequest + + DeleteHttpHeadersConfig: + name: DeleteHttpHeadersConfig + http: + method: POST + requestUri: /2016-09-01/domain/DeleteHttpHeadersConfig + input: + shape: DeleteHttpHeadersConfigRequest + + GetHttpHeaderList: + name: GetHttpHeaderList + http: + method: POST + requestUri: /2016-09-01/domain/GetHttpHeaderList + input: + shape: GetHttpHeaderListRequest + output: + shape: HttpHeadListResponse + ##################################### shapes: @@ -698,6 +743,64 @@ shapes: type: list member: shape: Domain + + SetVideoSeekConfigRequest: + type: structure + required: + - DomainId + - Enable + members: + DomainId: + shape: String + Enable: + shape: String + + GetVideoSeekConfigRequest: + type: structure + required: + - DomainId + members: + DomainId: + shape: String + + SetHttpHeadersConfigRequest: + type: structure + required: + - DomainId + - HeaderKey + - HeaderValue + members: + DomainId: + shape: String + HeaderKey: + shape: String + HeaderValue: + shape: String + + DeleteHttpHeadersConfigRequest: + type: structure + required: + - DomainId + - HeaderKey + members: + DomainId: + shape: String + HeaderKey: + shape: String + + GetHttpHeaderListRequest: + type: structure + required: + - DomainId + members: + DomainId: + shape: String + + HttpHeadListResponse: + type: structure + members: + HttpHeadList: + shape: HttpHeaderRuleList GetDomainLogsRequest: type: structure