azure_mgmt_resources 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -3
  3. data/lib/2016-02-01/generated/azure_mgmt_resources.rb +79 -0
  4. data/lib/2016-02-01/generated/azure_mgmt_resources/deployment_operations.rb +331 -0
  5. data/lib/2016-02-01/generated/azure_mgmt_resources/deployments.rb +1000 -0
  6. data/lib/2016-02-01/generated/azure_mgmt_resources/models/alias_path_type.rb +62 -0
  7. data/lib/2016-02-01/generated/azure_mgmt_resources/models/alias_type.rb +63 -0
  8. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/basic_dependency.rb +1 -1
  9. data/lib/2016-02-01/generated/azure_mgmt_resources/models/debug_setting.rb +45 -0
  10. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/dependency.rb +1 -1
  11. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment.rb +45 -0
  12. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_export_result.rb +45 -0
  13. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_extended.rb +1 -1
  14. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_extended_filter.rb +1 -1
  15. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_list_result.rb +94 -0
  16. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_mode.rb +1 -1
  17. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
  18. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
  19. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +94 -0
  20. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
  21. data/lib/2016-02-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
  22. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/deployment_validate_result.rb +1 -1
  23. data/lib/2016-02-01/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
  24. data/lib/2016-02-01/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
  25. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/generic_resource_filter.rb +1 -1
  26. data/lib/2016-02-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
  27. data/lib/2016-02-01/generated/azure_mgmt_resources/models/identity.rb +68 -0
  28. data/lib/2016-02-01/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
  29. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/plan.rb +1 -1
  30. data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider.rb +83 -0
  31. data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider_list_result.rb +94 -0
  32. data/lib/2016-02-01/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
  33. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
  34. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
  35. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
  36. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_group_filter.rb +1 -1
  37. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb +94 -0
  38. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_group_properties.rb +1 -1
  39. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_identity_type.rb +1 -1
  40. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_list_result.rb +94 -0
  41. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +83 -0
  42. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +1 -1
  43. data/lib/2016-02-01/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
  44. data/lib/2016-02-01/generated/azure_mgmt_resources/models/sku.rb +94 -0
  45. data/lib/2016-02-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
  46. data/lib/2016-02-01/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
  47. data/lib/2016-02-01/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
  48. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/tag_value.rb +1 -1
  49. data/lib/2016-02-01/generated/azure_mgmt_resources/models/tags_list_result.rb +94 -0
  50. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/models/target_resource.rb +1 -1
  51. data/lib/2016-02-01/generated/azure_mgmt_resources/models/template_link.rb +55 -0
  52. data/lib/2016-02-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
  53. data/lib/2016-02-01/generated/azure_mgmt_resources/providers.rb +507 -0
  54. data/lib/2016-02-01/generated/azure_mgmt_resources/resource_groups.rb +1067 -0
  55. data/lib/2016-02-01/generated/azure_mgmt_resources/resource_management_client.rb +151 -0
  56. data/lib/2016-02-01/generated/azure_mgmt_resources/resources.rb +805 -0
  57. data/lib/2016-02-01/generated/azure_mgmt_resources/tags.rb +568 -0
  58. data/lib/{generated → 2016-02-01/generated}/azure_mgmt_resources/version.rb +2 -2
  59. data/lib/2016-07-01/generated/azure_mgmt_resources.rb +79 -0
  60. data/lib/2016-07-01/generated/azure_mgmt_resources/deployment_operations.rb +331 -0
  61. data/lib/2016-07-01/generated/azure_mgmt_resources/deployments.rb +1000 -0
  62. data/lib/2016-07-01/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
  63. data/lib/{generated → 2016-07-01/generated}/azure_mgmt_resources/models/alias_type.rb +1 -1
  64. data/lib/2016-07-01/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
  65. data/lib/2016-07-01/generated/azure_mgmt_resources/models/debug_setting.rb +45 -0
  66. data/lib/2016-07-01/generated/azure_mgmt_resources/models/dependency.rb +82 -0
  67. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment.rb +45 -0
  68. data/lib/{generated → 2016-07-01/generated}/azure_mgmt_resources/models/deployment_export_result.rb +1 -1
  69. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
  70. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
  71. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_list_result.rb +94 -0
  72. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
  73. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operation.rb +65 -0
  74. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +117 -0
  75. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +94 -0
  76. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_properties.rb +103 -0
  77. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +179 -0
  78. data/lib/2016-07-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
  79. data/lib/2016-07-01/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
  80. data/lib/2016-07-01/generated/azure_mgmt_resources/models/generic_resource.rb +142 -0
  81. data/lib/2016-07-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
  82. data/lib/2016-07-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
  83. data/lib/2016-07-01/generated/azure_mgmt_resources/models/identity.rb +68 -0
  84. data/lib/2016-07-01/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
  85. data/lib/2016-07-01/generated/azure_mgmt_resources/models/plan.rb +74 -0
  86. data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider.rb +83 -0
  87. data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider_list_result.rb +94 -0
  88. data/lib/2016-07-01/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
  89. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
  90. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group.rb +97 -0
  91. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
  92. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
  93. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_list_result.rb +94 -0
  94. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
  95. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
  96. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_list_result.rb +94 -0
  97. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +83 -0
  98. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
  99. data/lib/2016-07-01/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
  100. data/lib/2016-07-01/generated/azure_mgmt_resources/models/sku.rb +94 -0
  101. data/lib/2016-07-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
  102. data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
  103. data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_details.rb +83 -0
  104. data/lib/2016-07-01/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
  105. data/lib/2016-07-01/generated/azure_mgmt_resources/models/tags_list_result.rb +94 -0
  106. data/lib/2016-07-01/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
  107. data/lib/2016-07-01/generated/azure_mgmt_resources/models/template_link.rb +55 -0
  108. data/lib/2016-07-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
  109. data/lib/2016-07-01/generated/azure_mgmt_resources/providers.rb +507 -0
  110. data/lib/2016-07-01/generated/azure_mgmt_resources/resource_groups.rb +1067 -0
  111. data/lib/2016-07-01/generated/azure_mgmt_resources/resource_management_client.rb +151 -0
  112. data/lib/2016-07-01/generated/azure_mgmt_resources/resources.rb +805 -0
  113. data/lib/2016-07-01/generated/azure_mgmt_resources/tags.rb +568 -0
  114. data/lib/{generated/azure_mgmt_resources/module_definition.rb → 2016-07-01/generated/azure_mgmt_resources/version.rb} +3 -3
  115. data/lib/2016-09-01/generated/azure_mgmt_resources.rb +79 -0
  116. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/deployment_operations.rb +4 -4
  117. data/lib/2016-09-01/generated/azure_mgmt_resources/deployments.rb +1086 -0
  118. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/alias_path_type.rb +1 -1
  119. data/lib/2016-09-01/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
  120. data/lib/2016-09-01/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
  121. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/debug_setting.rb +1 -1
  122. data/lib/2016-09-01/generated/azure_mgmt_resources/models/dependency.rb +82 -0
  123. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment.rb +1 -1
  124. data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
  125. data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
  126. data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
  127. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_list_result.rb +1 -1
  128. data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
  129. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operation.rb +1 -1
  130. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operation_properties.rb +1 -1
  131. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_operations_list_result.rb +1 -1
  132. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_properties.rb +1 -1
  133. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/deployment_properties_extended.rb +1 -1
  134. data/lib/2016-09-01/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
  135. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/export_template_request.rb +1 -1
  136. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/generic_resource.rb +1 -1
  137. data/lib/2016-09-01/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
  138. data/lib/2016-09-01/generated/azure_mgmt_resources/models/http_message.rb +45 -0
  139. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/identity.rb +1 -1
  140. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/parameters_link.rb +1 -1
  141. data/lib/2016-09-01/generated/azure_mgmt_resources/models/plan.rb +74 -0
  142. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider.rb +1 -1
  143. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider_list_result.rb +1 -1
  144. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/provider_resource_type.rb +1 -1
  145. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource.rb +95 -0
  146. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_group.rb +1 -1
  147. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_export_result.rb +56 -0
  148. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
  149. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_group_list_result.rb +1 -1
  150. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
  151. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
  152. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resource_list_result.rb +1 -1
  153. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_management_error_with_details.rb +87 -0
  154. data/lib/2016-09-01/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
  155. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/resources_move_info.rb +1 -1
  156. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/sku.rb +1 -1
  157. data/lib/2016-09-01/generated/azure_mgmt_resources/models/sub_resource.rb +45 -0
  158. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tag_count.rb +1 -1
  159. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tag_details.rb +1 -1
  160. data/lib/2016-09-01/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
  161. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/tags_list_result.rb +1 -1
  162. data/lib/2016-09-01/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
  163. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/models/template_link.rb +1 -1
  164. data/lib/2016-09-01/generated/azure_mgmt_resources/module_definition.rb +9 -0
  165. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/providers.rb +6 -6
  166. data/lib/2016-09-01/generated/azure_mgmt_resources/resource_groups.rb +1086 -0
  167. data/lib/2016-09-01/generated/azure_mgmt_resources/resource_management_client.rb +149 -0
  168. data/lib/2016-09-01/generated/azure_mgmt_resources/resources.rb +1429 -0
  169. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_resources/tags.rb +7 -7
  170. data/lib/2016-09-01/generated/azure_mgmt_resources/version.rb +8 -0
  171. data/lib/2017-05-10/generated/azure_mgmt_resources.rb +80 -0
  172. data/lib/2017-05-10/generated/azure_mgmt_resources/deployment_operations.rb +335 -0
  173. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/deployments.rb +12 -12
  174. data/lib/2017-05-10/generated/azure_mgmt_resources/models/alias_path_type.rb +61 -0
  175. data/lib/2017-05-10/generated/azure_mgmt_resources/models/alias_type.rb +62 -0
  176. data/lib/2017-05-10/generated/azure_mgmt_resources/models/basic_dependency.rb +64 -0
  177. data/lib/2017-05-10/generated/azure_mgmt_resources/models/debug_setting.rb +52 -0
  178. data/lib/2017-05-10/generated/azure_mgmt_resources/models/dependency.rb +82 -0
  179. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment.rb +45 -0
  180. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_export_result.rb +44 -0
  181. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_extended.rb +65 -0
  182. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_extended_filter.rb +44 -0
  183. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_list_result.rb +95 -0
  184. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_mode.rb +16 -0
  185. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operation.rb +67 -0
  186. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operation_properties.rb +125 -0
  187. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_operations_list_result.rb +95 -0
  188. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_properties.rb +117 -0
  189. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_properties_extended.rb +183 -0
  190. data/lib/2017-05-10/generated/azure_mgmt_resources/models/deployment_validate_result.rb +57 -0
  191. data/lib/2017-05-10/generated/azure_mgmt_resources/models/export_template_request.rb +65 -0
  192. data/lib/2017-05-10/generated/azure_mgmt_resources/models/generic_resource.rb +145 -0
  193. data/lib/2017-05-10/generated/azure_mgmt_resources/models/generic_resource_filter.rb +64 -0
  194. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/http_message.rb +1 -1
  195. data/lib/2017-05-10/generated/azure_mgmt_resources/models/identity.rb +68 -0
  196. data/lib/2017-05-10/generated/azure_mgmt_resources/models/parameters_link.rb +55 -0
  197. data/lib/2017-05-10/generated/azure_mgmt_resources/models/plan.rb +74 -0
  198. data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider.rb +86 -0
  199. data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider_list_result.rb +95 -0
  200. data/lib/2017-05-10/generated/azure_mgmt_resources/models/provider_resource_type.rb +115 -0
  201. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource.rb +1 -1
  202. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group.rb +107 -0
  203. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_group_export_result.rb +1 -1
  204. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_filter.rb +54 -0
  205. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_list_result.rb +95 -0
  206. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_group_patchable.rb +1 -1
  207. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_group_properties.rb +45 -0
  208. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_identity_type.rb +15 -0
  209. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_list_result.rb +95 -0
  210. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/resource_management_error_with_details.rb +1 -1
  211. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resource_provider_operation_display_properties.rb +85 -0
  212. data/lib/2017-05-10/generated/azure_mgmt_resources/models/resources_move_info.rb +61 -0
  213. data/lib/2017-05-10/generated/azure_mgmt_resources/models/sku.rb +94 -0
  214. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/models/sub_resource.rb +1 -1
  215. data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_count.rb +54 -0
  216. data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_details.rb +85 -0
  217. data/lib/2017-05-10/generated/azure_mgmt_resources/models/tag_value.rb +65 -0
  218. data/lib/2017-05-10/generated/azure_mgmt_resources/models/tags_list_result.rb +95 -0
  219. data/lib/2017-05-10/generated/azure_mgmt_resources/models/target_resource.rb +64 -0
  220. data/lib/2017-05-10/generated/azure_mgmt_resources/models/template_link.rb +55 -0
  221. data/lib/2017-05-10/generated/azure_mgmt_resources/module_definition.rb +9 -0
  222. data/lib/2017-05-10/generated/azure_mgmt_resources/providers.rb +515 -0
  223. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resource_groups.rb +11 -11
  224. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resource_management_client.rb +3 -3
  225. data/lib/{generated → 2017-05-10/generated}/azure_mgmt_resources/resources.rb +17 -17
  226. data/lib/2017-05-10/generated/azure_mgmt_resources/tags.rb +593 -0
  227. data/lib/2017-05-10/generated/azure_mgmt_resources/version.rb +8 -0
  228. data/lib/azure_mgmt_resources.rb +6 -1
  229. data/lib/module_definition.rb +7 -0
  230. data/lib/profiles/common/configurable.rb +73 -0
  231. data/lib/profiles/common/default.rb +68 -0
  232. data/lib/profiles/latest/modules/resources_profile_module.rb +240 -0
  233. data/lib/profiles/latest/resources_latest_profile_client.rb +33 -0
  234. data/lib/profiles/latest/resources_module_definition.rb +9 -0
  235. data/lib/profiles/v2017_03_09/modules/resources_profile_module.rb +236 -0
  236. data/lib/profiles/v2017_03_09/resources_module_definition.rb +9 -0
  237. data/lib/profiles/v2017_03_09/resources_v2017_03_09_profile_client.rb +33 -0
  238. data/lib/version.rb +7 -0
  239. metadata +237 -59
  240. data/lib/generated/azure_mgmt_resources.rb +0 -80
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Resources
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # Tag details.
@@ -0,0 +1,65 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
+ module Models
8
+ #
9
+ # Tag information.
10
+ #
11
+ class TagValue
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The tag ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The tag value.
19
+ attr_accessor :tag_value
20
+
21
+ # @return [TagCount] The tag value count.
22
+ attr_accessor :count
23
+
24
+
25
+ #
26
+ # Mapper for TagValue class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'TagValue',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'TagValue',
36
+ model_properties: {
37
+ id: {
38
+ required: false,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ tag_value: {
45
+ required: false,
46
+ serialized_name: 'tagValue',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ count: {
52
+ required: false,
53
+ serialized_name: 'count',
54
+ type: {
55
+ name: 'Composite',
56
+ class_name: 'TagCount'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Resources
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # List of subscription tags.
@@ -0,0 +1,64 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
+ module Models
8
+ #
9
+ # Target resource.
10
+ #
11
+ class TargetResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The ID of the resource.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the resource.
19
+ attr_accessor :resource_name
20
+
21
+ # @return [String] The type of the resource.
22
+ attr_accessor :resource_type
23
+
24
+
25
+ #
26
+ # Mapper for TargetResource class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'TargetResource',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'TargetResource',
36
+ model_properties: {
37
+ id: {
38
+ required: false,
39
+ serialized_name: 'id',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ resource_name: {
45
+ required: false,
46
+ serialized_name: 'resourceName',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ resource_type: {
52
+ required: false,
53
+ serialized_name: 'resourceType',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Resources
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # Entity representing the reference to the template.
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::Resources end
8
+ module Azure::Resources::Mgmt end
9
+ module Azure::Resources::Mgmt::V2016_09_01 end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Resources
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
7
  #
8
8
  # Provides operations for working with resources and resource groups.
9
9
  #
@@ -98,7 +98,7 @@ module Azure::ARM::Resources
98
98
  if status_code == 200
99
99
  begin
100
100
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
101
- result_mapper = Azure::ARM::Resources::Models::Provider.mapper()
101
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::Provider.mapper()
102
102
  result.body = @client.deserialize(result_mapper, parsed_response)
103
103
  rescue Exception => e
104
104
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -188,7 +188,7 @@ module Azure::ARM::Resources
188
188
  if status_code == 200
189
189
  begin
190
190
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
191
- result_mapper = Azure::ARM::Resources::Models::Provider.mapper()
191
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::Provider.mapper()
192
192
  result.body = @client.deserialize(result_mapper, parsed_response)
193
193
  rescue Exception => e
194
194
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -289,7 +289,7 @@ module Azure::ARM::Resources
289
289
  if status_code == 200
290
290
  begin
291
291
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
292
- result_mapper = Azure::ARM::Resources::Models::ProviderListResult.mapper()
292
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ProviderListResult.mapper()
293
293
  result.body = @client.deserialize(result_mapper, parsed_response)
294
294
  rescue Exception => e
295
295
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -385,7 +385,7 @@ module Azure::ARM::Resources
385
385
  if status_code == 200
386
386
  begin
387
387
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
388
- result_mapper = Azure::ARM::Resources::Models::Provider.mapper()
388
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::Provider.mapper()
389
389
  result.body = @client.deserialize(result_mapper, parsed_response)
390
390
  rescue Exception => e
391
391
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -472,7 +472,7 @@ module Azure::ARM::Resources
472
472
  if status_code == 200
473
473
  begin
474
474
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
475
- result_mapper = Azure::ARM::Resources::Models::ProviderListResult.mapper()
475
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ProviderListResult.mapper()
476
476
  result.body = @client.deserialize(result_mapper, parsed_response)
477
477
  rescue Exception => e
478
478
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -0,0 +1,1086 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Resources::Mgmt::V2016_09_01
7
+ #
8
+ # Provides operations for working with resources and resource groups.
9
+ #
10
+ class ResourceGroups
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ResourceGroups class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ResourceManagementClient] reference to the ResourceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get all the resources for a resource group.
26
+ #
27
+ # @param resource_group_name [String] The resource group with the resources to
28
+ # get.
29
+ # @param filter [String] The filter to apply on the operation.
30
+ # @param expand [String] The $expand query parameter
31
+ # @param top [Integer] The number of results to return. If null is passed,
32
+ # returns all resources.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Array<GenericResource>] operation results.
37
+ #
38
+ def list_resources(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
39
+ first_page = list_resources_as_lazy(resource_group_name, filter, expand, top, custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Get all the resources for a resource group.
45
+ #
46
+ # @param resource_group_name [String] The resource group with the resources to
47
+ # get.
48
+ # @param filter [String] The filter to apply on the operation.
49
+ # @param expand [String] The $expand query parameter
50
+ # @param top [Integer] The number of results to return. If null is passed,
51
+ # returns all resources.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_resources_with_http_info(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
58
+ list_resources_async(resource_group_name, filter, expand, top, custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Get all the resources for a resource group.
63
+ #
64
+ # @param resource_group_name [String] The resource group with the resources to
65
+ # get.
66
+ # @param filter [String] The filter to apply on the operation.
67
+ # @param expand [String] The $expand query parameter
68
+ # @param top [Integer] The number of results to return. If null is passed,
69
+ # returns all resources.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_resources_async(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
79
+
80
+
81
+ request_headers = {}
82
+
83
+ # Set Headers
84
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
85
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
86
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'
87
+
88
+ request_url = @base_url || @client.base_url
89
+
90
+ options = {
91
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
92
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
93
+ query_params: {'$filter' => filter,'$expand' => expand,'$top' => top,'api-version' => @client.api_version},
94
+ headers: request_headers.merge(custom_headers || {}),
95
+ base_url: request_url
96
+ }
97
+ promise = @client.make_request_async(:get, path_template, options)
98
+
99
+ promise = promise.then do |result|
100
+ http_response = result.response
101
+ status_code = http_response.status
102
+ response_content = http_response.body
103
+ unless status_code == 200
104
+ error_model = JSON.load(response_content)
105
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
106
+ end
107
+
108
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
109
+ # Deserialize Response
110
+ if status_code == 200
111
+ begin
112
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
113
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceListResult.mapper()
114
+ result.body = @client.deserialize(result_mapper, parsed_response)
115
+ rescue Exception => e
116
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
117
+ end
118
+ end
119
+
120
+ result
121
+ end
122
+
123
+ promise.execute
124
+ end
125
+
126
+ #
127
+ # Checks whether a resource group exists.
128
+ #
129
+ # @param resource_group_name [String] The name of the resource group to check.
130
+ # The name is case insensitive.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Boolean] operation results.
135
+ #
136
+ def check_existence(resource_group_name, custom_headers = nil)
137
+ response = check_existence_async(resource_group_name, custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # Checks whether a resource group exists.
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group to check.
145
+ # The name is case insensitive.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def check_existence_with_http_info(resource_group_name, custom_headers = nil)
152
+ check_existence_async(resource_group_name, custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # Checks whether a resource group exists.
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group to check.
159
+ # The name is case insensitive.
160
+ # @param [Hash{String => String}] A hash of custom headers that will be added
161
+ # to the HTTP request.
162
+ #
163
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
164
+ #
165
+ def check_existence_async(resource_group_name, custom_headers = nil)
166
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
167
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
168
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
169
+
170
+
171
+ request_headers = {}
172
+
173
+ # Set Headers
174
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
175
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
176
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
177
+
178
+ request_url = @base_url || @client.base_url
179
+
180
+ options = {
181
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
182
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
183
+ query_params: {'api-version' => @client.api_version},
184
+ headers: request_headers.merge(custom_headers || {}),
185
+ base_url: request_url
186
+ }
187
+ promise = @client.make_request_async(:head, path_template, options)
188
+
189
+ promise = promise.then do |result|
190
+ http_response = result.response
191
+ status_code = http_response.status
192
+ response_content = http_response.body
193
+ unless status_code == 204 || status_code == 404
194
+ error_model = JSON.load(response_content)
195
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
196
+ end
197
+
198
+ result.body = (status_code == 204)
199
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
200
+
201
+ result
202
+ end
203
+
204
+ promise.execute
205
+ end
206
+
207
+ #
208
+ # Creates a resource group.
209
+ #
210
+ # @param resource_group_name [String] The name of the resource group to create
211
+ # or update.
212
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
213
+ # a resource group.
214
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
215
+ # will be added to the HTTP request.
216
+ #
217
+ # @return [ResourceGroup] operation results.
218
+ #
219
+ def create_or_update(resource_group_name, parameters, custom_headers = nil)
220
+ response = create_or_update_async(resource_group_name, parameters, custom_headers).value!
221
+ response.body unless response.nil?
222
+ end
223
+
224
+ #
225
+ # Creates a resource group.
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group to create
228
+ # or update.
229
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
230
+ # a resource group.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
+ #
236
+ def create_or_update_with_http_info(resource_group_name, parameters, custom_headers = nil)
237
+ create_or_update_async(resource_group_name, parameters, custom_headers).value!
238
+ end
239
+
240
+ #
241
+ # Creates a resource group.
242
+ #
243
+ # @param resource_group_name [String] The name of the resource group to create
244
+ # or update.
245
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
246
+ # a resource group.
247
+ # @param [Hash{String => String}] A hash of custom headers that will be added
248
+ # to the HTTP request.
249
+ #
250
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
251
+ #
252
+ def create_or_update_async(resource_group_name, parameters, custom_headers = nil)
253
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
254
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
255
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
256
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
257
+
258
+
259
+ request_headers = {}
260
+
261
+ # Set Headers
262
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
263
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
264
+
265
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
266
+
267
+ # Serialize Request
268
+ request_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
269
+ request_content = @client.serialize(request_mapper, parameters)
270
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
271
+
272
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
273
+
274
+ request_url = @base_url || @client.base_url
275
+
276
+ options = {
277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
279
+ query_params: {'api-version' => @client.api_version},
280
+ body: request_content,
281
+ headers: request_headers.merge(custom_headers || {}),
282
+ base_url: request_url
283
+ }
284
+ promise = @client.make_request_async(:put, path_template, options)
285
+
286
+ promise = promise.then do |result|
287
+ http_response = result.response
288
+ status_code = http_response.status
289
+ response_content = http_response.body
290
+ unless status_code == 201 || status_code == 200
291
+ error_model = JSON.load(response_content)
292
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
293
+ end
294
+
295
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
296
+ # Deserialize Response
297
+ if status_code == 201
298
+ begin
299
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
300
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
301
+ result.body = @client.deserialize(result_mapper, parsed_response)
302
+ rescue Exception => e
303
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
304
+ end
305
+ end
306
+ # Deserialize Response
307
+ if status_code == 200
308
+ begin
309
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
310
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
311
+ result.body = @client.deserialize(result_mapper, parsed_response)
312
+ rescue Exception => e
313
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
314
+ end
315
+ end
316
+
317
+ result
318
+ end
319
+
320
+ promise.execute
321
+ end
322
+
323
+ #
324
+ # Deletes a resource group.
325
+ #
326
+ # When you delete a resource group, all of its resources are also deleted.
327
+ # Deleting a resource group deletes all of its template deployments and
328
+ # currently stored operations.
329
+ #
330
+ # @param resource_group_name [String] The name of the resource group to delete.
331
+ # The name is case insensitive.
332
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
333
+ # will be added to the HTTP request.
334
+ #
335
+ def delete(resource_group_name, custom_headers = nil)
336
+ response = delete_async(resource_group_name, custom_headers).value!
337
+ nil
338
+ end
339
+
340
+ #
341
+ # @param resource_group_name [String] The name of the resource group to delete.
342
+ # The name is case insensitive.
343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
+ # will be added to the HTTP request.
345
+ #
346
+ # @return [Concurrent::Promise] promise which provides async access to http
347
+ # response.
348
+ #
349
+ def delete_async(resource_group_name, custom_headers = nil)
350
+ # Send request
351
+ promise = begin_delete_async(resource_group_name, custom_headers)
352
+
353
+ promise = promise.then do |response|
354
+ # Defining deserialization method.
355
+ deserialize_method = lambda do |parsed_response|
356
+ end
357
+
358
+ # Waiting for response.
359
+ @client.get_long_running_operation_result(response, deserialize_method)
360
+ end
361
+
362
+ promise
363
+ end
364
+
365
+ #
366
+ # Gets a resource group.
367
+ #
368
+ # @param resource_group_name [String] The name of the resource group to get.
369
+ # The name is case insensitive.
370
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
371
+ # will be added to the HTTP request.
372
+ #
373
+ # @return [ResourceGroup] operation results.
374
+ #
375
+ def get(resource_group_name, custom_headers = nil)
376
+ response = get_async(resource_group_name, custom_headers).value!
377
+ response.body unless response.nil?
378
+ end
379
+
380
+ #
381
+ # Gets a resource group.
382
+ #
383
+ # @param resource_group_name [String] The name of the resource group to get.
384
+ # The name is case insensitive.
385
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
386
+ # will be added to the HTTP request.
387
+ #
388
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
389
+ #
390
+ def get_with_http_info(resource_group_name, custom_headers = nil)
391
+ get_async(resource_group_name, custom_headers).value!
392
+ end
393
+
394
+ #
395
+ # Gets a resource group.
396
+ #
397
+ # @param resource_group_name [String] The name of the resource group to get.
398
+ # The name is case insensitive.
399
+ # @param [Hash{String => String}] A hash of custom headers that will be added
400
+ # to the HTTP request.
401
+ #
402
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
403
+ #
404
+ def get_async(resource_group_name, custom_headers = nil)
405
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
406
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
407
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
408
+
409
+
410
+ request_headers = {}
411
+
412
+ # Set Headers
413
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
414
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
415
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
416
+
417
+ request_url = @base_url || @client.base_url
418
+
419
+ options = {
420
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
421
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
422
+ query_params: {'api-version' => @client.api_version},
423
+ headers: request_headers.merge(custom_headers || {}),
424
+ base_url: request_url
425
+ }
426
+ promise = @client.make_request_async(:get, path_template, options)
427
+
428
+ promise = promise.then do |result|
429
+ http_response = result.response
430
+ status_code = http_response.status
431
+ response_content = http_response.body
432
+ unless status_code == 200
433
+ error_model = JSON.load(response_content)
434
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
435
+ end
436
+
437
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
438
+ # Deserialize Response
439
+ if status_code == 200
440
+ begin
441
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
442
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
443
+ result.body = @client.deserialize(result_mapper, parsed_response)
444
+ rescue Exception => e
445
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
446
+ end
447
+ end
448
+
449
+ result
450
+ end
451
+
452
+ promise.execute
453
+ end
454
+
455
+ #
456
+ # Updates a resource group.
457
+ #
458
+ # Resource groups can be updated through a simple PATCH operation to a group
459
+ # address. The format of the request is the same as that for creating a
460
+ # resource group. If a field is unspecified, the current value is retained.
461
+ #
462
+ # @param resource_group_name [String] The name of the resource group to update.
463
+ # The name is case insensitive.
464
+ # @param parameters [ResourceGroup] Parameters supplied to update a resource
465
+ # group.
466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
467
+ # will be added to the HTTP request.
468
+ #
469
+ # @return [ResourceGroup] operation results.
470
+ #
471
+ def patch(resource_group_name, parameters, custom_headers = nil)
472
+ response = patch_async(resource_group_name, parameters, custom_headers).value!
473
+ response.body unless response.nil?
474
+ end
475
+
476
+ #
477
+ # Updates a resource group.
478
+ #
479
+ # Resource groups can be updated through a simple PATCH operation to a group
480
+ # address. The format of the request is the same as that for creating a
481
+ # resource group. If a field is unspecified, the current value is retained.
482
+ #
483
+ # @param resource_group_name [String] The name of the resource group to update.
484
+ # The name is case insensitive.
485
+ # @param parameters [ResourceGroup] Parameters supplied to update a resource
486
+ # group.
487
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
488
+ # will be added to the HTTP request.
489
+ #
490
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
491
+ #
492
+ def patch_with_http_info(resource_group_name, parameters, custom_headers = nil)
493
+ patch_async(resource_group_name, parameters, custom_headers).value!
494
+ end
495
+
496
+ #
497
+ # Updates a resource group.
498
+ #
499
+ # Resource groups can be updated through a simple PATCH operation to a group
500
+ # address. The format of the request is the same as that for creating a
501
+ # resource group. If a field is unspecified, the current value is retained.
502
+ #
503
+ # @param resource_group_name [String] The name of the resource group to update.
504
+ # The name is case insensitive.
505
+ # @param parameters [ResourceGroup] Parameters supplied to update a resource
506
+ # group.
507
+ # @param [Hash{String => String}] A hash of custom headers that will be added
508
+ # to the HTTP request.
509
+ #
510
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
511
+ #
512
+ def patch_async(resource_group_name, parameters, custom_headers = nil)
513
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
514
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
515
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
516
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
517
+
518
+
519
+ request_headers = {}
520
+
521
+ # Set Headers
522
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
523
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
524
+
525
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
526
+
527
+ # Serialize Request
528
+ request_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
529
+ request_content = @client.serialize(request_mapper, parameters)
530
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
531
+
532
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
533
+
534
+ request_url = @base_url || @client.base_url
535
+
536
+ options = {
537
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
538
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
539
+ query_params: {'api-version' => @client.api_version},
540
+ body: request_content,
541
+ headers: request_headers.merge(custom_headers || {}),
542
+ base_url: request_url
543
+ }
544
+ promise = @client.make_request_async(:patch, path_template, options)
545
+
546
+ promise = promise.then do |result|
547
+ http_response = result.response
548
+ status_code = http_response.status
549
+ response_content = http_response.body
550
+ unless status_code == 200
551
+ error_model = JSON.load(response_content)
552
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
553
+ end
554
+
555
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
556
+ # Deserialize Response
557
+ if status_code == 200
558
+ begin
559
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
560
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroup.mapper()
561
+ result.body = @client.deserialize(result_mapper, parsed_response)
562
+ rescue Exception => e
563
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
564
+ end
565
+ end
566
+
567
+ result
568
+ end
569
+
570
+ promise.execute
571
+ end
572
+
573
+ #
574
+ # Captures the specified resource group as a template.
575
+ #
576
+ # @param resource_group_name [String] The name of the resource group to export
577
+ # as a template.
578
+ # @param parameters [ExportTemplateRequest] Parameters for exporting the
579
+ # template.
580
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
581
+ # will be added to the HTTP request.
582
+ #
583
+ # @return [ResourceGroupExportResult] operation results.
584
+ #
585
+ def export_template(resource_group_name, parameters, custom_headers = nil)
586
+ response = export_template_async(resource_group_name, parameters, custom_headers).value!
587
+ response.body unless response.nil?
588
+ end
589
+
590
+ #
591
+ # Captures the specified resource group as a template.
592
+ #
593
+ # @param resource_group_name [String] The name of the resource group to export
594
+ # as a template.
595
+ # @param parameters [ExportTemplateRequest] Parameters for exporting the
596
+ # template.
597
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
598
+ # will be added to the HTTP request.
599
+ #
600
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
601
+ #
602
+ def export_template_with_http_info(resource_group_name, parameters, custom_headers = nil)
603
+ export_template_async(resource_group_name, parameters, custom_headers).value!
604
+ end
605
+
606
+ #
607
+ # Captures the specified resource group as a template.
608
+ #
609
+ # @param resource_group_name [String] The name of the resource group to export
610
+ # as a template.
611
+ # @param parameters [ExportTemplateRequest] Parameters for exporting the
612
+ # template.
613
+ # @param [Hash{String => String}] A hash of custom headers that will be added
614
+ # to the HTTP request.
615
+ #
616
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
617
+ #
618
+ def export_template_async(resource_group_name, parameters, custom_headers = nil)
619
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
620
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
621
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
622
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
623
+
624
+
625
+ request_headers = {}
626
+
627
+ # Set Headers
628
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
629
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
630
+
631
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
632
+
633
+ # Serialize Request
634
+ request_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ExportTemplateRequest.mapper()
635
+ request_content = @client.serialize(request_mapper, parameters)
636
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
637
+
638
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'
639
+
640
+ request_url = @base_url || @client.base_url
641
+
642
+ options = {
643
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
644
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
645
+ query_params: {'api-version' => @client.api_version},
646
+ body: request_content,
647
+ headers: request_headers.merge(custom_headers || {}),
648
+ base_url: request_url
649
+ }
650
+ promise = @client.make_request_async(:post, path_template, options)
651
+
652
+ promise = promise.then do |result|
653
+ http_response = result.response
654
+ status_code = http_response.status
655
+ response_content = http_response.body
656
+ unless status_code == 200
657
+ error_model = JSON.load(response_content)
658
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
659
+ end
660
+
661
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
662
+ # Deserialize Response
663
+ if status_code == 200
664
+ begin
665
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
666
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroupExportResult.mapper()
667
+ result.body = @client.deserialize(result_mapper, parsed_response)
668
+ rescue Exception => e
669
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
670
+ end
671
+ end
672
+
673
+ result
674
+ end
675
+
676
+ promise.execute
677
+ end
678
+
679
+ #
680
+ # Gets all the resource groups for a subscription.
681
+ #
682
+ # @param filter [String] The filter to apply on the operation.
683
+ # @param top [Integer] The number of results to return. If null is passed,
684
+ # returns all resource groups.
685
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
686
+ # will be added to the HTTP request.
687
+ #
688
+ # @return [Array<ResourceGroup>] operation results.
689
+ #
690
+ def list(filter = nil, top = nil, custom_headers = nil)
691
+ first_page = list_as_lazy(filter, top, custom_headers)
692
+ first_page.get_all_items
693
+ end
694
+
695
+ #
696
+ # Gets all the resource groups for a subscription.
697
+ #
698
+ # @param filter [String] The filter to apply on the operation.
699
+ # @param top [Integer] The number of results to return. If null is passed,
700
+ # returns all resource groups.
701
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
702
+ # will be added to the HTTP request.
703
+ #
704
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
705
+ #
706
+ def list_with_http_info(filter = nil, top = nil, custom_headers = nil)
707
+ list_async(filter, top, custom_headers).value!
708
+ end
709
+
710
+ #
711
+ # Gets all the resource groups for a subscription.
712
+ #
713
+ # @param filter [String] The filter to apply on the operation.
714
+ # @param top [Integer] The number of results to return. If null is passed,
715
+ # returns all resource groups.
716
+ # @param [Hash{String => String}] A hash of custom headers that will be added
717
+ # to the HTTP request.
718
+ #
719
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
720
+ #
721
+ def list_async(filter = nil, top = nil, custom_headers = nil)
722
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
723
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
724
+
725
+
726
+ request_headers = {}
727
+
728
+ # Set Headers
729
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
730
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
731
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups'
732
+
733
+ request_url = @base_url || @client.base_url
734
+
735
+ options = {
736
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
737
+ path_params: {'subscriptionId' => @client.subscription_id},
738
+ query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
739
+ headers: request_headers.merge(custom_headers || {}),
740
+ base_url: request_url
741
+ }
742
+ promise = @client.make_request_async(:get, path_template, options)
743
+
744
+ promise = promise.then do |result|
745
+ http_response = result.response
746
+ status_code = http_response.status
747
+ response_content = http_response.body
748
+ unless status_code == 200
749
+ error_model = JSON.load(response_content)
750
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
751
+ end
752
+
753
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
754
+ # Deserialize Response
755
+ if status_code == 200
756
+ begin
757
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
758
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroupListResult.mapper()
759
+ result.body = @client.deserialize(result_mapper, parsed_response)
760
+ rescue Exception => e
761
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
762
+ end
763
+ end
764
+
765
+ result
766
+ end
767
+
768
+ promise.execute
769
+ end
770
+
771
+ #
772
+ # Deletes a resource group.
773
+ #
774
+ # When you delete a resource group, all of its resources are also deleted.
775
+ # Deleting a resource group deletes all of its template deployments and
776
+ # currently stored operations.
777
+ #
778
+ # @param resource_group_name [String] The name of the resource group to delete.
779
+ # The name is case insensitive.
780
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
781
+ # will be added to the HTTP request.
782
+ #
783
+ #
784
+ def begin_delete(resource_group_name, custom_headers = nil)
785
+ response = begin_delete_async(resource_group_name, custom_headers).value!
786
+ nil
787
+ end
788
+
789
+ #
790
+ # Deletes a resource group.
791
+ #
792
+ # When you delete a resource group, all of its resources are also deleted.
793
+ # Deleting a resource group deletes all of its template deployments and
794
+ # currently stored operations.
795
+ #
796
+ # @param resource_group_name [String] The name of the resource group to delete.
797
+ # The name is case insensitive.
798
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
799
+ # will be added to the HTTP request.
800
+ #
801
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
802
+ #
803
+ def begin_delete_with_http_info(resource_group_name, custom_headers = nil)
804
+ begin_delete_async(resource_group_name, custom_headers).value!
805
+ end
806
+
807
+ #
808
+ # Deletes a resource group.
809
+ #
810
+ # When you delete a resource group, all of its resources are also deleted.
811
+ # Deleting a resource group deletes all of its template deployments and
812
+ # currently stored operations.
813
+ #
814
+ # @param resource_group_name [String] The name of the resource group to delete.
815
+ # The name is case insensitive.
816
+ # @param [Hash{String => String}] A hash of custom headers that will be added
817
+ # to the HTTP request.
818
+ #
819
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
820
+ #
821
+ def begin_delete_async(resource_group_name, custom_headers = nil)
822
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
823
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
824
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
825
+
826
+
827
+ request_headers = {}
828
+
829
+ # Set Headers
830
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
831
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
832
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
833
+
834
+ request_url = @base_url || @client.base_url
835
+
836
+ options = {
837
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
838
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
839
+ query_params: {'api-version' => @client.api_version},
840
+ headers: request_headers.merge(custom_headers || {}),
841
+ base_url: request_url
842
+ }
843
+ promise = @client.make_request_async(:delete, path_template, options)
844
+
845
+ promise = promise.then do |result|
846
+ http_response = result.response
847
+ status_code = http_response.status
848
+ response_content = http_response.body
849
+ unless status_code == 202 || status_code == 200
850
+ error_model = JSON.load(response_content)
851
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
852
+ end
853
+
854
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
855
+
856
+ result
857
+ end
858
+
859
+ promise.execute
860
+ end
861
+
862
+ #
863
+ # Get all the resources for a resource group.
864
+ #
865
+ # @param next_page_link [String] The NextLink from the previous successful call
866
+ # to List operation.
867
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
868
+ # will be added to the HTTP request.
869
+ #
870
+ # @return [ResourceListResult] operation results.
871
+ #
872
+ def list_resources_next(next_page_link, custom_headers = nil)
873
+ response = list_resources_next_async(next_page_link, custom_headers).value!
874
+ response.body unless response.nil?
875
+ end
876
+
877
+ #
878
+ # Get all the resources for a resource group.
879
+ #
880
+ # @param next_page_link [String] The NextLink from the previous successful call
881
+ # to List operation.
882
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
883
+ # will be added to the HTTP request.
884
+ #
885
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
886
+ #
887
+ def list_resources_next_with_http_info(next_page_link, custom_headers = nil)
888
+ list_resources_next_async(next_page_link, custom_headers).value!
889
+ end
890
+
891
+ #
892
+ # Get all the resources for a resource group.
893
+ #
894
+ # @param next_page_link [String] The NextLink from the previous successful call
895
+ # to List operation.
896
+ # @param [Hash{String => String}] A hash of custom headers that will be added
897
+ # to the HTTP request.
898
+ #
899
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
900
+ #
901
+ def list_resources_next_async(next_page_link, custom_headers = nil)
902
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
903
+
904
+
905
+ request_headers = {}
906
+
907
+ # Set Headers
908
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
909
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
910
+ path_template = '{nextLink}'
911
+
912
+ request_url = @base_url || @client.base_url
913
+
914
+ options = {
915
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
916
+ skip_encoding_path_params: {'nextLink' => next_page_link},
917
+ headers: request_headers.merge(custom_headers || {}),
918
+ base_url: request_url
919
+ }
920
+ promise = @client.make_request_async(:get, path_template, options)
921
+
922
+ promise = promise.then do |result|
923
+ http_response = result.response
924
+ status_code = http_response.status
925
+ response_content = http_response.body
926
+ unless status_code == 200
927
+ error_model = JSON.load(response_content)
928
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
929
+ end
930
+
931
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
932
+ # Deserialize Response
933
+ if status_code == 200
934
+ begin
935
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
936
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceListResult.mapper()
937
+ result.body = @client.deserialize(result_mapper, parsed_response)
938
+ rescue Exception => e
939
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
940
+ end
941
+ end
942
+
943
+ result
944
+ end
945
+
946
+ promise.execute
947
+ end
948
+
949
+ #
950
+ # Gets all the resource groups for a subscription.
951
+ #
952
+ # @param next_page_link [String] The NextLink from the previous successful call
953
+ # to List operation.
954
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
955
+ # will be added to the HTTP request.
956
+ #
957
+ # @return [ResourceGroupListResult] operation results.
958
+ #
959
+ def list_next(next_page_link, custom_headers = nil)
960
+ response = list_next_async(next_page_link, custom_headers).value!
961
+ response.body unless response.nil?
962
+ end
963
+
964
+ #
965
+ # Gets all the resource groups for a subscription.
966
+ #
967
+ # @param next_page_link [String] The NextLink from the previous successful call
968
+ # to List operation.
969
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
970
+ # will be added to the HTTP request.
971
+ #
972
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
973
+ #
974
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
975
+ list_next_async(next_page_link, custom_headers).value!
976
+ end
977
+
978
+ #
979
+ # Gets all the resource groups for a subscription.
980
+ #
981
+ # @param next_page_link [String] The NextLink from the previous successful call
982
+ # to List operation.
983
+ # @param [Hash{String => String}] A hash of custom headers that will be added
984
+ # to the HTTP request.
985
+ #
986
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
987
+ #
988
+ def list_next_async(next_page_link, custom_headers = nil)
989
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
990
+
991
+
992
+ request_headers = {}
993
+
994
+ # Set Headers
995
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
996
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
997
+ path_template = '{nextLink}'
998
+
999
+ request_url = @base_url || @client.base_url
1000
+
1001
+ options = {
1002
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1003
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1004
+ headers: request_headers.merge(custom_headers || {}),
1005
+ base_url: request_url
1006
+ }
1007
+ promise = @client.make_request_async(:get, path_template, options)
1008
+
1009
+ promise = promise.then do |result|
1010
+ http_response = result.response
1011
+ status_code = http_response.status
1012
+ response_content = http_response.body
1013
+ unless status_code == 200
1014
+ error_model = JSON.load(response_content)
1015
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1016
+ end
1017
+
1018
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1019
+ # Deserialize Response
1020
+ if status_code == 200
1021
+ begin
1022
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1023
+ result_mapper = Azure::Resources::Mgmt::V2016_09_01::Models::ResourceGroupListResult.mapper()
1024
+ result.body = @client.deserialize(result_mapper, parsed_response)
1025
+ rescue Exception => e
1026
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1027
+ end
1028
+ end
1029
+
1030
+ result
1031
+ end
1032
+
1033
+ promise.execute
1034
+ end
1035
+
1036
+ #
1037
+ # Get all the resources for a resource group.
1038
+ #
1039
+ # @param resource_group_name [String] The resource group with the resources to
1040
+ # get.
1041
+ # @param filter [String] The filter to apply on the operation.
1042
+ # @param expand [String] The $expand query parameter
1043
+ # @param top [Integer] The number of results to return. If null is passed,
1044
+ # returns all resources.
1045
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1046
+ # will be added to the HTTP request.
1047
+ #
1048
+ # @return [ResourceListResult] which provide lazy access to pages of the
1049
+ # response.
1050
+ #
1051
+ def list_resources_as_lazy(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
1052
+ response = list_resources_async(resource_group_name, filter, expand, top, custom_headers).value!
1053
+ unless response.nil?
1054
+ page = response.body
1055
+ page.next_method = Proc.new do |next_page_link|
1056
+ list_resources_next_async(next_page_link, custom_headers)
1057
+ end
1058
+ page
1059
+ end
1060
+ end
1061
+
1062
+ #
1063
+ # Gets all the resource groups for a subscription.
1064
+ #
1065
+ # @param filter [String] The filter to apply on the operation.
1066
+ # @param top [Integer] The number of results to return. If null is passed,
1067
+ # returns all resource groups.
1068
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1069
+ # will be added to the HTTP request.
1070
+ #
1071
+ # @return [ResourceGroupListResult] which provide lazy access to pages of the
1072
+ # response.
1073
+ #
1074
+ def list_as_lazy(filter = nil, top = nil, custom_headers = nil)
1075
+ response = list_async(filter, top, custom_headers).value!
1076
+ unless response.nil?
1077
+ page = response.body
1078
+ page.next_method = Proc.new do |next_page_link|
1079
+ list_next_async(next_page_link, custom_headers)
1080
+ end
1081
+ page
1082
+ end
1083
+ end
1084
+
1085
+ end
1086
+ end