describe_domain_configs.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. responseChan <- response
  33. errChan <- err
  34. })
  35. if err != nil {
  36. errChan <- err
  37. close(responseChan)
  38. close(errChan)
  39. }
  40. return responseChan, errChan
  41. }
  42. func (client *Client) DescribeDomainConfigsWithCallback(request *DescribeDomainConfigsRequest, callback func(response *DescribeDomainConfigsResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *DescribeDomainConfigsResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.DescribeDomainConfigs(request)
  49. callback(response, err)
  50. result <- 1
  51. })
  52. if err != nil {
  53. defer close(result)
  54. callback(nil, err)
  55. result <- 0
  56. }
  57. return result
  58. }
  59. type DescribeDomainConfigsRequest struct {
  60. *requests.RpcRequest
  61. ConfigList string `position:"Query" name:"ConfigList"`
  62. DomainName string `position:"Query" name:"DomainName"`
  63. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  64. SecurityToken string `position:"Query" name:"SecurityToken"`
  65. }
  66. type DescribeDomainConfigsResponse struct {
  67. *responses.BaseResponse
  68. RequestId string `json:"RequestId" xml:"RequestId"`
  69. DomainConfigs struct {
  70. CcConfig struct {
  71. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  72. Enable string `json:"Enable" xml:"Enable"`
  73. AllowIps string `json:"AllowIps" xml:"AllowIps"`
  74. BlockIps string `json:"BlockIps" xml:"BlockIps"`
  75. Status string `json:"Status" xml:"Status"`
  76. } `json:"CcConfig" xml:"CcConfig"`
  77. ErrorPageConfig struct {
  78. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  79. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  80. PageType string `json:"PageType" xml:"PageType"`
  81. CustomPageUrl string `json:"CustomPageUrl" xml:"CustomPageUrl"`
  82. Status string `json:"Status" xml:"Status"`
  83. } `json:"ErrorPageConfig" xml:"ErrorPageConfig"`
  84. OptimizeConfig struct {
  85. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  86. Enable string `json:"Enable" xml:"Enable"`
  87. Status string `json:"Status" xml:"Status"`
  88. } `json:"OptimizeConfig" xml:"OptimizeConfig"`
  89. PageCompressConfig struct {
  90. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  91. Enable string `json:"Enable" xml:"Enable"`
  92. Status string `json:"Status" xml:"Status"`
  93. } `json:"PageCompressConfig" xml:"PageCompressConfig"`
  94. IgnoreQueryStringConfig struct {
  95. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  96. HashKeyArgs string `json:"HashKeyArgs" xml:"HashKeyArgs"`
  97. Enable string `json:"Enable" xml:"Enable"`
  98. Status string `json:"Status" xml:"Status"`
  99. } `json:"IgnoreQueryStringConfig" xml:"IgnoreQueryStringConfig"`
  100. RangeConfig struct {
  101. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  102. Enable string `json:"Enable" xml:"Enable"`
  103. Status string `json:"Status" xml:"Status"`
  104. } `json:"RangeConfig" xml:"RangeConfig"`
  105. RefererConfig struct {
  106. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  107. ReferType string `json:"ReferType" xml:"ReferType"`
  108. ReferList string `json:"ReferList" xml:"ReferList"`
  109. AllowEmpty string `json:"AllowEmpty" xml:"AllowEmpty"`
  110. DisableAst string `json:"DisableAst" xml:"DisableAst"`
  111. Status string `json:"Status" xml:"Status"`
  112. } `json:"RefererConfig" xml:"RefererConfig"`
  113. ReqAuthConfig struct {
  114. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  115. AuthType string `json:"AuthType" xml:"AuthType"`
  116. Key1 string `json:"Key1" xml:"Key1"`
  117. Key2 string `json:"Key2" xml:"Key2"`
  118. Status string `json:"Status" xml:"Status"`
  119. AliAuthWhiteList string `json:"AliAuthWhiteList" xml:"AliAuthWhiteList"`
  120. AuthM3u8 string `json:"AuthM3u8" xml:"AuthM3u8"`
  121. AuthAddr string `json:"AuthAddr" xml:"AuthAddr"`
  122. AuthRemoteDesc string `json:"AuthRemoteDesc" xml:"AuthRemoteDesc"`
  123. TimeOut string `json:"TimeOut" xml:"TimeOut"`
  124. } `json:"ReqAuthConfig" xml:"ReqAuthConfig"`
  125. SrcHostConfig struct {
  126. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  127. DomainName string `json:"DomainName" xml:"DomainName"`
  128. Status string `json:"Status" xml:"Status"`
  129. } `json:"SrcHostConfig" xml:"SrcHostConfig"`
  130. VideoSeekConfig struct {
  131. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  132. Enable string `json:"Enable" xml:"Enable"`
  133. Status string `json:"Status" xml:"Status"`
  134. } `json:"VideoSeekConfig" xml:"VideoSeekConfig"`
  135. WafConfig struct {
  136. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  137. Enable string `json:"Enable" xml:"Enable"`
  138. Status string `json:"Status" xml:"Status"`
  139. } `json:"WafConfig" xml:"WafConfig"`
  140. NotifyUrlConfig struct {
  141. Enable string `json:"Enable" xml:"Enable"`
  142. NotifyUrl string `json:"NotifyUrl" xml:"NotifyUrl"`
  143. } `json:"NotifyUrlConfig" xml:"NotifyUrlConfig"`
  144. RedirectTypeConfig struct {
  145. RedirectType string `json:"RedirectType" xml:"RedirectType"`
  146. } `json:"RedirectTypeConfig" xml:"RedirectTypeConfig"`
  147. ForwardSchemeConfig struct {
  148. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  149. Enable string `json:"Enable" xml:"Enable"`
  150. SchemeOrigin string `json:"SchemeOrigin" xml:"SchemeOrigin"`
  151. SchemeOriginPort string `json:"SchemeOriginPort" xml:"SchemeOriginPort"`
  152. Status string `json:"Status" xml:"Status"`
  153. } `json:"ForwardSchemeConfig" xml:"ForwardSchemeConfig"`
  154. RemoveQueryStringConfig struct {
  155. AliRemoveArgs string `json:"AliRemoveArgs" xml:"AliRemoveArgs"`
  156. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  157. Status string `json:"Status" xml:"Status"`
  158. } `json:"RemoveQueryStringConfig" xml:"RemoveQueryStringConfig"`
  159. L2OssKeyConfig struct {
  160. PrivateOssAuth string `json:"PrivateOssAuth" xml:"PrivateOssAuth"`
  161. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  162. Status string `json:"Status" xml:"Status"`
  163. } `json:"L2OssKeyConfig" xml:"L2OssKeyConfig"`
  164. MacServiceConfig struct {
  165. AppList string `json:"AppList" xml:"AppList"`
  166. Enabled string `json:"Enabled" xml:"Enabled"`
  167. ProcessResult string `json:"ProcessResult" xml:"ProcessResult"`
  168. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  169. Status string `json:"Status" xml:"Status"`
  170. } `json:"MacServiceConfig" xml:"MacServiceConfig"`
  171. GreenManagerConfig struct {
  172. Enabled string `json:"Enabled" xml:"Enabled"`
  173. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  174. Status string `json:"Status" xml:"Status"`
  175. } `json:"GreenManagerConfig" xml:"GreenManagerConfig"`
  176. HttpsOptionConfig struct {
  177. Http2 string `json:"Http2" xml:"Http2"`
  178. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  179. Status string `json:"Status" xml:"Status"`
  180. } `json:"HttpsOptionConfig" xml:"HttpsOptionConfig"`
  181. AliBusinessConfig struct {
  182. AliBusinessTable string `json:"AliBusinessTable" xml:"AliBusinessTable"`
  183. AliBusinessType string `json:"AliBusinessType" xml:"AliBusinessType"`
  184. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  185. Status string `json:"Status" xml:"Status"`
  186. } `json:"AliBusinessConfig" xml:"AliBusinessConfig"`
  187. IpAllowListConfig struct {
  188. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  189. IpList string `json:"IpList" xml:"IpList"`
  190. IpAclXfwd string `json:"IpAclXfwd" xml:"IpAclXfwd"`
  191. Status string `json:"Status" xml:"Status"`
  192. } `json:"IpAllowListConfig" xml:"IpAllowListConfig"`
  193. CacheExpiredConfigs struct {
  194. CacheExpiredConfig []struct {
  195. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  196. CacheType string `json:"CacheType" xml:"CacheType"`
  197. CacheContent string `json:"CacheContent" xml:"CacheContent"`
  198. TTL string `json:"TTL" xml:"TTL"`
  199. Weight string `json:"Weight" xml:"Weight"`
  200. Status string `json:"Status" xml:"Status"`
  201. } `json:"CacheExpiredConfig" xml:"CacheExpiredConfig"`
  202. } `json:"CacheExpiredConfigs" xml:"CacheExpiredConfigs"`
  203. HttpErrorPageConfigs struct {
  204. HttpErrorPageConfig []struct {
  205. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  206. ErrorCode string `json:"ErrorCode" xml:"ErrorCode"`
  207. PageUrl string `json:"PageUrl" xml:"PageUrl"`
  208. Status string `json:"Status" xml:"Status"`
  209. } `json:"HttpErrorPageConfig" xml:"HttpErrorPageConfig"`
  210. } `json:"HttpErrorPageConfigs" xml:"HttpErrorPageConfigs"`
  211. HttpHeaderConfigs struct {
  212. HttpHeaderConfig []struct {
  213. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  214. HeaderKey string `json:"HeaderKey" xml:"HeaderKey"`
  215. HeaderValue string `json:"HeaderValue" xml:"HeaderValue"`
  216. Status string `json:"Status" xml:"Status"`
  217. } `json:"HttpHeaderConfig" xml:"HttpHeaderConfig"`
  218. } `json:"HttpHeaderConfigs" xml:"HttpHeaderConfigs"`
  219. DynamicConfigs struct {
  220. DynamicConfig []struct {
  221. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  222. DynamicOrigin string `json:"DynamicOrigin" xml:"DynamicOrigin"`
  223. StaticType string `json:"StaticType" xml:"StaticType"`
  224. StaticUri string `json:"StaticUri" xml:"StaticUri"`
  225. StaticPath string `json:"StaticPath" xml:"StaticPath"`
  226. DynamicCacheControl string `json:"DynamicCacheControl" xml:"DynamicCacheControl"`
  227. Status string `json:"Status" xml:"Status"`
  228. } `json:"DynamicConfig" xml:"DynamicConfig"`
  229. } `json:"DynamicConfigs" xml:"DynamicConfigs"`
  230. ReqHeaderConfigs struct {
  231. ReqHeaderConfig []struct {
  232. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  233. Key string `json:"Key" xml:"Key"`
  234. Value string `json:"Value" xml:"Value"`
  235. Status string `json:"Status" xml:"Status"`
  236. } `json:"ReqHeaderConfig" xml:"ReqHeaderConfig"`
  237. } `json:"ReqHeaderConfigs" xml:"ReqHeaderConfigs"`
  238. SetVarsConfigs struct {
  239. SetVarsConfig []struct {
  240. ConfigId string `json:"ConfigId" xml:"ConfigId"`
  241. VarName string `json:"VarName" xml:"VarName"`
  242. VarValue string `json:"VarValue" xml:"VarValue"`
  243. Status string `json:"Status" xml:"Status"`
  244. } `json:"SetVarsConfig" xml:"SetVarsConfig"`
  245. } `json:"SetVarsConfigs" xml:"SetVarsConfigs"`
  246. } `json:"DomainConfigs" xml:"DomainConfigs"`
  247. }
  248. func CreateDescribeDomainConfigsRequest() (request *DescribeDomainConfigsRequest) {
  249. request = &DescribeDomainConfigsRequest{
  250. RpcRequest: &requests.RpcRequest{},
  251. }
  252. request.InitWithApiInfo("Cdn", "2014-11-11", "DescribeDomainConfigs", "", "openAPI")
  253. request.Method = requests.POST
  254. return
  255. }
  256. func CreateDescribeDomainConfigsResponse() (response *DescribeDomainConfigsResponse) {
  257. response = &DescribeDomainConfigsResponse{
  258. BaseResponse: &responses.BaseResponse{},
  259. }
  260. return
  261. }