describe_scaling_configurations.go 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. package ess
  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) DescribeScalingConfigurations(request *DescribeScalingConfigurationsRequest) (response *DescribeScalingConfigurationsResponse, err error) {
  21. response = CreateDescribeScalingConfigurationsResponse()
  22. err = client.DoAction(request, response)
  23. return
  24. }
  25. func (client *Client) DescribeScalingConfigurationsWithChan(request *DescribeScalingConfigurationsRequest) (<-chan *DescribeScalingConfigurationsResponse, <-chan error) {
  26. responseChan := make(chan *DescribeScalingConfigurationsResponse, 1)
  27. errChan := make(chan error, 1)
  28. err := client.AddAsyncTask(func() {
  29. defer close(responseChan)
  30. defer close(errChan)
  31. response, err := client.DescribeScalingConfigurations(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) DescribeScalingConfigurationsWithCallback(request *DescribeScalingConfigurationsRequest, callback func(response *DescribeScalingConfigurationsResponse, err error)) <-chan int {
  43. result := make(chan int, 1)
  44. err := client.AddAsyncTask(func() {
  45. var response *DescribeScalingConfigurationsResponse
  46. var err error
  47. defer close(result)
  48. response, err = client.DescribeScalingConfigurations(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 DescribeScalingConfigurationsRequest struct {
  60. *requests.RpcRequest
  61. PageSize requests.Integer `position:"Query" name:"PageSize"`
  62. ScalingConfigurationId2 string `position:"Query" name:"ScalingConfigurationId.2"`
  63. ScalingConfigurationId3 string `position:"Query" name:"ScalingConfigurationId.3"`
  64. ScalingConfigurationId1 string `position:"Query" name:"ScalingConfigurationId.1"`
  65. ScalingConfigurationId9 string `position:"Query" name:"ScalingConfigurationId.9"`
  66. ScalingConfigurationId8 string `position:"Query" name:"ScalingConfigurationId.8"`
  67. ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
  68. ScalingConfigurationId7 string `position:"Query" name:"ScalingConfigurationId.7"`
  69. ScalingConfigurationName3 string `position:"Query" name:"ScalingConfigurationName.3"`
  70. ScalingConfigurationId6 string `position:"Query" name:"ScalingConfigurationId.6"`
  71. ScalingConfigurationName2 string `position:"Query" name:"ScalingConfigurationName.2"`
  72. ScalingConfigurationId5 string `position:"Query" name:"ScalingConfigurationId.5"`
  73. ScalingConfigurationName1 string `position:"Query" name:"ScalingConfigurationName.1"`
  74. ScalingConfigurationId4 string `position:"Query" name:"ScalingConfigurationId.4"`
  75. ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
  76. OwnerAccount string `position:"Query" name:"OwnerAccount"`
  77. ScalingConfigurationName10 string `position:"Query" name:"ScalingConfigurationName.10"`
  78. PageNumber requests.Integer `position:"Query" name:"PageNumber"`
  79. ScalingConfigurationName4 string `position:"Query" name:"ScalingConfigurationName.4"`
  80. ScalingConfigurationName5 string `position:"Query" name:"ScalingConfigurationName.5"`
  81. ScalingConfigurationName6 string `position:"Query" name:"ScalingConfigurationName.6"`
  82. ScalingConfigurationName7 string `position:"Query" name:"ScalingConfigurationName.7"`
  83. ScalingConfigurationName8 string `position:"Query" name:"ScalingConfigurationName.8"`
  84. OwnerId requests.Integer `position:"Query" name:"OwnerId"`
  85. ScalingConfigurationName9 string `position:"Query" name:"ScalingConfigurationName.9"`
  86. ScalingGroupId string `position:"Query" name:"ScalingGroupId"`
  87. ScalingConfigurationId10 string `position:"Query" name:"ScalingConfigurationId.10"`
  88. }
  89. type DescribeScalingConfigurationsResponse struct {
  90. *responses.BaseResponse
  91. TotalCount int `json:"TotalCount" xml:"TotalCount"`
  92. PageNumber int `json:"PageNumber" xml:"PageNumber"`
  93. PageSize int `json:"PageSize" xml:"PageSize"`
  94. RequestId string `json:"RequestId" xml:"RequestId"`
  95. ScalingConfigurations struct {
  96. ScalingConfiguration []struct {
  97. ScalingConfigurationId string `json:"ScalingConfigurationId" xml:"ScalingConfigurationId"`
  98. ScalingConfigurationName string `json:"ScalingConfigurationName" xml:"ScalingConfigurationName"`
  99. ScalingGroupId string `json:"ScalingGroupId" xml:"ScalingGroupId"`
  100. InstanceName string `json:"InstanceName" xml:"InstanceName"`
  101. ImageId string `json:"ImageId" xml:"ImageId"`
  102. InstanceType string `json:"InstanceType" xml:"InstanceType"`
  103. InstanceGeneration string `json:"InstanceGeneration" xml:"InstanceGeneration"`
  104. SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"`
  105. IoOptimized string `json:"IoOptimized" xml:"IoOptimized"`
  106. InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"`
  107. InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"`
  108. InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"`
  109. SystemDiskCategory string `json:"SystemDiskCategory" xml:"SystemDiskCategory"`
  110. SystemDiskSize int `json:"SystemDiskSize" xml:"SystemDiskSize"`
  111. LifecycleState string `json:"LifecycleState" xml:"LifecycleState"`
  112. CreationTime string `json:"CreationTime" xml:"CreationTime"`
  113. LoadBalancerWeight int `json:"LoadBalancerWeight" xml:"LoadBalancerWeight"`
  114. UserData string `json:"UserData" xml:"UserData"`
  115. KeyPairName string `json:"KeyPairName" xml:"KeyPairName"`
  116. RamRoleName string `json:"RamRoleName" xml:"RamRoleName"`
  117. DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"`
  118. SecurityEnhancementStrategy string `json:"SecurityEnhancementStrategy" xml:"SecurityEnhancementStrategy"`
  119. InstanceTypes struct {
  120. InstanceType []string `json:"InstanceType" xml:"InstanceType"`
  121. } `json:"InstanceTypes" xml:"InstanceTypes"`
  122. DataDisks struct {
  123. DataDisk []struct {
  124. Size int `json:"Size" xml:"Size"`
  125. Category string `json:"Category" xml:"Category"`
  126. SnapshotId string `json:"SnapshotId" xml:"SnapshotId"`
  127. Device string `json:"Device" xml:"Device"`
  128. } `json:"DataDisk" xml:"DataDisk"`
  129. } `json:"DataDisks" xml:"DataDisks"`
  130. Tags struct {
  131. Tag []struct {
  132. Key string `json:"Key" xml:"Key"`
  133. Value string `json:"Value" xml:"Value"`
  134. } `json:"Tag" xml:"Tag"`
  135. } `json:"Tags" xml:"Tags"`
  136. } `json:"ScalingConfiguration" xml:"ScalingConfiguration"`
  137. } `json:"ScalingConfigurations" xml:"ScalingConfigurations"`
  138. }
  139. func CreateDescribeScalingConfigurationsRequest() (request *DescribeScalingConfigurationsRequest) {
  140. request = &DescribeScalingConfigurationsRequest{
  141. RpcRequest: &requests.RpcRequest{},
  142. }
  143. request.InitWithApiInfo("Ess", "2014-08-28", "DescribeScalingConfigurations", "ess", "openAPI")
  144. return
  145. }
  146. func CreateDescribeScalingConfigurationsResponse() (response *DescribeScalingConfigurationsResponse) {
  147. response = &DescribeScalingConfigurationsResponse{
  148. BaseResponse: &responses.BaseResponse{},
  149. }
  150. return
  151. }