describe_domain_configs.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. package cdn
  2. //Licensed under the Apache License, Version 2.0 (the "License");
  3. //you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software
  9. //distributed under the License is distributed on an "AS IS" BASIS,
  10. //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. //See the License for the specific language governing permissions and
  12. //limitations under the License.
  13. //
  14. // Code generated by Alibaba Cloud SDK Code Generator.
  15. // Changes may cause incorrect behavior and will be lost if the code is regenerated.
  16. import (
  17. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
  18. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
  19. )
  20. func (client *Client) DescribeDomainConfigs(request *DescribeDomainConfigsRequest) (response *DescribeDomainConfigsResponse, err error) {
  21. response = CreateDescribeDomainConfigsResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) DescribeDomainConfigsWithChan(request *DescribeDomainConfigsRequest) (<-chan *DescribeDomainConfigsResponse, <-chan error) {
  26. responseChan := make(chan *DescribeDomainConfigsResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.DescribeDomainConfigs(request)
  32. if err != nil {
  33. errChan <- err
  34. } else {
  35. responseChan <- response
  36. }
  37. })
  38. if err != nil {
  39. errChan <- err
  40. close(responseChan)
  41. close(errChan)
  42. }
  43. return responseChan, errChan
  44. }
  45. func (client *Client) DescribeDomainConfigsWithCallback(request *DescribeDomainConfigsRequest, callback func(response *DescribeDomainConfigsResponse, err error)) <-chan int {
  46. result := make(chan int, 1)
  47. err := client.AddAsyncTask(func() {
  48. var response *DescribeDomainConfigsResponse
  49. var err error
  50. defer close(result)
  51. response, err = client.DescribeDomainConfigs(request)
  52. callback(response, err)
  53. result <- 1
  54. })
  55. if err != nil {
  56. defer close(result)
  57. callback(nil, err)
  58. result <- 0
  59. }
  60. return result
  61. }
  62. type DescribeDomainConfigsRequest struct {
  63. *requests.RpcRequest
  64. ConfigList string `position:"Query" name:"ConfigList"`
  65. DomainName string `position:"Query" name:"DomainName"`
  66. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  67. SecurityToken string `position:"Query" name:"SecurityToken"`
  68. }
  69. type DescribeDomainConfigsResponse struct {
  70. *responses.BaseResponse
  71. RequestId string `json:"RequestId" xml:"RequestId"`
  72. DomainConfigs struct {
  73. CcConfig struct {
  74. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  75. Enable string `json:"Enable" xml:"Enable"`
  76. AllowIps string `json:"AllowIps" xml:"AllowIps"`
  77. BlockIps string `json:"BlockIps" xml:"BlockIps"`
  78. Status string `json:"Status" xml:"Status"`
  79. } `json:"CcConfig" xml:"CcConfig"`
  80. ErrorPageConfig struct {
  81. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  82. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  83. PageType string `json:"PageType" xml:"PageType"`
  84. CustomPageUrl string `json:"CustomPageUrl" xml:"CustomPageUrl"`
  85. Status string `json:"Status" xml:"Status"`
  86. } `json:"ErrorPageConfig" xml:"ErrorPageConfig"`
  87. OptimizeConfig struct {
  88. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  89. Enable string `json:"Enable" xml:"Enable"`
  90. Status string `json:"Status" xml:"Status"`
  91. } `json:"OptimizeConfig" xml:"OptimizeConfig"`
  92. PageCompressConfig struct {
  93. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  94. Enable string `json:"Enable" xml:"Enable"`
  95. Status string `json:"Status" xml:"Status"`
  96. } `json:"PageCompressConfig" xml:"PageCompressConfig"`
  97. IgnoreQueryStringConfig struct {
  98. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  99. HashKeyArgs string `json:"HashKeyArgs" xml:"HashKeyArgs"`
  100. Enable string `json:"Enable" xml:"Enable"`
  101. Status string `json:"Status" xml:"Status"`
  102. } `json:"IgnoreQueryStringConfig" xml:"IgnoreQueryStringConfig"`
  103. RangeConfig struct {
  104. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  105. Enable string `json:"Enable" xml:"Enable"`
  106. Status string `json:"Status" xml:"Status"`
  107. } `json:"RangeConfig" xml:"RangeConfig"`
  108. RefererConfig struct {
  109. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  110. ReferType string `json:"ReferType" xml:"ReferType"`
  111. ReferList string `json:"ReferList" xml:"ReferList"`
  112. AllowEmpty string `json:"AllowEmpty" xml:"AllowEmpty"`
  113. DisableAst string `json:"DisableAst" xml:"DisableAst"`
  114. Status string `json:"Status" xml:"Status"`
  115. } `json:"RefererConfig" xml:"RefererConfig"`
  116. ReqAuthConfig struct {
  117. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  118. AuthType string `json:"AuthType" xml:"AuthType"`
  119. Key1 string `json:"Key1" xml:"Key1"`
  120. Key2 string `json:"Key2" xml:"Key2"`
  121. Status string `json:"Status" xml:"Status"`
  122. AliAuthWhiteList string `json:"AliAuthWhiteList" xml:"AliAuthWhiteList"`
  123. AuthM3u8 string `json:"AuthM3u8" xml:"AuthM3u8"`
  124. AuthAddr string `json:"AuthAddr" xml:"AuthAddr"`
  125. AuthRemoteDesc string `json:"AuthRemoteDesc" xml:"AuthRemoteDesc"`
  126. TimeOut string `json:"TimeOut" xml:"TimeOut"`
  127. } `json:"ReqAuthConfig" xml:"ReqAuthConfig"`
  128. SrcHostConfig struct {
  129. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  130. DomainName string `json:"DomainName" xml:"DomainName"`
  131. Status string `json:"Status" xml:"Status"`
  132. } `json:"SrcHostConfig" xml:"SrcHostConfig"`
  133. VideoSeekConfig struct {
  134. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  135. Enable string `json:"Enable" xml:"Enable"`
  136. Status string `json:"Status" xml:"Status"`
  137. } `json:"VideoSeekConfig" xml:"VideoSeekConfig"`
  138. WafConfig struct {
  139. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  140. Enable string `json:"Enable" xml:"Enable"`
  141. Status string `json:"Status" xml:"Status"`
  142. } `json:"WafConfig" xml:"WafConfig"`
  143. NotifyUrlConfig struct {
  144. Enable string `json:"Enable" xml:"Enable"`
  145. NotifyUrl string `json:"NotifyUrl" xml:"NotifyUrl"`
  146. } `json:"NotifyUrlConfig" xml:"NotifyUrlConfig"`
  147. RedirectTypeConfig struct {
  148. RedirectType string `json:"RedirectType" xml:"RedirectType"`
  149. } `json:"RedirectTypeConfig" xml:"RedirectTypeConfig"`
  150. ForwardSchemeConfig struct {
  151. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  152. Enable string `json:"Enable" xml:"Enable"`
  153. SchemeOrigin string `json:"SchemeOrigin" xml:"SchemeOrigin"`
  154. SchemeOriginPort string `json:"SchemeOriginPort" xml:"SchemeOriginPort"`
  155. Status string `json:"Status" xml:"Status"`
  156. } `json:"ForwardSchemeConfig" xml:"ForwardSchemeConfig"`
  157. RemoveQueryStringConfig struct {
  158. AliRemoveArgs string `json:"AliRemoveArgs" xml:"AliRemoveArgs"`
  159. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  160. Status string `json:"Status" xml:"Status"`
  161. } `json:"RemoveQueryStringConfig" xml:"RemoveQueryStringConfig"`
  162. L2OssKeyConfig struct {
  163. PrivateOssAuth string `json:"PrivateOssAuth" xml:"PrivateOssAuth"`
  164. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  165. Status string `json:"Status" xml:"Status"`
  166. } `json:"L2OssKeyConfig" xml:"L2OssKeyConfig"`
  167. MacServiceConfig struct {
  168. AppList string `json:"AppList" xml:"AppList"`
  169. Enabled string `json:"Enabled" xml:"Enabled"`
  170. ProcessResult string `json:"ProcessResult" xml:"ProcessResult"`
  171. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  172. Status string `json:"Status" xml:"Status"`
  173. } `json:"MacServiceConfig" xml:"MacServiceConfig"`
  174. GreenManagerConfig struct {
  175. Enabled string `json:"Enabled" xml:"Enabled"`
  176. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  177. Status string `json:"Status" xml:"Status"`
  178. } `json:"GreenManagerConfig" xml:"GreenManagerConfig"`
  179. HttpsOptionConfig struct {
  180. Http2 string `json:"Http2" xml:"Http2"`
  181. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  182. Status string `json:"Status" xml:"Status"`
  183. } `json:"HttpsOptionConfig" xml:"HttpsOptionConfig"`
  184. AliBusinessConfig struct {
  185. AliBusinessTable string `json:"AliBusinessTable" xml:"AliBusinessTable"`
  186. AliBusinessType string `json:"AliBusinessType" xml:"AliBusinessType"`
  187. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  188. Status string `json:"Status" xml:"Status"`
  189. } `json:"AliBusinessConfig" xml:"AliBusinessConfig"`
  190. IpAllowListConfig struct {
  191. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  192. IpList string `json:"IpList" xml:"IpList"`
  193. IpAclXfwd string `json:"IpAclXfwd" xml:"IpAclXfwd"`
  194. Status string `json:"Status" xml:"Status"`
  195. } `json:"IpAllowListConfig" xml:"IpAllowListConfig"`
  196. CacheExpiredConfigs struct {
  197. CacheExpiredConfig []struct {
  198. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  199. CacheType string `json:"CacheType" xml:"CacheType"`
  200. CacheContent string `json:"CacheContent" xml:"CacheContent"`
  201. TTL string `json:"TTL" xml:"TTL"`
  202. Weight string `json:"Weight" xml:"Weight"`
  203. Status string `json:"Status" xml:"Status"`
  204. } `json:"CacheExpiredConfig" xml:"CacheExpiredConfig"`
  205. } `json:"CacheExpiredConfigs" xml:"CacheExpiredConfigs"`
  206. HttpErrorPageConfigs struct {
  207. HttpErrorPageConfig []struct {
  208. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  209. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  210. PageUrl string `json:"PageUrl" xml:"PageUrl"`
  211. Status string `json:"Status" xml:"Status"`
  212. } `json:"HttpErrorPageConfig" xml:"HttpErrorPageConfig"`
  213. } `json:"HttpErrorPageConfigs" xml:"HttpErrorPageConfigs"`
  214. HttpHeaderConfigs struct {
  215. HttpHeaderConfig []struct {
  216. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  217. HeaderKey string `json:"HeaderKey" xml:"HeaderKey"`
  218. HeaderValue string `json:"HeaderValue" xml:"HeaderValue"`
  219. Status string `json:"Status" xml:"Status"`
  220. } `json:"HttpHeaderConfig" xml:"HttpHeaderConfig"`
  221. } `json:"HttpHeaderConfigs" xml:"HttpHeaderConfigs"`
  222. DynamicConfigs struct {
  223. DynamicConfig []struct {
  224. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  225. DynamicOrigin string `json:"DynamicOrigin" xml:"DynamicOrigin"`
  226. StaticType string `json:"StaticType" xml:"StaticType"`
  227. StaticUri string `json:"StaticUri" xml:"StaticUri"`
  228. StaticPath string `json:"StaticPath" xml:"StaticPath"`
  229. DynamicCacheControl string `json:"DynamicCacheControl" xml:"DynamicCacheControl"`
  230. Status string `json:"Status" xml:"Status"`
  231. } `json:"DynamicConfig" xml:"DynamicConfig"`
  232. } `json:"DynamicConfigs" xml:"DynamicConfigs"`
  233. ReqHeaderConfigs struct {
  234. ReqHeaderConfig []struct {
  235. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  236. Key string `json:"Key" xml:"Key"`
  237. Value string `json:"Value" xml:"Value"`
  238. Status string `json:"Status" xml:"Status"`
  239. } `json:"ReqHeaderConfig" xml:"ReqHeaderConfig"`
  240. } `json:"ReqHeaderConfigs" xml:"ReqHeaderConfigs"`
  241. SetVarsConfigs struct {
  242. SetVarsConfig []struct {
  243. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  244. VarName string `json:"VarName" xml:"VarName"`
  245. VarValue string `json:"VarValue" xml:"VarValue"`
  246. Status string `json:"Status" xml:"Status"`
  247. } `json:"SetVarsConfig" xml:"SetVarsConfig"`
  248. } `json:"SetVarsConfigs" xml:"SetVarsConfigs"`
  249. } `json:"DomainConfigs" xml:"DomainConfigs"`
  250. }
  251. func CreateDescribeDomainConfigsRequest() (request *DescribeDomainConfigsRequest) {
  252. request = &DescribeDomainConfigsRequest{
  253. RpcRequest: &requests.RpcRequest{},
  254. }
  255. request.InitWithApiInfo("Cdn", "2014-11-11", "DescribeDomainConfigs", "", "")
  256. return
  257. }
  258. func CreateDescribeDomainConfigsResponse() (response *DescribeDomainConfigsResponse) {
  259. response = &DescribeDomainConfigsResponse{
  260. BaseResponse: &responses.BaseResponse{},
  261. }
  262. return
  263. }