azure_mgmt_devtestlabs 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +1 -1
  3. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +1 -1
  4. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/disk.rb +1 -1
  5. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +1 -1
  6. data/lib/2016-05-15/generated/azure_mgmt_devtestlabs/notification_channels.rb +16 -16
  7. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs.rb +241 -0
  8. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/arm_templates.rb +369 -0
  9. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/artifact_sources.rb +673 -0
  10. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/artifacts.rb +486 -0
  11. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/costs.rb +244 -0
  12. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/custom_images.rb +759 -0
  13. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +227 -0
  14. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/disks.rb +1090 -0
  15. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/environments.rb +793 -0
  16. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/formulas.rb +727 -0
  17. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/gallery_images.rb +259 -0
  18. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/global_schedules.rb +1131 -0
  19. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/labs.rb +1820 -0
  20. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +113 -0
  21. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +78 -0
  22. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +56 -0
  23. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template.rb +194 -0
  24. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +57 -0
  25. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_list.rb +98 -0
  26. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +57 -0
  27. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties_fragment.rb +57 -0
  28. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact.rb +182 -0
  29. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +70 -0
  30. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +71 -0
  31. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +123 -0
  32. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +123 -0
  33. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_list.rb +98 -0
  34. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +57 -0
  35. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +57 -0
  36. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +215 -0
  37. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +144 -0
  38. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/artifact_source_list.rb +98 -0
  39. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +47 -0
  40. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +69 -0
  41. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options_fragment.rb +69 -0
  42. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +46 -0
  43. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters_fragment.rb +46 -0
  44. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +80 -0
  45. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +80 -0
  46. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +68 -0
  47. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +68 -0
  48. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +141 -0
  49. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +141 -0
  50. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +97 -0
  51. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb +16 -0
  52. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/cost_type.rb +17 -0
  53. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image.rb +238 -0
  54. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_fragment.rb +167 -0
  55. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_list.rb +98 -0
  56. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +17 -0
  57. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +69 -0
  58. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom_fragment.rb +69 -0
  59. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_plan.rb +70 -0
  60. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_plan_fragment.rb +70 -0
  61. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +70 -0
  62. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm_fragment.rb +70 -0
  63. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +73 -0
  64. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_properties_fragment.rb +73 -0
  65. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_storage_type_info.rb +58 -0
  66. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/data_disk_storage_type_info_fragment.rb +58 -0
  67. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/day_details.rb +46 -0
  68. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/day_details_fragment.rb +46 -0
  69. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +47 -0
  70. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +47 -0
  71. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk.rb +204 -0
  72. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk_fragment.rb +133 -0
  73. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/disk_list.rb +98 -0
  74. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +160 -0
  75. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment_fragment.rb +76 -0
  76. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/dtl_environment_list.rb +98 -0
  77. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/enable_status.rb +16 -0
  78. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +67 -0
  79. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties_fragment.rb +67 -0
  80. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/environment_permission.rb +16 -0
  81. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +79 -0
  82. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +55 -0
  83. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +55 -0
  84. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/event.rb +48 -0
  85. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +48 -0
  86. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +60 -0
  87. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +57 -0
  88. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +57 -0
  89. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb +16 -0
  90. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula.rb +182 -0
  91. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_fragment.rb +111 -0
  92. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_list.rb +98 -0
  93. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +47 -0
  94. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm_fragment.rb +47 -0
  95. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +178 -0
  96. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_list.rb +98 -0
  97. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +90 -0
  98. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +90 -0
  99. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +90 -0
  100. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +46 -0
  101. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +46 -0
  102. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb +17 -0
  103. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/hour_details.rb +46 -0
  104. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +46 -0
  105. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/http_status_code.rb +56 -0
  106. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +79 -0
  107. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/import_lab_virtual_machine_request.rb +59 -0
  108. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +73 -0
  109. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +73 -0
  110. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab.rb +363 -0
  111. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_announcement_properties.rb +117 -0
  112. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_announcement_properties_fragment.rb +93 -0
  113. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +224 -0
  114. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost_details_properties.rb +69 -0
  115. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +46 -0
  116. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +181 -0
  117. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_list.rb +98 -0
  118. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_resource_cost_properties.rb +136 -0
  119. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_support_properties.rb +59 -0
  120. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_support_properties_fragment.rb +59 -0
  121. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +46 -0
  122. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_vhd_list.rb +98 -0
  123. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +526 -0
  124. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +478 -0
  125. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter_fragment.rb +480 -0
  126. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +441 -0
  127. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_list.rb +98 -0
  128. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +49 -0
  129. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_info_fragment.rb +49 -0
  130. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +17 -0
  131. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +139 -0
  132. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +139 -0
  133. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +189 -0
  134. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb +16 -0
  135. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_fragment.rb +118 -0
  136. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_channel_list.rb +98 -0
  137. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +96 -0
  138. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +96 -0
  139. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +58 -0
  140. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_error.rb +57 -0
  141. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_metadata.rb +59 -0
  142. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_metadata_display.rb +80 -0
  143. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/operation_result.rb +82 -0
  144. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +57 -0
  145. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +57 -0
  146. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +46 -0
  147. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy.rb +197 -0
  148. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +16 -0
  149. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +24 -0
  150. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +126 -0
  151. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_list.rb +98 -0
  152. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +67 -0
  153. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_status.rb +16 -0
  154. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +57 -0
  155. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/port.rb +58 -0
  156. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +58 -0
  157. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb +16 -0
  158. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/provider_operation_result.rb +101 -0
  159. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/rdp_connection.rb +46 -0
  160. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb +16 -0
  161. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/resize_lab_virtual_machine_properties.rb +46 -0
  162. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/resource.rb +110 -0
  163. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +59 -0
  164. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule.rb +219 -0
  165. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_creation_parameter.rb +173 -0
  166. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_creation_parameter_fragment.rb +173 -0
  167. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +148 -0
  168. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/schedule_list.rb +98 -0
  169. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret.rb +121 -0
  170. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret_fragment.rb +62 -0
  171. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/secret_list.rb +98 -0
  172. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric.rb +147 -0
  173. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric_fragment.rb +74 -0
  174. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_fabric_list.rb +98 -0
  175. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_runner.rb +98 -0
  176. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/service_runner_list.rb +98 -0
  177. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +56 -0
  178. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +57 -0
  179. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +180 -0
  180. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +16 -0
  181. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/storage_type.rb +16 -0
  182. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet.rb +70 -0
  183. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +70 -0
  184. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +107 -0
  185. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +107 -0
  186. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +56 -0
  187. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +57 -0
  188. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +112 -0
  189. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb +16 -0
  190. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb +16 -0
  191. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/update_resource.rb +54 -0
  192. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +17 -0
  193. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user.rb +146 -0
  194. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +75 -0
  195. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_identity.rb +96 -0
  196. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +96 -0
  197. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_list.rb +98 -0
  198. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +57 -0
  199. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +57 -0
  200. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb +16 -0
  201. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +207 -0
  202. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +116 -0
  203. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/virtual_network_list.rb +98 -0
  204. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/week_details.rb +66 -0
  205. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +66 -0
  206. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +48 -0
  207. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_info_fragment.rb +48 -0
  208. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +17 -0
  209. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/module_definition.rb +9 -0
  210. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/notification_channels.rb +769 -0
  211. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/operations.rb +117 -0
  212. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/policies.rb +690 -0
  213. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/policy_sets.rb +135 -0
  214. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/provider_operations.rb +215 -0
  215. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/schedules.rb +1000 -0
  216. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/secrets.rb +742 -0
  217. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_fabric_schedules.rb +848 -0
  218. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_fabrics.rb +1147 -0
  219. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/service_runners.rb +552 -0
  220. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/users.rb +759 -0
  221. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_machine_schedules.rb +821 -0
  222. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_machines.rb +2431 -0
  223. data/lib/2018-09-15/generated/azure_mgmt_devtestlabs/virtual_networks.rb +760 -0
  224. data/lib/azure_mgmt_devtestlabs.rb +1 -0
  225. data/lib/profiles/latest/modules/devtestlabs_profile_module.rb +566 -430
  226. data/lib/version.rb +1 -1
  227. metadata +219 -2
