DescribeInstancesRequest.py 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. #
  13. # Unless required by applicable law or agreed to in writing,
  14. # software distributed under the License is distributed on an
  15. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. # KIND, either express or implied. See the License for the
  17. # specific language governing permissions and limitations
  18. # under the License.
  19. from aliyunsdkcore.request import RpcRequest
  20. from aliyunsdkecs.endpoint import endpoint_data
  21. class DescribeInstancesRequest(RpcRequest):
  22. def __init__(self):
  23. RpcRequest.__init__(self, 'Ecs', '2014-05-26', 'DescribeInstances','ecs')
  24. self.set_method('POST')
  25. if hasattr(self, "endpoint_map"):
  26. setattr(self, "endpoint_map", endpoint_data.getEndpointMap())
  27. if hasattr(self, "endpoint_regional"):
  28. setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional())
  29. def get_InnerIpAddresses(self):
  30. return self.get_query_params().get('InnerIpAddresses')
  31. def set_InnerIpAddresses(self,InnerIpAddresses):
  32. self.add_query_param('InnerIpAddresses',InnerIpAddresses)
  33. def get_ResourceOwnerId(self):
  34. return self.get_query_params().get('ResourceOwnerId')
  35. def set_ResourceOwnerId(self,ResourceOwnerId):
  36. self.add_query_param('ResourceOwnerId',ResourceOwnerId)
  37. def get_PrivateIpAddresses(self):
  38. return self.get_query_params().get('PrivateIpAddresses')
  39. def set_PrivateIpAddresses(self,PrivateIpAddresses):
  40. self.add_query_param('PrivateIpAddresses',PrivateIpAddresses)
  41. def get_HpcClusterId(self):
  42. return self.get_query_params().get('HpcClusterId')
  43. def set_HpcClusterId(self,HpcClusterId):
  44. self.add_query_param('HpcClusterId',HpcClusterId)
  45. def get_HttpPutResponseHopLimit(self):
  46. return self.get_query_params().get('HttpPutResponseHopLimit')
  47. def set_HttpPutResponseHopLimit(self,HttpPutResponseHopLimit):
  48. self.add_query_param('HttpPutResponseHopLimit',HttpPutResponseHopLimit)
  49. def get_Filter2Value(self):
  50. return self.get_query_params().get('Filter.2.Value')
  51. def set_Filter2Value(self,Filter2Value):
  52. self.add_query_param('Filter.2.Value',Filter2Value)
  53. def get_KeyPairName(self):
  54. return self.get_query_params().get('KeyPairName')
  55. def set_KeyPairName(self,KeyPairName):
  56. self.add_query_param('KeyPairName',KeyPairName)
  57. def get_ResourceGroupId(self):
  58. return self.get_query_params().get('ResourceGroupId')
  59. def set_ResourceGroupId(self,ResourceGroupId):
  60. self.add_query_param('ResourceGroupId',ResourceGroupId)
  61. def get_LockReason(self):
  62. return self.get_query_params().get('LockReason')
  63. def set_LockReason(self,LockReason):
  64. self.add_query_param('LockReason',LockReason)
  65. def get_Filter1Key(self):
  66. return self.get_query_params().get('Filter.1.Key')
  67. def set_Filter1Key(self,Filter1Key):
  68. self.add_query_param('Filter.1.Key',Filter1Key)
  69. def get_DeviceAvailable(self):
  70. return self.get_query_params().get('DeviceAvailable')
  71. def set_DeviceAvailable(self,DeviceAvailable):
  72. self.add_query_param('DeviceAvailable',DeviceAvailable)
  73. def get_Tags(self):
  74. return self.get_query_params().get('Tags')
  75. def set_Tags(self, Tags):
  76. for depth1 in range(len(Tags)):
  77. if Tags[depth1].get('Value') is not None:
  78. self.add_query_param('Tag.' + str(depth1 + 1) + '.Value', Tags[depth1].get('Value'))
  79. if Tags[depth1].get('Key') is not None:
  80. self.add_query_param('Tag.' + str(depth1 + 1) + '.Key', Tags[depth1].get('Key'))
  81. def get_Filter3Value(self):
  82. return self.get_query_params().get('Filter.3.Value')
  83. def set_Filter3Value(self,Filter3Value):
  84. self.add_query_param('Filter.3.Value',Filter3Value)
  85. def get_DryRun(self):
  86. return self.get_query_params().get('DryRun')
  87. def set_DryRun(self,DryRun):
  88. self.add_query_param('DryRun',DryRun)
  89. def get_Filter1Value(self):
  90. return self.get_query_params().get('Filter.1.Value')
  91. def set_Filter1Value(self,Filter1Value):
  92. self.add_query_param('Filter.1.Value',Filter1Value)
  93. def get_NeedSaleCycle(self):
  94. return self.get_query_params().get('NeedSaleCycle')
  95. def set_NeedSaleCycle(self,NeedSaleCycle):
  96. self.add_query_param('NeedSaleCycle',NeedSaleCycle)
  97. def get_OwnerId(self):
  98. return self.get_query_params().get('OwnerId')
  99. def set_OwnerId(self,OwnerId):
  100. self.add_query_param('OwnerId',OwnerId)
  101. def get_VSwitchId(self):
  102. return self.get_query_params().get('VSwitchId')
  103. def set_VSwitchId(self,VSwitchId):
  104. self.add_query_param('VSwitchId',VSwitchId)
  105. def get_AdditionalAttributess(self):
  106. return self.get_query_params().get('AdditionalAttributess')
  107. def set_AdditionalAttributess(self, AdditionalAttributess):
  108. for depth1 in range(len(AdditionalAttributess)):
  109. if AdditionalAttributess[depth1] is not None:
  110. self.add_query_param('AdditionalAttributes.' + str(depth1 + 1) , AdditionalAttributess[depth1])
  111. def get_InstanceName(self):
  112. return self.get_query_params().get('InstanceName')
  113. def set_InstanceName(self,InstanceName):
  114. self.add_query_param('InstanceName',InstanceName)
  115. def get_InstanceIds(self):
  116. return self.get_query_params().get('InstanceIds')
  117. def set_InstanceIds(self,InstanceIds):
  118. self.add_query_param('InstanceIds',InstanceIds)
  119. def get_InternetChargeType(self):
  120. return self.get_query_params().get('InternetChargeType')
  121. def set_InternetChargeType(self,InternetChargeType):
  122. self.add_query_param('InternetChargeType',InternetChargeType)
  123. def get_ZoneId(self):
  124. return self.get_query_params().get('ZoneId')
  125. def set_ZoneId(self,ZoneId):
  126. self.add_query_param('ZoneId',ZoneId)
  127. def get_InstanceNetworkType(self):
  128. return self.get_query_params().get('InstanceNetworkType')
  129. def set_InstanceNetworkType(self,InstanceNetworkType):
  130. self.add_query_param('InstanceNetworkType',InstanceNetworkType)
  131. def get_Status(self):
  132. return self.get_query_params().get('Status')
  133. def set_Status(self,Status):
  134. self.add_query_param('Status',Status)
  135. def get_ImageId(self):
  136. return self.get_query_params().get('ImageId')
  137. def set_ImageId(self,ImageId):
  138. self.add_query_param('ImageId',ImageId)
  139. def get_Filter4Value(self):
  140. return self.get_query_params().get('Filter.4.Value')
  141. def set_Filter4Value(self,Filter4Value):
  142. self.add_query_param('Filter.4.Value',Filter4Value)
  143. def get_IoOptimized(self):
  144. return self.get_query_params().get('IoOptimized')
  145. def set_IoOptimized(self,IoOptimized):
  146. self.add_query_param('IoOptimized',IoOptimized)
  147. def get_SecurityGroupId(self):
  148. return self.get_query_params().get('SecurityGroupId')
  149. def set_SecurityGroupId(self,SecurityGroupId):
  150. self.add_query_param('SecurityGroupId',SecurityGroupId)
  151. def get_Filter4Key(self):
  152. return self.get_query_params().get('Filter.4.Key')
  153. def set_Filter4Key(self,Filter4Key):
  154. self.add_query_param('Filter.4.Key',Filter4Key)
  155. def get_PageNumber(self):
  156. return self.get_query_params().get('PageNumber')
  157. def set_PageNumber(self,PageNumber):
  158. self.add_query_param('PageNumber',PageNumber)
  159. def get_RdmaIpAddresses(self):
  160. return self.get_query_params().get('RdmaIpAddresses')
  161. def set_RdmaIpAddresses(self,RdmaIpAddresses):
  162. self.add_query_param('RdmaIpAddresses',RdmaIpAddresses)
  163. def get_HttpEndpoint(self):
  164. return self.get_query_params().get('HttpEndpoint')
  165. def set_HttpEndpoint(self,HttpEndpoint):
  166. self.add_query_param('HttpEndpoint',HttpEndpoint)
  167. def get_PageSize(self):
  168. return self.get_query_params().get('PageSize')
  169. def set_PageSize(self,PageSize):
  170. self.add_query_param('PageSize',PageSize)
  171. def get_PublicIpAddresses(self):
  172. return self.get_query_params().get('PublicIpAddresses')
  173. def set_PublicIpAddresses(self,PublicIpAddresses):
  174. self.add_query_param('PublicIpAddresses',PublicIpAddresses)
  175. def get_InstanceType(self):
  176. return self.get_query_params().get('InstanceType')
  177. def set_InstanceType(self,InstanceType):
  178. self.add_query_param('InstanceType',InstanceType)
  179. def get_InstanceChargeType(self):
  180. return self.get_query_params().get('InstanceChargeType')
  181. def set_InstanceChargeType(self,InstanceChargeType):
  182. self.add_query_param('InstanceChargeType',InstanceChargeType)
  183. def get_ResourceOwnerAccount(self):
  184. return self.get_query_params().get('ResourceOwnerAccount')
  185. def set_ResourceOwnerAccount(self,ResourceOwnerAccount):
  186. self.add_query_param('ResourceOwnerAccount',ResourceOwnerAccount)
  187. def get_OwnerAccount(self):
  188. return self.get_query_params().get('OwnerAccount')
  189. def set_OwnerAccount(self,OwnerAccount):
  190. self.add_query_param('OwnerAccount',OwnerAccount)
  191. def get_InstanceTypeFamily(self):
  192. return self.get_query_params().get('InstanceTypeFamily')
  193. def set_InstanceTypeFamily(self,InstanceTypeFamily):
  194. self.add_query_param('InstanceTypeFamily',InstanceTypeFamily)
  195. def get_Filter2Key(self):
  196. return self.get_query_params().get('Filter.2.Key')
  197. def set_Filter2Key(self,Filter2Key):
  198. self.add_query_param('Filter.2.Key',Filter2Key)
  199. def get_EipAddresses(self):
  200. return self.get_query_params().get('EipAddresses')
  201. def set_EipAddresses(self,EipAddresses):
  202. self.add_query_param('EipAddresses',EipAddresses)
  203. def get_VpcId(self):
  204. return self.get_query_params().get('VpcId')
  205. def set_VpcId(self,VpcId):
  206. self.add_query_param('VpcId',VpcId)
  207. def get_HttpTokens(self):
  208. return self.get_query_params().get('HttpTokens')
  209. def set_HttpTokens(self,HttpTokens):
  210. self.add_query_param('HttpTokens',HttpTokens)
  211. def get_Filter3Key(self):
  212. return self.get_query_params().get('Filter.3.Key')
  213. def set_Filter3Key(self,Filter3Key):
  214. self.add_query_param('Filter.3.Key',Filter3Key)