describe_deployed_api.go 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. package cloudapi
  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) DescribeDeployedApi(request *DescribeDeployedApiRequest) (response *DescribeDeployedApiResponse, err error) {
  21. response = CreateDescribeDeployedApiResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) DescribeDeployedApiWithChan(request *DescribeDeployedApiRequest) (<-chan *DescribeDeployedApiResponse, <-chan error) {
  26. responseChan := make(chan *DescribeDeployedApiResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.DescribeDeployedApi(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) DescribeDeployedApiWithCallback(request *DescribeDeployedApiRequest, callback func(response *DescribeDeployedApiResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *DescribeDeployedApiResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.DescribeDeployedApi(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 DescribeDeployedApiRequest struct {
  60. *requests.RpcRequest
  61. StageName string `position:"Query" name:"StageName"`
  62. GroupId string `position:"Query" name:"GroupId"`
  63. ApiId string `position:"Query" name:"ApiId"`
  64. }
  65. type DescribeDeployedApiResponse struct {
  66. *responses.BaseResponse
  67. RequestId string `json:"RequestId" xml:"RequestId"`
  68. RegionId string `json:"RegionId" xml:"RegionId"`
  69. GroupId string `json:"GroupId" xml:"GroupId"`
  70. GroupName string `json:"GroupName" xml:"GroupName"`
  71. StageName string `json:"StageName" xml:"StageName"`
  72. ApiId string `json:"ApiId" xml:"ApiId"`
  73. ApiName string `json:"ApiName" xml:"ApiName"`
  74. Description string `json:"Description" xml:"Description"`
  75. Visibility string `json:"Visibility" xml:"Visibility"`
  76. AuthType string `json:"AuthType" xml:"AuthType"`
  77. ResultType string `json:"ResultType" xml:"ResultType"`
  78. ResultSample string `json:"ResultSample" xml:"ResultSample"`
  79. FailResultSample string `json:"FailResultSample" xml:"FailResultSample"`
  80. DeployedTime string `json:"DeployedTime" xml:"DeployedTime"`
  81. AllowSignatureMethod string `json:"AllowSignatureMethod" xml:"AllowSignatureMethod"`
  82. RequestConfig struct {
  83. RequestProtocol string `json:"RequestProtocol" xml:"RequestProtocol"`
  84. RequestHttpMethod string `json:"RequestHttpMethod" xml:"RequestHttpMethod"`
  85. RequestPath string `json:"RequestPath" xml:"RequestPath"`
  86. BodyFormat string `json:"BodyFormat" xml:"BodyFormat"`
  87. PostBodyDescription string `json:"PostBodyDescription" xml:"PostBodyDescription"`
  88. RequestMode string `json:"RequestMode" xml:"RequestMode"`
  89. } `json:"RequestConfig" xml:"RequestConfig"`
  90. ServiceConfig struct {
  91. ServiceProtocol string `json:"ServiceProtocol" xml:"ServiceProtocol"`
  92. ServiceAddress string `json:"ServiceAddress" xml:"ServiceAddress"`
  93. ServiceHttpMethod string `json:"ServiceHttpMethod" xml:"ServiceHttpMethod"`
  94. ServicePath string `json:"ServicePath" xml:"ServicePath"`
  95. ServiceTimeout int `json:"ServiceTimeout" xml:"ServiceTimeout"`
  96. Mock string `json:"Mock" xml:"Mock"`
  97. MockResult string `json:"MockResult" xml:"MockResult"`
  98. ServiceVpcEnable string `json:"ServiceVpcEnable" xml:"ServiceVpcEnable"`
  99. VpcConfig struct {
  100. Name string `json:"Name" xml:"Name"`
  101. VpcId string `json:"VpcId" xml:"VpcId"`
  102. InstanceId string `json:"InstanceId" xml:"InstanceId"`
  103. Port int `json:"Port" xml:"Port"`
  104. } `json:"VpcConfig" xml:"VpcConfig"`
  105. } `json:"ServiceConfig" xml:"ServiceConfig"`
  106. OpenIdConnectConfig struct {
  107. OpenIdApiType string `json:"OpenIdApiType" xml:"OpenIdApiType"`
  108. IdTokenParamName string `json:"IdTokenParamName" xml:"IdTokenParamName"`
  109. PublicKeyId string `json:"PublicKeyId" xml:"PublicKeyId"`
  110. PublicKey string `json:"PublicKey" xml:"PublicKey"`
  111. } `json:"OpenIdConnectConfig" xml:"OpenIdConnectConfig"`
  112. ErrorCodeSamples []struct {
  113. Code string `json:"Code" xml:"Code"`
  114. Message string `json:"Message" xml:"Message"`
  115. Description string `json:"Description" xml:"Description"`
  116. } `json:"ErrorCodeSamples" xml:"ErrorCodeSamples"`
  117. ResultDescriptions []struct {
  118. Id string `json:"Id" xml:"Id"`
  119. Pid string `json:"Pid" xml:"Pid"`
  120. HasChild bool `json:"HasChild" xml:"HasChild"`
  121. Key string `json:"Key" xml:"Key"`
  122. Name string `json:"Name" xml:"Name"`
  123. Mandatory bool `json:"Mandatory" xml:"Mandatory"`
  124. Type string `json:"Type" xml:"Type"`
  125. Description string `json:"Description" xml:"Description"`
  126. } `json:"ResultDescriptions" xml:"ResultDescriptions"`
  127. SystemParameters []struct {
  128. ParameterName string `json:"ParameterName" xml:"ParameterName"`
  129. ServiceParameterName string `json:"ServiceParameterName" xml:"ServiceParameterName"`
  130. Location string `json:"Location" xml:"Location"`
  131. DemoValue string `json:"DemoValue" xml:"DemoValue"`
  132. Description string `json:"Description" xml:"Description"`
  133. } `json:"SystemParameters" xml:"SystemParameters"`
  134. CustomSystemParameters []struct {
  135. ParameterName string `json:"ParameterName" xml:"ParameterName"`
  136. ServiceParameterName string `json:"ServiceParameterName" xml:"ServiceParameterName"`
  137. Location string `json:"Location" xml:"Location"`
  138. DemoValue string `json:"DemoValue" xml:"DemoValue"`
  139. Description string `json:"Description" xml:"Description"`
  140. } `json:"CustomSystemParameters" xml:"CustomSystemParameters"`
  141. ConstantParameters []struct {
  142. ServiceParameterName string `json:"ServiceParameterName" xml:"ServiceParameterName"`
  143. ConstantValue string `json:"ConstantValue" xml:"ConstantValue"`
  144. Location string `json:"Location" xml:"Location"`
  145. Description string `json:"Description" xml:"Description"`
  146. } `json:"ConstantParameters" xml:"ConstantParameters"`
  147. RequestParameters []struct {
  148. ApiParameterName string `json:"ApiParameterName" xml:"ApiParameterName"`
  149. Location string `json:"Location" xml:"Location"`
  150. ParameterType string `json:"ParameterType" xml:"ParameterType"`
  151. Required string `json:"Required" xml:"Required"`
  152. DefaultValue string `json:"DefaultValue" xml:"DefaultValue"`
  153. DemoValue string `json:"DemoValue" xml:"DemoValue"`
  154. MaxValue int64 `json:"MaxValue" xml:"MaxValue"`
  155. MinValue int64 `json:"MinValue" xml:"MinValue"`
  156. MaxLength int64 `json:"MaxLength" xml:"MaxLength"`
  157. MinLength int64 `json:"MinLength" xml:"MinLength"`
  158. RegularExpression string `json:"RegularExpression" xml:"RegularExpression"`
  159. JsonScheme string `json:"JsonScheme" xml:"JsonScheme"`
  160. EnumValue string `json:"EnumValue" xml:"EnumValue"`
  161. DocShow string `json:"DocShow" xml:"DocShow"`
  162. DocOrder int `json:"DocOrder" xml:"DocOrder"`
  163. Description string `json:"Description" xml:"Description"`
  164. } `json:"RequestParameters" xml:"RequestParameters"`
  165. ServiceParameters []struct {
  166. ServiceParameterName string `json:"ServiceParameterName" xml:"ServiceParameterName"`
  167. Location string `json:"Location" xml:"Location"`
  168. ParameterType string `json:"ParameterType" xml:"ParameterType"`
  169. } `json:"ServiceParameters" xml:"ServiceParameters"`
  170. ServiceParametersMap []struct {
  171. ServiceParameterName string `json:"ServiceParameterName" xml:"ServiceParameterName"`
  172. RequestParameterName string `json:"RequestParameterName" xml:"RequestParameterName"`
  173. } `json:"ServiceParametersMap" xml:"ServiceParametersMap"`
  174. }
  175. func CreateDescribeDeployedApiRequest() (request *DescribeDeployedApiRequest) {
  176. request = &DescribeDeployedApiRequest{
  177. RpcRequest: &requests.RpcRequest{},
  178. }
  179. request.InitWithApiInfo("CloudAPI", "2016-07-14", "DescribeDeployedApi", "", "")
  180. return
  181. }
  182. func CreateDescribeDeployedApiResponse() (response *DescribeDeployedApiResponse) {
  183. response = &DescribeDeployedApiResponse{
  184. BaseResponse: &responses.BaseResponse{},
  185. }
  186. return
  187. }