@@ -0,0 +1,227 @@
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::DevTestLabs::Mgmt::V2018_09_15
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class DevTestLabsClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Client API version.
21
+ attr_reader :api_version
22
+
23
+ # @return [String] The subscription ID.
24
+ attr_accessor :subscription_id
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [ProviderOperations] provider_operations
39
+ attr_reader :provider_operations
40
+
41
+ # @return [Labs] labs
42
+ attr_reader :labs
43
+
44
+ # @return [Operations] operations
45
+ attr_reader :operations
46
+
47
+ # @return [GlobalSchedules] global_schedules
48
+ attr_reader :global_schedules
49
+
50
+ # @return [ArtifactSources] artifact_sources
51
+ attr_reader :artifact_sources
52
+
53
+ # @return [ArmTemplates] arm_templates
54
+ attr_reader :arm_templates
55
+
56
+ # @return [Artifacts] artifacts
57
+ attr_reader :artifacts
58
+
59
+ # @return [Costs] costs
60
+ attr_reader :costs
61
+
62
+ # @return [CustomImages] custom_images
63
+ attr_reader :custom_images
64
+
65
+ # @return [Formulas] formulas
66
+ attr_reader :formulas
67
+
68
+ # @return [GalleryImages] gallery_images
69
+ attr_reader :gallery_images
70
+
71
+ # @return [NotificationChannels] notification_channels
72
+ attr_reader :notification_channels
73
+
74
+ # @return [PolicySets] policy_sets
75
+ attr_reader :policy_sets
76
+
77
+ # @return [Policies] policies
78
+ attr_reader :policies
79
+
80
+ # @return [Schedules] schedules
81
+ attr_reader :schedules
82
+
83
+ # @return [ServiceRunners] service_runners
84
+ attr_reader :service_runners
85
+
86
+ # @return [Users] users
87
+ attr_reader :users
88
+
89
+ # @return [Disks] disks
90
+ attr_reader :disks
91
+
92
+ # @return [Environments] environments
93
+ attr_reader :environments
94
+
95
+ # @return [Secrets] secrets
96
+ attr_reader :secrets
97
+
98
+ # @return [ServiceFabrics] service_fabrics
99
+ attr_reader :service_fabrics
100
+
101
+ # @return [ServiceFabricSchedules] service_fabric_schedules
102
+ attr_reader :service_fabric_schedules
103
+
104
+ # @return [VirtualMachines] virtual_machines
105
+ attr_reader :virtual_machines
106
+
107
+ # @return [VirtualMachineSchedules] virtual_machine_schedules
108
+ attr_reader :virtual_machine_schedules
109
+
110
+ # @return [VirtualNetworks] virtual_networks
111
+ attr_reader :virtual_networks
112
+
113
+ #
114
+ # Creates initializes a new instance of the DevTestLabsClient class.
115
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
116
+ # @param base_url [String] the base URI of the service.
117
+ # @param options [Array] filters to be applied to the HTTP requests.
118
+ #
119
+ def initialize(credentials = nil, base_url = nil, options = nil)
120
+ super(credentials, options)
121
+ @base_url = base_url || 'https://management.azure.com'
122
+
123
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
124
+ @credentials = credentials
125
+
126
+ @provider_operations = ProviderOperations.new(self)
127
+ @labs = Labs.new(self)
128
+ @operations = Operations.new(self)
129
+ @global_schedules = GlobalSchedules.new(self)
130
+ @artifact_sources = ArtifactSources.new(self)
131
+ @arm_templates = ArmTemplates.new(self)
132
+ @artifacts = Artifacts.new(self)
133
+ @costs = Costs.new(self)
134
+ @custom_images = CustomImages.new(self)
135
+ @formulas = Formulas.new(self)
136
+ @gallery_images = GalleryImages.new(self)
137
+ @notification_channels = NotificationChannels.new(self)
138
+ @policy_sets = PolicySets.new(self)
139
+ @policies = Policies.new(self)
140
+ @schedules = Schedules.new(self)
141
+ @service_runners = ServiceRunners.new(self)
142
+ @users = Users.new(self)
143
+ @disks = Disks.new(self)
144
+ @environments = Environments.new(self)
145
+ @secrets = Secrets.new(self)
146
+ @service_fabrics = ServiceFabrics.new(self)
147
+ @service_fabric_schedules = ServiceFabricSchedules.new(self)
148
+ @virtual_machines = VirtualMachines.new(self)
149
+ @virtual_machine_schedules = VirtualMachineSchedules.new(self)
150
+ @virtual_networks = VirtualNetworks.new(self)
151
+ @api_version = '2018-09-15'
152
+ @accept_language = 'en-US'
153
+ @long_running_operation_retry_timeout = 30
154
+ @generate_client_request_id = true
155
+ add_telemetry
156
+ end
157
+
158
+ #
159
+ # Makes a request and returns the body of the response.
160
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
161
+ # @param path [String] the path, relative to {base_url}.
162
+ # @param options [Hash{String=>String}] specifying any request options like :body.
163
+ # @return [Hash{String=>String}] containing the body of the response.
164
+ # Example:
165
+ #
166
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
167
+ # path = "/path"
168
+ # options = {
169
+ # body: request_content,
170
+ # query_params: {'api-version' => '2016-02-01'}
171
+ # }
172
+ # result = @client.make_request(:put, path, options)
173
+ #
174
+ def make_request(method, path, options = {})
175
+ result = make_request_with_http_info(method, path, options)
176
+ result.body unless result.nil?
177
+ end
178
+
179
+ #
180
+ # Makes a request and returns the operation response.
181
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
182
+ # @param path [String] the path, relative to {base_url}.
183
+ # @param options [Hash{String=>String}] specifying any request options like :body.
184
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
185
+ #
186
+ def make_request_with_http_info(method, path, options = {})
187
+ result = make_request_async(method, path, options).value!
188
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
189
+ result
190
+ end
191
+
192
+ #
193
+ # Makes a request asynchronously.
194
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
195
+ # @param path [String] the path, relative to {base_url}.
196
+ # @param options [Hash{String=>String}] specifying any request options like :body.
197
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
198
+ #
199
+ def make_request_async(method, path, options = {})
200
+ fail ArgumentError, 'method is nil' if method.nil?
201
+ fail ArgumentError, 'path is nil' if path.nil?
202
+
203
+ request_url = options[:base_url] || @base_url
204
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
205
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
206
+ end
207
+
208
+ request_headers = @request_headers
209
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
210
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
211
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
212
+
213
+ super(request_url, method, path, options)
214
+ end
215
+
216
+
217
+ private
218
+ #
219
+ # Adds telemetry information.
220
+ #
221
+ def add_telemetry
222
+ sdk_information = 'azure_mgmt_devtestlabs'
223
+ sdk_information = "#{sdk_information}/0.17.2"
224
+ add_user_agent_information(sdk_information)
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,1090 @@
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::DevTestLabs::Mgmt::V2018_09_15
7
+ #
8
+ # The DevTest Labs Client.
9
+ #
10
+ class Disks
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Disks class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [DevTestLabsClient] reference to the DevTestLabsClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List disks in a given user profile.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param lab_name [String] The name of the lab.
29
+ # @param user_name [String] The name of the user profile.
30
+ # @param expand [String] Specify the $expand query. Example:
31
+ # 'properties($select=diskType)'
32
+ # @param filter [String] The filter to apply to the operation. Example:
33
+ # '$filter=contains(name,'myName')
34
+ # @param top [Integer] The maximum number of resources to return from the
35
+ # operation. Example: '$top=10'
36
+ # @param orderby [String] The ordering expression for the results, using OData
37
+ # notation. Example: '$orderby=name desc'
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [Array<Disk>] operation results.
42
+ #
43
+ def list(resource_group_name, lab_name, user_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
44
+ first_page = list_as_lazy(resource_group_name, lab_name, user_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers)
45
+ first_page.get_all_items
46
+ end
47
+
48
+ #
49
+ # List disks in a given user profile.
50
+ #
51
+ # @param resource_group_name [String] The name of the resource group.
52
+ # @param lab_name [String] The name of the lab.
53
+ # @param user_name [String] The name of the user profile.
54
+ # @param expand [String] Specify the $expand query. Example:
55
+ # 'properties($select=diskType)'
56
+ # @param filter [String] The filter to apply to the operation. Example:
57
+ # '$filter=contains(name,'myName')
58
+ # @param top [Integer] The maximum number of resources to return from the
59
+ # operation. Example: '$top=10'
60
+ # @param orderby [String] The ordering expression for the results, using OData
61
+ # notation. Example: '$orderby=name desc'
62
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
63
+ # will be added to the HTTP request.
64
+ #
65
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
+ #
67
+ def list_with_http_info(resource_group_name, lab_name, user_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
68
+ list_async(resource_group_name, lab_name, user_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
69
+ end
70
+
71
+ #
72
+ # List disks in a given user profile.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group.
75
+ # @param lab_name [String] The name of the lab.
76
+ # @param user_name [String] The name of the user profile.
77
+ # @param expand [String] Specify the $expand query. Example:
78
+ # 'properties($select=diskType)'
79
+ # @param filter [String] The filter to apply to the operation. Example:
80
+ # '$filter=contains(name,'myName')
81
+ # @param top [Integer] The maximum number of resources to return from the
82
+ # operation. Example: '$top=10'
83
+ # @param orderby [String] The ordering expression for the results, using OData
84
+ # notation. Example: '$orderby=name desc'
85
+ # @param [Hash{String => String}] A hash of custom headers that will be added
86
+ # to the HTTP request.
87
+ #
88
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
89
+ #
90
+ def list_async(resource_group_name, lab_name, user_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
91
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
92
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
93
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
94
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
95
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
96
+
97
+
98
+ request_headers = {}
99
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
100
+
101
+ # Set Headers
102
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
103
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
104
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks'
105
+
106
+ request_url = @base_url || @client.base_url
107
+
108
+ options = {
109
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
110
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name},
111
+ query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
112
+ headers: request_headers.merge(custom_headers || {}),
113
+ base_url: request_url
114
+ }
115
+ promise = @client.make_request_async(:get, path_template, options)
116
+
117
+ promise = promise.then do |result|
118
+ http_response = result.response
119
+ status_code = http_response.status
120
+ response_content = http_response.body
121
+ unless status_code == 200
122
+ error_model = JSON.load(response_content)
123
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
124
+ end
125
+
126
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
127
+ # Deserialize Response
128
+ if status_code == 200
129
+ begin
130
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
131
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::DiskList.mapper()
132
+ result.body = @client.deserialize(result_mapper, parsed_response)
133
+ rescue Exception => e
134
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
135
+ end
136
+ end
137
+
138
+ result
139
+ end
140
+
141
+ promise.execute
142
+ end
143
+
144
+ #
145
+ # Get disk.
146
+ #
147
+ # @param resource_group_name [String] The name of the resource group.
148
+ # @param lab_name [String] The name of the lab.
149
+ # @param user_name [String] The name of the user profile.
150
+ # @param name [String] The name of the disk.
151
+ # @param expand [String] Specify the $expand query. Example:
152
+ # 'properties($select=diskType)'
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [Disk] operation results.
157
+ #
158
+ def get(resource_group_name, lab_name, user_name, name, expand:nil, custom_headers:nil)
159
+ response = get_async(resource_group_name, lab_name, user_name, name, expand:expand, custom_headers:custom_headers).value!
160
+ response.body unless response.nil?
161
+ end
162
+
163
+ #
164
+ # Get disk.
165
+ #
166
+ # @param resource_group_name [String] The name of the resource group.
167
+ # @param lab_name [String] The name of the lab.
168
+ # @param user_name [String] The name of the user profile.
169
+ # @param name [String] The name of the disk.
170
+ # @param expand [String] Specify the $expand query. Example:
171
+ # 'properties($select=diskType)'
172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
173
+ # will be added to the HTTP request.
174
+ #
175
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
176
+ #
177
+ def get_with_http_info(resource_group_name, lab_name, user_name, name, expand:nil, custom_headers:nil)
178
+ get_async(resource_group_name, lab_name, user_name, name, expand:expand, custom_headers:custom_headers).value!
179
+ end
180
+
181
+ #
182
+ # Get disk.
183
+ #
184
+ # @param resource_group_name [String] The name of the resource group.
185
+ # @param lab_name [String] The name of the lab.
186
+ # @param user_name [String] The name of the user profile.
187
+ # @param name [String] The name of the disk.
188
+ # @param expand [String] Specify the $expand query. Example:
189
+ # 'properties($select=diskType)'
190
+ # @param [Hash{String => String}] A hash of custom headers that will be added
191
+ # to the HTTP request.
192
+ #
193
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
194
+ #
195
+ def get_async(resource_group_name, lab_name, user_name, name, expand:nil, custom_headers:nil)
196
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
197
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
198
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
199
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
200
+ fail ArgumentError, 'name is nil' if name.nil?
201
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
202
+
203
+
204
+ request_headers = {}
205
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
206
+
207
+ # Set Headers
208
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
209
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
210
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'
211
+
212
+ request_url = @base_url || @client.base_url
213
+
214
+ options = {
215
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
216
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
217
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
218
+ headers: request_headers.merge(custom_headers || {}),
219
+ base_url: request_url
220
+ }
221
+ promise = @client.make_request_async(:get, path_template, options)
222
+
223
+ promise = promise.then do |result|
224
+ http_response = result.response
225
+ status_code = http_response.status
226
+ response_content = http_response.body
227
+ unless status_code == 200
228
+ error_model = JSON.load(response_content)
229
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
230
+ end
231
+
232
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
233
+ # Deserialize Response
234
+ if status_code == 200
235
+ begin
236
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
237
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
238
+ result.body = @client.deserialize(result_mapper, parsed_response)
239
+ rescue Exception => e
240
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
241
+ end
242
+ end
243
+
244
+ result
245
+ end
246
+
247
+ promise.execute
248
+ end
249
+
250
+ #
251
+ # Create or replace an existing disk. This operation can take a while to
252
+ # complete.
253
+ #
254
+ # @param resource_group_name [String] The name of the resource group.
255
+ # @param lab_name [String] The name of the lab.
256
+ # @param user_name [String] The name of the user profile.
257
+ # @param name [String] The name of the disk.
258
+ # @param disk [Disk] A Disk.
259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
+ # will be added to the HTTP request.
261
+ #
262
+ # @return [Disk] operation results.
263
+ #
264
+ def create_or_update(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
265
+ response = create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers).value!
266
+ response.body unless response.nil?
267
+ end
268
+
269
+ #
270
+ # @param resource_group_name [String] The name of the resource group.
271
+ # @param lab_name [String] The name of the lab.
272
+ # @param user_name [String] The name of the user profile.
273
+ # @param name [String] The name of the disk.
274
+ # @param disk [Disk] A Disk.
275
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
+ # will be added to the HTTP request.
277
+ #
278
+ # @return [Concurrent::Promise] promise which provides async access to http
279
+ # response.
280
+ #
281
+ def create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
282
+ # Send request
283
+ promise = begin_create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers)
284
+
285
+ promise = promise.then do |response|
286
+ # Defining deserialization method.
287
+ deserialize_method = lambda do |parsed_response|
288
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
289
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
290
+ end
291
+
292
+ # Waiting for response.
293
+ @client.get_long_running_operation_result(response, deserialize_method)
294
+ end
295
+
296
+ promise
297
+ end
298
+
299
+ #
300
+ # Delete disk. This operation can take a while to complete.
301
+ #
302
+ # @param resource_group_name [String] The name of the resource group.
303
+ # @param lab_name [String] The name of the lab.
304
+ # @param user_name [String] The name of the user profile.
305
+ # @param name [String] The name of the disk.
306
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
307
+ # will be added to the HTTP request.
308
+ #
309
+ def delete(resource_group_name, lab_name, user_name, name, custom_headers:nil)
310
+ response = delete_async(resource_group_name, lab_name, user_name, name, custom_headers:custom_headers).value!
311
+ nil
312
+ end
313
+
314
+ #
315
+ # @param resource_group_name [String] The name of the resource group.
316
+ # @param lab_name [String] The name of the lab.
317
+ # @param user_name [String] The name of the user profile.
318
+ # @param name [String] The name of the disk.
319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
320
+ # will be added to the HTTP request.
321
+ #
322
+ # @return [Concurrent::Promise] promise which provides async access to http
323
+ # response.
324
+ #
325
+ def delete_async(resource_group_name, lab_name, user_name, name, custom_headers:nil)
326
+ # Send request
327
+ promise = begin_delete_async(resource_group_name, lab_name, user_name, name, custom_headers:custom_headers)
328
+
329
+ promise = promise.then do |response|
330
+ # Defining deserialization method.
331
+ deserialize_method = lambda do |parsed_response|
332
+ end
333
+
334
+ # Waiting for response.
335
+ @client.get_long_running_operation_result(response, deserialize_method)
336
+ end
337
+
338
+ promise
339
+ end
340
+
341
+ #
342
+ # Modify properties of disks.
343
+ #
344
+ # @param resource_group_name [String] The name of the resource group.
345
+ # @param lab_name [String] The name of the lab.
346
+ # @param user_name [String] The name of the user profile.
347
+ # @param name [String] The name of the disk.
348
+ # @param disk [DiskFragment] A Disk.
349
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
350
+ # will be added to the HTTP request.
351
+ #
352
+ # @return [Disk] operation results.
353
+ #
354
+ def update(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
355
+ response = update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers).value!
356
+ response.body unless response.nil?
357
+ end
358
+
359
+ #
360
+ # Modify properties of disks.
361
+ #
362
+ # @param resource_group_name [String] The name of the resource group.
363
+ # @param lab_name [String] The name of the lab.
364
+ # @param user_name [String] The name of the user profile.
365
+ # @param name [String] The name of the disk.
366
+ # @param disk [DiskFragment] A Disk.
367
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
368
+ # will be added to the HTTP request.
369
+ #
370
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
371
+ #
372
+ def update_with_http_info(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
373
+ update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers).value!
374
+ end
375
+
376
+ #
377
+ # Modify properties of disks.
378
+ #
379
+ # @param resource_group_name [String] The name of the resource group.
380
+ # @param lab_name [String] The name of the lab.
381
+ # @param user_name [String] The name of the user profile.
382
+ # @param name [String] The name of the disk.
383
+ # @param disk [DiskFragment] A Disk.
384
+ # @param [Hash{String => String}] A hash of custom headers that will be added
385
+ # to the HTTP request.
386
+ #
387
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
388
+ #
389
+ def update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
390
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
391
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
392
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
393
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
394
+ fail ArgumentError, 'name is nil' if name.nil?
395
+ fail ArgumentError, 'disk is nil' if disk.nil?
396
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
397
+
398
+
399
+ request_headers = {}
400
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
401
+
402
+ # Set Headers
403
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
404
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
405
+
406
+ # Serialize Request
407
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::DiskFragment.mapper()
408
+ request_content = @client.serialize(request_mapper, disk)
409
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
410
+
411
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'
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: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
418
+ query_params: {'api-version' => @client.api_version},
419
+ body: request_content,
420
+ headers: request_headers.merge(custom_headers || {}),
421
+ base_url: request_url
422
+ }
423
+ promise = @client.make_request_async(:patch, path_template, options)
424
+
425
+ promise = promise.then do |result|
426
+ http_response = result.response
427
+ status_code = http_response.status
428
+ response_content = http_response.body
429
+ unless status_code == 200
430
+ error_model = JSON.load(response_content)
431
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
432
+ end
433
+
434
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
435
+ # Deserialize Response
436
+ if status_code == 200
437
+ begin
438
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
439
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
440
+ result.body = @client.deserialize(result_mapper, parsed_response)
441
+ rescue Exception => e
442
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
443
+ end
444
+ end
445
+
446
+ result
447
+ end
448
+
449
+ promise.execute
450
+ end
451
+
452
+ #
453
+ # Attach and create the lease of the disk to the virtual machine. This
454
+ # operation can take a while to complete.
455
+ #
456
+ # @param resource_group_name [String] The name of the resource group.
457
+ # @param lab_name [String] The name of the lab.
458
+ # @param user_name [String] The name of the user profile.
459
+ # @param name [String] The name of the disk.
460
+ # @param attach_disk_properties [AttachDiskProperties] Properties of the disk
461
+ # to attach.
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ def attach(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:nil)
466
+ response = attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:custom_headers).value!
467
+ nil
468
+ end
469
+
470
+ #
471
+ # @param resource_group_name [String] The name of the resource group.
472
+ # @param lab_name [String] The name of the lab.
473
+ # @param user_name [String] The name of the user profile.
474
+ # @param name [String] The name of the disk.
475
+ # @param attach_disk_properties [AttachDiskProperties] Properties of the disk
476
+ # to attach.
477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
478
+ # will be added to the HTTP request.
479
+ #
480
+ # @return [Concurrent::Promise] promise which provides async access to http
481
+ # response.
482
+ #
483
+ def attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:nil)
484
+ # Send request
485
+ promise = begin_attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:custom_headers)
486
+
487
+ promise = promise.then do |response|
488
+ # Defining deserialization method.
489
+ deserialize_method = lambda do |parsed_response|
490
+ end
491
+
492
+ # Waiting for response.
493
+ @client.get_long_running_operation_result(response, deserialize_method)
494
+ end
495
+
496
+ promise
497
+ end
498
+
499
+ #
500
+ # Detach and break the lease of the disk attached to the virtual machine. This
501
+ # operation can take a while to complete.
502
+ #
503
+ # @param resource_group_name [String] The name of the resource group.
504
+ # @param lab_name [String] The name of the lab.
505
+ # @param user_name [String] The name of the user profile.
506
+ # @param name [String] The name of the disk.
507
+ # @param detach_disk_properties [DetachDiskProperties] Properties of the disk
508
+ # to detach.
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ def detach(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:nil)
513
+ response = detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:custom_headers).value!
514
+ nil
515
+ end
516
+
517
+ #
518
+ # @param resource_group_name [String] The name of the resource group.
519
+ # @param lab_name [String] The name of the lab.
520
+ # @param user_name [String] The name of the user profile.
521
+ # @param name [String] The name of the disk.
522
+ # @param detach_disk_properties [DetachDiskProperties] Properties of the disk
523
+ # to detach.
524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
525
+ # will be added to the HTTP request.
526
+ #
527
+ # @return [Concurrent::Promise] promise which provides async access to http
528
+ # response.
529
+ #
530
+ def detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:nil)
531
+ # Send request
532
+ promise = begin_detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:custom_headers)
533
+
534
+ promise = promise.then do |response|
535
+ # Defining deserialization method.
536
+ deserialize_method = lambda do |parsed_response|
537
+ end
538
+
539
+ # Waiting for response.
540
+ @client.get_long_running_operation_result(response, deserialize_method)
541
+ end
542
+
543
+ promise
544
+ end
545
+
546
+ #
547
+ # Create or replace an existing disk. This operation can take a while to
548
+ # complete.
549
+ #
550
+ # @param resource_group_name [String] The name of the resource group.
551
+ # @param lab_name [String] The name of the lab.
552
+ # @param user_name [String] The name of the user profile.
553
+ # @param name [String] The name of the disk.
554
+ # @param disk [Disk] A Disk.
555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
+ # will be added to the HTTP request.
557
+ #
558
+ # @return [Disk] operation results.
559
+ #
560
+ def begin_create_or_update(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
561
+ response = begin_create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers).value!
562
+ response.body unless response.nil?
563
+ end
564
+
565
+ #
566
+ # Create or replace an existing disk. This operation can take a while to
567
+ # complete.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group.
570
+ # @param lab_name [String] The name of the lab.
571
+ # @param user_name [String] The name of the user profile.
572
+ # @param name [String] The name of the disk.
573
+ # @param disk [Disk] A Disk.
574
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
575
+ # will be added to the HTTP request.
576
+ #
577
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
578
+ #
579
+ def begin_create_or_update_with_http_info(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
580
+ begin_create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:custom_headers).value!
581
+ end
582
+
583
+ #
584
+ # Create or replace an existing disk. This operation can take a while to
585
+ # complete.
586
+ #
587
+ # @param resource_group_name [String] The name of the resource group.
588
+ # @param lab_name [String] The name of the lab.
589
+ # @param user_name [String] The name of the user profile.
590
+ # @param name [String] The name of the disk.
591
+ # @param disk [Disk] A Disk.
592
+ # @param [Hash{String => String}] A hash of custom headers that will be added
593
+ # to the HTTP request.
594
+ #
595
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
596
+ #
597
+ def begin_create_or_update_async(resource_group_name, lab_name, user_name, name, disk, custom_headers:nil)
598
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
599
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
600
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
601
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
602
+ fail ArgumentError, 'name is nil' if name.nil?
603
+ fail ArgumentError, 'disk is nil' if disk.nil?
604
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
605
+
606
+
607
+ request_headers = {}
608
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
609
+
610
+ # Set Headers
611
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
612
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
613
+
614
+ # Serialize Request
615
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
616
+ request_content = @client.serialize(request_mapper, disk)
617
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
618
+
619
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'
620
+
621
+ request_url = @base_url || @client.base_url
622
+
623
+ options = {
624
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
625
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
626
+ query_params: {'api-version' => @client.api_version},
627
+ body: request_content,
628
+ headers: request_headers.merge(custom_headers || {}),
629
+ base_url: request_url
630
+ }
631
+ promise = @client.make_request_async(:put, path_template, options)
632
+
633
+ promise = promise.then do |result|
634
+ http_response = result.response
635
+ status_code = http_response.status
636
+ response_content = http_response.body
637
+ unless status_code == 200 || status_code == 201
638
+ error_model = JSON.load(response_content)
639
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
640
+ end
641
+
642
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
643
+ # Deserialize Response
644
+ if status_code == 200
645
+ begin
646
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
647
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
648
+ result.body = @client.deserialize(result_mapper, parsed_response)
649
+ rescue Exception => e
650
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
651
+ end
652
+ end
653
+ # Deserialize Response
654
+ if status_code == 201
655
+ begin
656
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
657
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::Disk.mapper()
658
+ result.body = @client.deserialize(result_mapper, parsed_response)
659
+ rescue Exception => e
660
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
661
+ end
662
+ end
663
+
664
+ result
665
+ end
666
+
667
+ promise.execute
668
+ end
669
+
670
+ #
671
+ # Delete disk. This operation can take a while to complete.
672
+ #
673
+ # @param resource_group_name [String] The name of the resource group.
674
+ # @param lab_name [String] The name of the lab.
675
+ # @param user_name [String] The name of the user profile.
676
+ # @param name [String] The name of the disk.
677
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
678
+ # will be added to the HTTP request.
679
+ #
680
+ #
681
+ def begin_delete(resource_group_name, lab_name, user_name, name, custom_headers:nil)
682
+ response = begin_delete_async(resource_group_name, lab_name, user_name, name, custom_headers:custom_headers).value!
683
+ nil
684
+ end
685
+
686
+ #
687
+ # Delete disk. This operation can take a while to complete.
688
+ #
689
+ # @param resource_group_name [String] The name of the resource group.
690
+ # @param lab_name [String] The name of the lab.
691
+ # @param user_name [String] The name of the user profile.
692
+ # @param name [String] The name of the disk.
693
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
694
+ # will be added to the HTTP request.
695
+ #
696
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
697
+ #
698
+ def begin_delete_with_http_info(resource_group_name, lab_name, user_name, name, custom_headers:nil)
699
+ begin_delete_async(resource_group_name, lab_name, user_name, name, custom_headers:custom_headers).value!
700
+ end
701
+
702
+ #
703
+ # Delete disk. This operation can take a while to complete.
704
+ #
705
+ # @param resource_group_name [String] The name of the resource group.
706
+ # @param lab_name [String] The name of the lab.
707
+ # @param user_name [String] The name of the user profile.
708
+ # @param name [String] The name of the disk.
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 begin_delete_async(resource_group_name, lab_name, user_name, name, custom_headers:nil)
715
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
716
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
717
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
718
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
719
+ fail ArgumentError, 'name is nil' if name.nil?
720
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
721
+
722
+
723
+ request_headers = {}
724
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
725
+
726
+ # Set Headers
727
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
728
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
729
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}'
730
+
731
+ request_url = @base_url || @client.base_url
732
+
733
+ options = {
734
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
735
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
736
+ query_params: {'api-version' => @client.api_version},
737
+ headers: request_headers.merge(custom_headers || {}),
738
+ base_url: request_url
739
+ }
740
+ promise = @client.make_request_async(:delete, path_template, options)
741
+
742
+ promise = promise.then do |result|
743
+ http_response = result.response
744
+ status_code = http_response.status
745
+ response_content = http_response.body
746
+ unless status_code == 200 || status_code == 202 || status_code == 204
747
+ error_model = JSON.load(response_content)
748
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
749
+ end
750
+
751
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
752
+
753
+ result
754
+ end
755
+
756
+ promise.execute
757
+ end
758
+
759
+ #
760
+ # Attach and create the lease of the disk to the virtual machine. This
761
+ # operation can take a while to complete.
762
+ #
763
+ # @param resource_group_name [String] The name of the resource group.
764
+ # @param lab_name [String] The name of the lab.
765
+ # @param user_name [String] The name of the user profile.
766
+ # @param name [String] The name of the disk.
767
+ # @param attach_disk_properties [AttachDiskProperties] Properties of the disk
768
+ # to attach.
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_attach(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:nil)
774
+ response = begin_attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:custom_headers).value!
775
+ nil
776
+ end
777
+
778
+ #
779
+ # Attach and create the lease of the disk to the virtual machine. This
780
+ # operation can take a while to complete.
781
+ #
782
+ # @param resource_group_name [String] The name of the resource group.
783
+ # @param lab_name [String] The name of the lab.
784
+ # @param user_name [String] The name of the user profile.
785
+ # @param name [String] The name of the disk.
786
+ # @param attach_disk_properties [AttachDiskProperties] Properties of the disk
787
+ # to attach.
788
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
789
+ # will be added to the HTTP request.
790
+ #
791
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
792
+ #
793
+ def begin_attach_with_http_info(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:nil)
794
+ begin_attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:custom_headers).value!
795
+ end
796
+
797
+ #
798
+ # Attach and create the lease of the disk to the virtual machine. This
799
+ # operation can take a while to complete.
800
+ #
801
+ # @param resource_group_name [String] The name of the resource group.
802
+ # @param lab_name [String] The name of the lab.
803
+ # @param user_name [String] The name of the user profile.
804
+ # @param name [String] The name of the disk.
805
+ # @param attach_disk_properties [AttachDiskProperties] Properties of the disk
806
+ # to attach.
807
+ # @param [Hash{String => String}] A hash of custom headers that will be added
808
+ # to the HTTP request.
809
+ #
810
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
811
+ #
812
+ def begin_attach_async(resource_group_name, lab_name, user_name, name, attach_disk_properties, custom_headers:nil)
813
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
814
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
815
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
816
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
817
+ fail ArgumentError, 'name is nil' if name.nil?
818
+ fail ArgumentError, 'attach_disk_properties is nil' if attach_disk_properties.nil?
819
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
820
+
821
+
822
+ request_headers = {}
823
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
824
+
825
+ # Set Headers
826
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
827
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
828
+
829
+ # Serialize Request
830
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::AttachDiskProperties.mapper()
831
+ request_content = @client.serialize(request_mapper, attach_disk_properties)
832
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
833
+
834
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/attach'
835
+
836
+ request_url = @base_url || @client.base_url
837
+
838
+ options = {
839
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
840
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
841
+ query_params: {'api-version' => @client.api_version},
842
+ body: request_content,
843
+ headers: request_headers.merge(custom_headers || {}),
844
+ base_url: request_url
845
+ }
846
+ promise = @client.make_request_async(:post, path_template, options)
847
+
848
+ promise = promise.then do |result|
849
+ http_response = result.response
850
+ status_code = http_response.status
851
+ response_content = http_response.body
852
+ unless status_code == 200 || status_code == 202
853
+ error_model = JSON.load(response_content)
854
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
855
+ end
856
+
857
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
858
+
859
+ result
860
+ end
861
+
862
+ promise.execute
863
+ end
864
+
865
+ #
866
+ # Detach and break the lease of the disk attached to the virtual machine. This
867
+ # operation can take a while to complete.
868
+ #
869
+ # @param resource_group_name [String] The name of the resource group.
870
+ # @param lab_name [String] The name of the lab.
871
+ # @param user_name [String] The name of the user profile.
872
+ # @param name [String] The name of the disk.
873
+ # @param detach_disk_properties [DetachDiskProperties] Properties of the disk
874
+ # to detach.
875
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
876
+ # will be added to the HTTP request.
877
+ #
878
+ #
879
+ def begin_detach(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:nil)
880
+ response = begin_detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:custom_headers).value!
881
+ nil
882
+ end
883
+
884
+ #
885
+ # Detach and break the lease of the disk attached to the virtual machine. This
886
+ # operation can take a while to complete.
887
+ #
888
+ # @param resource_group_name [String] The name of the resource group.
889
+ # @param lab_name [String] The name of the lab.
890
+ # @param user_name [String] The name of the user profile.
891
+ # @param name [String] The name of the disk.
892
+ # @param detach_disk_properties [DetachDiskProperties] Properties of the disk
893
+ # to detach.
894
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
895
+ # will be added to the HTTP request.
896
+ #
897
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
898
+ #
899
+ def begin_detach_with_http_info(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:nil)
900
+ begin_detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:custom_headers).value!
901
+ end
902
+
903
+ #
904
+ # Detach and break the lease of the disk attached to the virtual machine. This
905
+ # operation can take a while to complete.
906
+ #
907
+ # @param resource_group_name [String] The name of the resource group.
908
+ # @param lab_name [String] The name of the lab.
909
+ # @param user_name [String] The name of the user profile.
910
+ # @param name [String] The name of the disk.
911
+ # @param detach_disk_properties [DetachDiskProperties] Properties of the disk
912
+ # to detach.
913
+ # @param [Hash{String => String}] A hash of custom headers that will be added
914
+ # to the HTTP request.
915
+ #
916
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
917
+ #
918
+ def begin_detach_async(resource_group_name, lab_name, user_name, name, detach_disk_properties, custom_headers:nil)
919
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
920
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
921
+ fail ArgumentError, 'lab_name is nil' if lab_name.nil?
922
+ fail ArgumentError, 'user_name is nil' if user_name.nil?
923
+ fail ArgumentError, 'name is nil' if name.nil?
924
+ fail ArgumentError, 'detach_disk_properties is nil' if detach_disk_properties.nil?
925
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
926
+
927
+
928
+ request_headers = {}
929
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
930
+
931
+ # Set Headers
932
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
933
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
934
+
935
+ # Serialize Request
936
+ request_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::DetachDiskProperties.mapper()
937
+ request_content = @client.serialize(request_mapper, detach_disk_properties)
938
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
939
+
940
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}/detach'
941
+
942
+ request_url = @base_url || @client.base_url
943
+
944
+ options = {
945
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
946
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'userName' => user_name,'name' => name},
947
+ query_params: {'api-version' => @client.api_version},
948
+ body: request_content,
949
+ headers: request_headers.merge(custom_headers || {}),
950
+ base_url: request_url
951
+ }
952
+ promise = @client.make_request_async(:post, path_template, options)
953
+
954
+ promise = promise.then do |result|
955
+ http_response = result.response
956
+ status_code = http_response.status
957
+ response_content = http_response.body
958
+ unless status_code == 200 || status_code == 202
959
+ error_model = JSON.load(response_content)
960
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
961
+ end
962
+
963
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
964
+
965
+ result
966
+ end
967
+
968
+ promise.execute
969
+ end
970
+
971
+ #
972
+ # List disks in a given user profile.
973
+ #
974
+ # @param next_page_link [String] The NextLink from the previous successful call
975
+ # to List operation.
976
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
977
+ # will be added to the HTTP request.
978
+ #
979
+ # @return [DiskList] operation results.
980
+ #
981
+ def list_next(next_page_link, custom_headers:nil)
982
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
983
+ response.body unless response.nil?
984
+ end
985
+
986
+ #
987
+ # List disks in a given user profile.
988
+ #
989
+ # @param next_page_link [String] The NextLink from the previous successful call
990
+ # to List operation.
991
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
992
+ # will be added to the HTTP request.
993
+ #
994
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
995
+ #
996
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
997
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
998
+ end
999
+
1000
+ #
1001
+ # List disks in a given user profile.
1002
+ #
1003
+ # @param next_page_link [String] The NextLink from the previous successful call
1004
+ # to List operation.
1005
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1006
+ # to the HTTP request.
1007
+ #
1008
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1009
+ #
1010
+ def list_next_async(next_page_link, custom_headers:nil)
1011
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1012
+
1013
+
1014
+ request_headers = {}
1015
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1016
+
1017
+ # Set Headers
1018
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1019
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1020
+ path_template = '{nextLink}'
1021
+
1022
+ request_url = @base_url || @client.base_url
1023
+
1024
+ options = {
1025
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1026
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1027
+ headers: request_headers.merge(custom_headers || {}),
1028
+ base_url: request_url
1029
+ }
1030
+ promise = @client.make_request_async(:get, path_template, options)
1031
+
1032
+ promise = promise.then do |result|
1033
+ http_response = result.response
1034
+ status_code = http_response.status
1035
+ response_content = http_response.body
1036
+ unless status_code == 200
1037
+ error_model = JSON.load(response_content)
1038
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1039
+ end
1040
+
1041
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1042
+ # Deserialize Response
1043
+ if status_code == 200
1044
+ begin
1045
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1046
+ result_mapper = Azure::DevTestLabs::Mgmt::V2018_09_15::Models::DiskList.mapper()
1047
+ result.body = @client.deserialize(result_mapper, parsed_response)
1048
+ rescue Exception => e
1049
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1050
+ end
1051
+ end
1052
+
1053
+ result
1054
+ end
1055
+
1056
+ promise.execute
1057
+ end
1058
+
1059
+ #
1060
+ # List disks in a given user profile.
1061
+ #
1062
+ # @param resource_group_name [String] The name of the resource group.
1063
+ # @param lab_name [String] The name of the lab.
1064
+ # @param user_name [String] The name of the user profile.
1065
+ # @param expand [String] Specify the $expand query. Example:
1066
+ # 'properties($select=diskType)'
1067
+ # @param filter [String] The filter to apply to the operation. Example:
1068
+ # '$filter=contains(name,'myName')
1069
+ # @param top [Integer] The maximum number of resources to return from the
1070
+ # operation. Example: '$top=10'
1071
+ # @param orderby [String] The ordering expression for the results, using OData
1072
+ # notation. Example: '$orderby=name desc'
1073
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1074
+ # will be added to the HTTP request.
1075
+ #
1076
+ # @return [DiskList] which provide lazy access to pages of the response.
1077
+ #
1078
+ def list_as_lazy(resource_group_name, lab_name, user_name, expand:nil, filter:nil, top:nil, orderby:nil, custom_headers:nil)
1079
+ response = list_async(resource_group_name, lab_name, user_name, expand:expand, filter:filter, top:top, orderby:orderby, custom_headers:custom_headers).value!
1080
+ unless response.nil?
1081
+ page = response.body
1082
+ page.next_method = Proc.new do |next_page_link|
1083
+ list_next_async(next_page_link, custom_headers:custom_headers)
1084
+ end
1085
+ page
1086
+ end
1087
+ end
1088
+
1089
+ end
1090
+ end