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
@@ -0,0 +1,1067 @@
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_02_01
7
+ #
8
+ # ResourceGroups
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 of the resources under a subscription.
26
+ #
27
+ # @param resource_group_name [String] Query parameters. If null is passed
28
+ # returns all resource groups.
29
+ # @param filter [String] The filter to apply on the operation.
30
+ # @param expand [String] The $expand query parameter
31
+ # @param top [Integer] Query parameters. If null is passed returns all resource
32
+ # groups.
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 of the resources under a subscription.
45
+ #
46
+ # @param resource_group_name [String] Query parameters. If null is passed
47
+ # returns all resource groups.
48
+ # @param filter [String] The filter to apply on the operation.
49
+ # @param expand [String] The $expand query parameter
50
+ # @param top [Integer] Query parameters. If null is passed returns all resource
51
+ # groups.
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 of the resources under a subscription.
63
+ #
64
+ # @param resource_group_name [String] Query parameters. If null is passed
65
+ # returns all resource groups.
66
+ # @param filter [String] The filter to apply on the operation.
67
+ # @param expand [String] The $expand query parameter
68
+ # @param top [Integer] Query parameters. If null is passed returns all resource
69
+ # groups.
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_02_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 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 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 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
+ # Create a resource group.
209
+ #
210
+ # @param resource_group_name [String] The name of the resource group to be
211
+ # created or updated.
212
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
213
+ # resource group service operation.
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
+ # Create a resource group.
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group to be
228
+ # created or updated.
229
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
230
+ # resource group service operation.
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
+ # Create a resource group.
242
+ #
243
+ # @param resource_group_name [String] The name of the resource group to be
244
+ # created or updated.
245
+ # @param parameters [ResourceGroup] Parameters supplied to the create or update
246
+ # resource group service operation.
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_02_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_02_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_02_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
+ # Delete resource group.
325
+ #
326
+ # @param resource_group_name [String] The name of the resource group to be
327
+ # deleted. The name is case insensitive.
328
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
329
+ # will be added to the HTTP request.
330
+ #
331
+ def delete(resource_group_name, custom_headers = nil)
332
+ response = delete_async(resource_group_name, custom_headers).value!
333
+ nil
334
+ end
335
+
336
+ #
337
+ # @param resource_group_name [String] The name of the resource group to be
338
+ # deleted. The name is case insensitive.
339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
340
+ # will be added to the HTTP request.
341
+ #
342
+ # @return [Concurrent::Promise] promise which provides async access to http
343
+ # response.
344
+ #
345
+ def delete_async(resource_group_name, custom_headers = nil)
346
+ # Send request
347
+ promise = begin_delete_async(resource_group_name, custom_headers)
348
+
349
+ promise = promise.then do |response|
350
+ # Defining deserialization method.
351
+ deserialize_method = lambda do |parsed_response|
352
+ end
353
+
354
+ # Waiting for response.
355
+ @client.get_long_running_operation_result(response, deserialize_method)
356
+ end
357
+
358
+ promise
359
+ end
360
+
361
+ #
362
+ # Get a resource group.
363
+ #
364
+ # @param resource_group_name [String] The name of the resource group to get.
365
+ # The name is case insensitive.
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [ResourceGroup] operation results.
370
+ #
371
+ def get(resource_group_name, custom_headers = nil)
372
+ response = get_async(resource_group_name, custom_headers).value!
373
+ response.body unless response.nil?
374
+ end
375
+
376
+ #
377
+ # Get a resource group.
378
+ #
379
+ # @param resource_group_name [String] The name of the resource group to get.
380
+ # The name is case insensitive.
381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
382
+ # will be added to the HTTP request.
383
+ #
384
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
385
+ #
386
+ def get_with_http_info(resource_group_name, custom_headers = nil)
387
+ get_async(resource_group_name, custom_headers).value!
388
+ end
389
+
390
+ #
391
+ # Get a resource group.
392
+ #
393
+ # @param resource_group_name [String] The name of the resource group to get.
394
+ # The name is case insensitive.
395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
396
+ # to the HTTP request.
397
+ #
398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
399
+ #
400
+ def get_async(resource_group_name, custom_headers = nil)
401
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
402
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
403
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
404
+
405
+
406
+ request_headers = {}
407
+
408
+ # Set Headers
409
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
410
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
411
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
412
+
413
+ request_url = @base_url || @client.base_url
414
+
415
+ options = {
416
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
417
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
418
+ query_params: {'api-version' => @client.api_version},
419
+ headers: request_headers.merge(custom_headers || {}),
420
+ base_url: request_url
421
+ }
422
+ promise = @client.make_request_async(:get, path_template, options)
423
+
424
+ promise = promise.then do |result|
425
+ http_response = result.response
426
+ status_code = http_response.status
427
+ response_content = http_response.body
428
+ unless status_code == 200
429
+ error_model = JSON.load(response_content)
430
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
431
+ end
432
+
433
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
434
+ # Deserialize Response
435
+ if status_code == 200
436
+ begin
437
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
438
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroup.mapper()
439
+ result.body = @client.deserialize(result_mapper, parsed_response)
440
+ rescue Exception => e
441
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
442
+ end
443
+ end
444
+
445
+ result
446
+ end
447
+
448
+ promise.execute
449
+ end
450
+
451
+ #
452
+ # Resource groups can be updated through a simple PATCH operation to a group
453
+ # address. The format of the request is the same as that for creating a
454
+ # resource groups, though if a field is unspecified current value will be
455
+ # carried over.
456
+ #
457
+ # @param resource_group_name [String] The name of the resource group to be
458
+ # created or updated. The name is case insensitive.
459
+ # @param parameters [ResourceGroup] Parameters supplied to the update state
460
+ # resource group service operation.
461
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
462
+ # will be added to the HTTP request.
463
+ #
464
+ # @return [ResourceGroup] operation results.
465
+ #
466
+ def patch(resource_group_name, parameters, custom_headers = nil)
467
+ response = patch_async(resource_group_name, parameters, custom_headers).value!
468
+ response.body unless response.nil?
469
+ end
470
+
471
+ #
472
+ # Resource groups can be updated through a simple PATCH operation to a group
473
+ # address. The format of the request is the same as that for creating a
474
+ # resource groups, though if a field is unspecified current value will be
475
+ # carried over.
476
+ #
477
+ # @param resource_group_name [String] The name of the resource group to be
478
+ # created or updated. The name is case insensitive.
479
+ # @param parameters [ResourceGroup] Parameters supplied to the update state
480
+ # resource group service operation.
481
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
482
+ # will be added to the HTTP request.
483
+ #
484
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
485
+ #
486
+ def patch_with_http_info(resource_group_name, parameters, custom_headers = nil)
487
+ patch_async(resource_group_name, parameters, custom_headers).value!
488
+ end
489
+
490
+ #
491
+ # Resource groups can be updated through a simple PATCH operation to a group
492
+ # address. The format of the request is the same as that for creating a
493
+ # resource groups, though if a field is unspecified current value will be
494
+ # carried over.
495
+ #
496
+ # @param resource_group_name [String] The name of the resource group to be
497
+ # created or updated. The name is case insensitive.
498
+ # @param parameters [ResourceGroup] Parameters supplied to the update state
499
+ # resource group service operation.
500
+ # @param [Hash{String => String}] A hash of custom headers that will be added
501
+ # to the HTTP request.
502
+ #
503
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
504
+ #
505
+ def patch_async(resource_group_name, parameters, custom_headers = nil)
506
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
507
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
508
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
509
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
510
+
511
+
512
+ request_headers = {}
513
+
514
+ # Set Headers
515
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
516
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
517
+
518
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
519
+
520
+ # Serialize Request
521
+ request_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroup.mapper()
522
+ request_content = @client.serialize(request_mapper, parameters)
523
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
524
+
525
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
526
+
527
+ request_url = @base_url || @client.base_url
528
+
529
+ options = {
530
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
531
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
532
+ query_params: {'api-version' => @client.api_version},
533
+ body: request_content,
534
+ headers: request_headers.merge(custom_headers || {}),
535
+ base_url: request_url
536
+ }
537
+ promise = @client.make_request_async(:patch, path_template, options)
538
+
539
+ promise = promise.then do |result|
540
+ http_response = result.response
541
+ status_code = http_response.status
542
+ response_content = http_response.body
543
+ unless status_code == 200
544
+ error_model = JSON.load(response_content)
545
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
546
+ end
547
+
548
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
549
+ # Deserialize Response
550
+ if status_code == 200
551
+ begin
552
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
553
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroup.mapper()
554
+ result.body = @client.deserialize(result_mapper, parsed_response)
555
+ rescue Exception => e
556
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
557
+ end
558
+ end
559
+
560
+ result
561
+ end
562
+
563
+ promise.execute
564
+ end
565
+
566
+ #
567
+ # Captures the specified resource group as a template.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group to be
570
+ # created or updated.
571
+ # @param parameters [ExportTemplateRequest] Parameters supplied to the export
572
+ # template resource group operation.
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [ResourceGroupExportResult] operation results.
577
+ #
578
+ def export_template(resource_group_name, parameters, custom_headers = nil)
579
+ response = export_template_async(resource_group_name, parameters, custom_headers).value!
580
+ response.body unless response.nil?
581
+ end
582
+
583
+ #
584
+ # Captures the specified resource group as a template.
585
+ #
586
+ # @param resource_group_name [String] The name of the resource group to be
587
+ # created or updated.
588
+ # @param parameters [ExportTemplateRequest] Parameters supplied to the export
589
+ # template resource group operation.
590
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
591
+ # will be added to the HTTP request.
592
+ #
593
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
594
+ #
595
+ def export_template_with_http_info(resource_group_name, parameters, custom_headers = nil)
596
+ export_template_async(resource_group_name, parameters, custom_headers).value!
597
+ end
598
+
599
+ #
600
+ # Captures the specified resource group as a template.
601
+ #
602
+ # @param resource_group_name [String] The name of the resource group to be
603
+ # created or updated.
604
+ # @param parameters [ExportTemplateRequest] Parameters supplied to the export
605
+ # template resource group operation.
606
+ # @param [Hash{String => String}] A hash of custom headers that will be added
607
+ # to the HTTP request.
608
+ #
609
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
610
+ #
611
+ def export_template_async(resource_group_name, parameters, custom_headers = nil)
612
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
613
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
614
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
615
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
616
+
617
+
618
+ request_headers = {}
619
+
620
+ # Set Headers
621
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
622
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
623
+
624
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
625
+
626
+ # Serialize Request
627
+ request_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ExportTemplateRequest.mapper()
628
+ request_content = @client.serialize(request_mapper, parameters)
629
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
630
+
631
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate'
632
+
633
+ request_url = @base_url || @client.base_url
634
+
635
+ options = {
636
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
637
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
638
+ query_params: {'api-version' => @client.api_version},
639
+ body: request_content,
640
+ headers: request_headers.merge(custom_headers || {}),
641
+ base_url: request_url
642
+ }
643
+ promise = @client.make_request_async(:post, path_template, options)
644
+
645
+ promise = promise.then do |result|
646
+ http_response = result.response
647
+ status_code = http_response.status
648
+ response_content = http_response.body
649
+ unless status_code == 200
650
+ error_model = JSON.load(response_content)
651
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
652
+ end
653
+
654
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
655
+ # Deserialize Response
656
+ if status_code == 200
657
+ begin
658
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
659
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroupExportResult.mapper()
660
+ result.body = @client.deserialize(result_mapper, parsed_response)
661
+ rescue Exception => e
662
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
663
+ end
664
+ end
665
+
666
+ result
667
+ end
668
+
669
+ promise.execute
670
+ end
671
+
672
+ #
673
+ # Gets a collection of resource groups.
674
+ #
675
+ # @param filter [String] The filter to apply on the operation.
676
+ # @param top [Integer] Query parameters. If null is passed returns all resource
677
+ # groups.
678
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
679
+ # will be added to the HTTP request.
680
+ #
681
+ # @return [Array<ResourceGroup>] operation results.
682
+ #
683
+ def list(filter = nil, top = nil, custom_headers = nil)
684
+ first_page = list_as_lazy(filter, top, custom_headers)
685
+ first_page.get_all_items
686
+ end
687
+
688
+ #
689
+ # Gets a collection of resource groups.
690
+ #
691
+ # @param filter [String] The filter to apply on the operation.
692
+ # @param top [Integer] Query parameters. If null is passed returns all resource
693
+ # groups.
694
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
695
+ # will be added to the HTTP request.
696
+ #
697
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
698
+ #
699
+ def list_with_http_info(filter = nil, top = nil, custom_headers = nil)
700
+ list_async(filter, top, custom_headers).value!
701
+ end
702
+
703
+ #
704
+ # Gets a collection of resource groups.
705
+ #
706
+ # @param filter [String] The filter to apply on the operation.
707
+ # @param top [Integer] Query parameters. If null is passed returns all resource
708
+ # groups.
709
+ # @param [Hash{String => String}] A hash of custom headers that will be added
710
+ # to the HTTP request.
711
+ #
712
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
713
+ #
714
+ def list_async(filter = nil, top = nil, custom_headers = nil)
715
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
716
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
717
+
718
+
719
+ request_headers = {}
720
+
721
+ # Set Headers
722
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
723
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
724
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups'
725
+
726
+ request_url = @base_url || @client.base_url
727
+
728
+ options = {
729
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
730
+ path_params: {'subscriptionId' => @client.subscription_id},
731
+ query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
732
+ headers: request_headers.merge(custom_headers || {}),
733
+ base_url: request_url
734
+ }
735
+ promise = @client.make_request_async(:get, path_template, options)
736
+
737
+ promise = promise.then do |result|
738
+ http_response = result.response
739
+ status_code = http_response.status
740
+ response_content = http_response.body
741
+ unless status_code == 200
742
+ error_model = JSON.load(response_content)
743
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
744
+ end
745
+
746
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
747
+ # Deserialize Response
748
+ if status_code == 200
749
+ begin
750
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
751
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroupListResult.mapper()
752
+ result.body = @client.deserialize(result_mapper, parsed_response)
753
+ rescue Exception => e
754
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
755
+ end
756
+ end
757
+
758
+ result
759
+ end
760
+
761
+ promise.execute
762
+ end
763
+
764
+ #
765
+ # Delete resource group.
766
+ #
767
+ # @param resource_group_name [String] The name of the resource group to be
768
+ # deleted. The name is case insensitive.
769
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
770
+ # will be added to the HTTP request.
771
+ #
772
+ #
773
+ def begin_delete(resource_group_name, custom_headers = nil)
774
+ response = begin_delete_async(resource_group_name, custom_headers).value!
775
+ nil
776
+ end
777
+
778
+ #
779
+ # Delete resource group.
780
+ #
781
+ # @param resource_group_name [String] The name of the resource group to be
782
+ # deleted. The name is case insensitive.
783
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
784
+ # will be added to the HTTP request.
785
+ #
786
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
787
+ #
788
+ def begin_delete_with_http_info(resource_group_name, custom_headers = nil)
789
+ begin_delete_async(resource_group_name, custom_headers).value!
790
+ end
791
+
792
+ #
793
+ # Delete resource group.
794
+ #
795
+ # @param resource_group_name [String] The name of the resource group to be
796
+ # deleted. The name is case insensitive.
797
+ # @param [Hash{String => String}] A hash of custom headers that will be added
798
+ # to the HTTP request.
799
+ #
800
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
801
+ #
802
+ def begin_delete_async(resource_group_name, custom_headers = nil)
803
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
804
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
805
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
806
+
807
+
808
+ request_headers = {}
809
+
810
+ # Set Headers
811
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
812
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
813
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}'
814
+
815
+ request_url = @base_url || @client.base_url
816
+
817
+ options = {
818
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
819
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
820
+ query_params: {'api-version' => @client.api_version},
821
+ headers: request_headers.merge(custom_headers || {}),
822
+ base_url: request_url
823
+ }
824
+ promise = @client.make_request_async(:delete, path_template, options)
825
+
826
+ promise = promise.then do |result|
827
+ http_response = result.response
828
+ status_code = http_response.status
829
+ response_content = http_response.body
830
+ unless status_code == 202 || status_code == 200
831
+ error_model = JSON.load(response_content)
832
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
833
+ end
834
+
835
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
836
+
837
+ result
838
+ end
839
+
840
+ promise.execute
841
+ end
842
+
843
+ #
844
+ # Get all of the resources under a subscription.
845
+ #
846
+ # @param next_page_link [String] The NextLink from the previous successful call
847
+ # to List operation.
848
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
849
+ # will be added to the HTTP request.
850
+ #
851
+ # @return [ResourceListResult] operation results.
852
+ #
853
+ def list_resources_next(next_page_link, custom_headers = nil)
854
+ response = list_resources_next_async(next_page_link, custom_headers).value!
855
+ response.body unless response.nil?
856
+ end
857
+
858
+ #
859
+ # Get all of the resources under a subscription.
860
+ #
861
+ # @param next_page_link [String] The NextLink from the previous successful call
862
+ # to List operation.
863
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
864
+ # will be added to the HTTP request.
865
+ #
866
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
867
+ #
868
+ def list_resources_next_with_http_info(next_page_link, custom_headers = nil)
869
+ list_resources_next_async(next_page_link, custom_headers).value!
870
+ end
871
+
872
+ #
873
+ # Get all of the resources under a subscription.
874
+ #
875
+ # @param next_page_link [String] The NextLink from the previous successful call
876
+ # to List operation.
877
+ # @param [Hash{String => String}] A hash of custom headers that will be added
878
+ # to the HTTP request.
879
+ #
880
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
881
+ #
882
+ def list_resources_next_async(next_page_link, custom_headers = nil)
883
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
884
+
885
+
886
+ request_headers = {}
887
+
888
+ # Set Headers
889
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
890
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
891
+ path_template = '{nextLink}'
892
+
893
+ request_url = @base_url || @client.base_url
894
+
895
+ options = {
896
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
897
+ skip_encoding_path_params: {'nextLink' => next_page_link},
898
+ headers: request_headers.merge(custom_headers || {}),
899
+ base_url: request_url
900
+ }
901
+ promise = @client.make_request_async(:get, path_template, options)
902
+
903
+ promise = promise.then do |result|
904
+ http_response = result.response
905
+ status_code = http_response.status
906
+ response_content = http_response.body
907
+ unless status_code == 200
908
+ error_model = JSON.load(response_content)
909
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
910
+ end
911
+
912
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
913
+ # Deserialize Response
914
+ if status_code == 200
915
+ begin
916
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
917
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceListResult.mapper()
918
+ result.body = @client.deserialize(result_mapper, parsed_response)
919
+ rescue Exception => e
920
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
921
+ end
922
+ end
923
+
924
+ result
925
+ end
926
+
927
+ promise.execute
928
+ end
929
+
930
+ #
931
+ # Gets a collection of resource groups.
932
+ #
933
+ # @param next_page_link [String] The NextLink from the previous successful call
934
+ # to List operation.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ # @return [ResourceGroupListResult] operation results.
939
+ #
940
+ def list_next(next_page_link, custom_headers = nil)
941
+ response = list_next_async(next_page_link, custom_headers).value!
942
+ response.body unless response.nil?
943
+ end
944
+
945
+ #
946
+ # Gets a collection of resource groups.
947
+ #
948
+ # @param next_page_link [String] The NextLink from the previous successful call
949
+ # to List operation.
950
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
951
+ # will be added to the HTTP request.
952
+ #
953
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
954
+ #
955
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
956
+ list_next_async(next_page_link, custom_headers).value!
957
+ end
958
+
959
+ #
960
+ # Gets a collection of resource groups.
961
+ #
962
+ # @param next_page_link [String] The NextLink from the previous successful call
963
+ # to List operation.
964
+ # @param [Hash{String => String}] A hash of custom headers that will be added
965
+ # to the HTTP request.
966
+ #
967
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
968
+ #
969
+ def list_next_async(next_page_link, custom_headers = nil)
970
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
971
+
972
+
973
+ request_headers = {}
974
+
975
+ # Set Headers
976
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
977
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
978
+ path_template = '{nextLink}'
979
+
980
+ request_url = @base_url || @client.base_url
981
+
982
+ options = {
983
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
984
+ skip_encoding_path_params: {'nextLink' => next_page_link},
985
+ headers: request_headers.merge(custom_headers || {}),
986
+ base_url: request_url
987
+ }
988
+ promise = @client.make_request_async(:get, path_template, options)
989
+
990
+ promise = promise.then do |result|
991
+ http_response = result.response
992
+ status_code = http_response.status
993
+ response_content = http_response.body
994
+ unless status_code == 200
995
+ error_model = JSON.load(response_content)
996
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
997
+ end
998
+
999
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1000
+ # Deserialize Response
1001
+ if status_code == 200
1002
+ begin
1003
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1004
+ result_mapper = Azure::Resources::Mgmt::V2016_02_01::Models::ResourceGroupListResult.mapper()
1005
+ result.body = @client.deserialize(result_mapper, parsed_response)
1006
+ rescue Exception => e
1007
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1008
+ end
1009
+ end
1010
+
1011
+ result
1012
+ end
1013
+
1014
+ promise.execute
1015
+ end
1016
+
1017
+ #
1018
+ # Get all of the resources under a subscription.
1019
+ #
1020
+ # @param resource_group_name [String] Query parameters. If null is passed
1021
+ # returns all resource groups.
1022
+ # @param filter [String] The filter to apply on the operation.
1023
+ # @param expand [String] The $expand query parameter
1024
+ # @param top [Integer] Query parameters. If null is passed returns all resource
1025
+ # groups.
1026
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1027
+ # will be added to the HTTP request.
1028
+ #
1029
+ # @return [ResourceListResult] which provide lazy access to pages of the
1030
+ # response.
1031
+ #
1032
+ def list_resources_as_lazy(resource_group_name, filter = nil, expand = nil, top = nil, custom_headers = nil)
1033
+ response = list_resources_async(resource_group_name, filter, expand, top, custom_headers).value!
1034
+ unless response.nil?
1035
+ page = response.body
1036
+ page.next_method = Proc.new do |next_page_link|
1037
+ list_resources_next_async(next_page_link, custom_headers)
1038
+ end
1039
+ page
1040
+ end
1041
+ end
1042
+
1043
+ #
1044
+ # Gets a collection of resource groups.
1045
+ #
1046
+ # @param filter [String] The filter to apply on the operation.
1047
+ # @param top [Integer] Query parameters. If null is passed returns all resource
1048
+ # groups.
1049
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1050
+ # will be added to the HTTP request.
1051
+ #
1052
+ # @return [ResourceGroupListResult] which provide lazy access to pages of the
1053
+ # response.
1054
+ #
1055
+ def list_as_lazy(filter = nil, top = nil, custom_headers = nil)
1056
+ response = list_async(filter, top, custom_headers).value!
1057
+ unless response.nil?
1058
+ page = response.body
1059
+ page.next_method = Proc.new do |next_page_link|
1060
+ list_next_async(next_page_link, custom_headers)
1061
+ end
1062
+ page
1063
+ end
1064
+ end
1065
+
1066
+ end
1067
+ end