azure_mgmt_hdinsight 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight.rb +106 -0
  4. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/applications.rb +601 -0
  5. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/clusters.rb +1292 -0
  6. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/configurations.rb +289 -0
  7. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/extension_operations.rb +653 -0
  8. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/hdinsight_management_client.rb +161 -0
  9. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/locations.rb +201 -0
  10. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application.rb +104 -0
  11. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_endpoint.rb +68 -0
  12. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_https_endpoint.rb +87 -0
  13. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_list_result.rb +102 -0
  14. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_properties.rb +210 -0
  15. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/async_operation_state.rb +17 -0
  16. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/capabilities_result.rb +148 -0
  17. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster.rb +121 -0
  18. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_parameters_extended.rb +89 -0
  19. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_properties.rb +132 -0
  20. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_definition.rb +88 -0
  21. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_disk_encryption_parameters.rb +70 -0
  22. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_get_properties.rb +209 -0
  23. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity.rb +101 -0
  24. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity_user_assigned_identities_value.rb +61 -0
  25. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_persisted_script_actions_result.rb +68 -0
  26. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_result.rb +99 -0
  27. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_runtime_script_action_detail_result.rb +70 -0
  28. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_request.rb +57 -0
  29. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_response.rb +59 -0
  30. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_patch_parameters.rb +54 -0
  31. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_resize_parameters.rb +46 -0
  32. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/compute_profile.rb +55 -0
  33. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/connectivity_endpoint.rb +79 -0
  34. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/data_disks_groups.rb +71 -0
  35. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/directory_type.rb +15 -0
  36. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/disk_encryption_properties.rb +95 -0
  37. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/error_response.rb +57 -0
  38. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/errors.rb +57 -0
  39. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/execute_script_action_parameters.rb +67 -0
  40. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/extension.rb +57 -0
  41. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hardware_profile.rb +46 -0
  42. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hdinsight_cluster_provisioning_state.rb +19 -0
  43. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/json_web_key_encryption_algorithm.rb +17 -0
  44. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/linux_operating_system_profile.rb +69 -0
  45. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/localized_name.rb +57 -0
  46. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation.rb +58 -0
  47. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_display.rb +69 -0
  48. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_list_result.rb +101 -0
  49. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_resource.rb +60 -0
  50. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/os_profile.rb +47 -0
  51. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ostype.rb +16 -0
  52. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/proxy_resource.rb +63 -0
  53. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_capability.rb +56 -0
  54. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_info.rb +46 -0
  55. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regional_quota_capability.rb +68 -0
  56. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regions_capability.rb +54 -0
  57. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource.rb +80 -0
  58. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource_identity_type.rb +18 -0
  59. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/role.rb +144 -0
  60. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action.rb +100 -0
  61. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action_detail.rb +178 -0
  62. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action.rb +68 -0
  63. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_history_list.rb +101 -0
  64. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_summary.rb +60 -0
  65. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_persisted_get_response_spec.rb +99 -0
  66. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_actions_list.rb +100 -0
  67. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/security_profile.rb +159 -0
  68. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_profile.rb +55 -0
  69. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_public_key.rb +46 -0
  70. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_account.rb +93 -0
  71. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_profile.rb +56 -0
  72. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tier.rb +16 -0
  73. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tracked_resource.rb +92 -0
  74. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usage.rb +81 -0
  75. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usages_list_result.rb +55 -0
  76. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/version_spec.rb +87 -0
  77. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/versions_capability.rb +55 -0
  78. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/virtual_network_profile.rb +57 -0
  79. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_size_compatibility_filter.rb +141 -0
  80. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_sizes_capability.rb +54 -0
  81. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/module_definition.rb +9 -0
  82. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/operations.rb +215 -0
  83. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb +408 -0
  84. data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_execution_history.rb +312 -0
  85. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight.rb +98 -0
  86. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/applications.rb +601 -0
  87. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb +1292 -0
  88. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/configurations.rb +289 -0
  89. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/extensions.rb +735 -0
  90. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/hdinsight_management_client.rb +161 -0
  91. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/locations.rb +113 -0
  92. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application.rb +104 -0
  93. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_get_endpoint.rb +68 -0
  94. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_get_https_endpoint.rb +87 -0
  95. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_list_result.rb +102 -0
  96. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_properties.rb +210 -0
  97. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/async_operation_state.rb +17 -0
  98. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster.rb +121 -0
  99. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_parameters_extended.rb +89 -0
  100. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_properties.rb +132 -0
  101. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_definition.rb +88 -0
  102. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_disk_encryption_parameters.rb +70 -0
  103. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_get_properties.rb +209 -0
  104. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity.rb +101 -0
  105. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity_user_assigned_identities_value.rb +61 -0
  106. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_persisted_script_actions_result.rb +68 -0
  107. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_result.rb +99 -0
  108. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_runtime_script_action_detail_result.rb +70 -0
  109. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_request.rb +57 -0
  110. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_response.rb +59 -0
  111. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_patch_parameters.rb +54 -0
  112. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_resize_parameters.rb +46 -0
  113. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/compute_profile.rb +55 -0
  114. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/connectivity_endpoint.rb +79 -0
  115. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/data_disks_groups.rb +71 -0
  116. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/directory_type.rb +15 -0
  117. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/disk_encryption_properties.rb +95 -0
  118. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/error_response.rb +57 -0
  119. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/errors.rb +57 -0
  120. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/execute_script_action_parameters.rb +67 -0
  121. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/extension.rb +57 -0
  122. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/hardware_profile.rb +46 -0
  123. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/hdinsight_cluster_provisioning_state.rb +19 -0
  124. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/json_web_key_encryption_algorithm.rb +17 -0
  125. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/linux_operating_system_profile.rb +69 -0
  126. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/localized_name.rb +57 -0
  127. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation.rb +58 -0
  128. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_display.rb +69 -0
  129. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_list_result.rb +101 -0
  130. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_resource.rb +60 -0
  131. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/os_profile.rb +47 -0
  132. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ostype.rb +16 -0
  133. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/proxy_resource.rb +63 -0
  134. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/quota_info.rb +46 -0
  135. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/resource.rb +80 -0
  136. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/resource_identity_type.rb +18 -0
  137. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/role.rb +144 -0
  138. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action.rb +100 -0
  139. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action_detail.rb +178 -0
  140. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action.rb +68 -0
  141. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_history_list.rb +101 -0
  142. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_summary.rb +60 -0
  143. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_persisted_get_response_spec.rb +99 -0
  144. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_actions_list.rb +100 -0
  145. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/security_profile.rb +159 -0
  146. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ssh_profile.rb +55 -0
  147. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ssh_public_key.rb +46 -0
  148. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/storage_account.rb +93 -0
  149. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/storage_profile.rb +56 -0
  150. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/tier.rb +16 -0
  151. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/tracked_resource.rb +92 -0
  152. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/usage.rb +81 -0
  153. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/usages_list_result.rb +55 -0
  154. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/virtual_network_profile.rb +57 -0
  155. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/module_definition.rb +9 -0
  156. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/operations.rb +215 -0
  157. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb +408 -0
  158. data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/script_execution_history.rb +312 -0
  159. data/lib/azure_mgmt_hdinsight.rb +7 -0
  160. data/lib/module_definition.rb +8 -0
  161. data/lib/profiles/latest/hdinsight_latest_profile_client.rb +40 -0
  162. data/lib/profiles/latest/hdinsight_module_definition.rb +8 -0
  163. data/lib/profiles/latest/modules/hdinsight_profile_module.rb +327 -0
  164. data/lib/version.rb +7 -0
  165. metadata +282 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 49aacbf181dc175a5484591de3853b5dd4a9992d6fe5a6cc9580bde3e0f6339c
4
+ data.tar.gz: 21c75cd33d6d5f1ecf89cc6b113bfc66f37d670e9f8e66d74e60c98a244b243d
5
+ SHA512:
6
+ metadata.gz: 244794da44c24222c56ccd0b29ab28b55b3c6647593daca956286be5b61ffcda81f7dc49112691de7599e36b9701d05ea1d40c84bc79b9f11bc7a20ce997a6de
7
+ data.tar.gz: 3dbfaff63197f47160f6cc275cc26887041a8ebadac6eec3ea2429b6abd30f6a31518eddcea4afb5945b48c4771f285d78c950cde91a54fe6ecfb07f6ebd59ab
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,106 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2015-03-01-preview/generated/azure_mgmt_hdinsight/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Hdinsight::Mgmt::V2015_03_01_preview
23
+ autoload :Clusters, '2015-03-01-preview/generated/azure_mgmt_hdinsight/clusters.rb'
24
+ autoload :Applications, '2015-03-01-preview/generated/azure_mgmt_hdinsight/applications.rb'
25
+ autoload :Locations, '2015-03-01-preview/generated/azure_mgmt_hdinsight/locations.rb'
26
+ autoload :Configurations, '2015-03-01-preview/generated/azure_mgmt_hdinsight/configurations.rb'
27
+ autoload :ExtensionOperations, '2015-03-01-preview/generated/azure_mgmt_hdinsight/extension_operations.rb'
28
+ autoload :ScriptActions, '2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb'
29
+ autoload :ScriptExecutionHistory, '2015-03-01-preview/generated/azure_mgmt_hdinsight/script_execution_history.rb'
30
+ autoload :Operations, '2015-03-01-preview/generated/azure_mgmt_hdinsight/operations.rb'
31
+ autoload :HDInsightManagementClient, '2015-03-01-preview/generated/azure_mgmt_hdinsight/hdinsight_management_client.rb'
32
+
33
+ module Models
34
+ autoload :ClusterResizeParameters, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_resize_parameters.rb'
35
+ autoload :ClusterDefinition, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_definition.rb'
36
+ autoload :ClusterDiskEncryptionParameters, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_disk_encryption_parameters.rb'
37
+ autoload :HardwareProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hardware_profile.rb'
38
+ autoload :OperationResource, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_resource.rb'
39
+ autoload :DataDisksGroups, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/data_disks_groups.rb'
40
+ autoload :Resource, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource.rb'
41
+ autoload :SshProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_profile.rb'
42
+ autoload :SshPublicKey, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_public_key.rb'
43
+ autoload :OsProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/os_profile.rb'
44
+ autoload :LinuxOperatingSystemProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/linux_operating_system_profile.rb'
45
+ autoload :Role, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/role.rb'
46
+ autoload :OperationListResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_list_result.rb'
47
+ autoload :StorageAccount, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_account.rb'
48
+ autoload :Operation, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation.rb'
49
+ autoload :DiskEncryptionProperties, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/disk_encryption_properties.rb'
50
+ autoload :ErrorResponse, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/error_response.rb'
51
+ autoload :ClusterIdentityUserAssignedIdentitiesValue, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity_user_assigned_identities_value.rb'
52
+ autoload :ApplicationGetHttpsEndpoint, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_https_endpoint.rb'
53
+ autoload :ClusterCreateParametersExtended, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_parameters_extended.rb'
54
+ autoload :ApplicationGetEndpoint, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_endpoint.rb'
55
+ autoload :QuotaInfo, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_info.rb'
56
+ autoload :ApplicationProperties, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_properties.rb'
57
+ autoload :ConnectivityEndpoint, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/connectivity_endpoint.rb'
58
+ autoload :OperationDisplay, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_display.rb'
59
+ autoload :ApplicationListResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_list_result.rb'
60
+ autoload :ExecuteScriptActionParameters, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/execute_script_action_parameters.rb'
61
+ autoload :VersionSpec, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/version_spec.rb'
62
+ autoload :ScriptActionExecutionSummary, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_summary.rb'
63
+ autoload :VersionsCapability, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/versions_capability.rb'
64
+ autoload :ClusterListRuntimeScriptActionDetailResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_runtime_script_action_detail_result.rb'
65
+ autoload :RegionsCapability, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regions_capability.rb'
66
+ autoload :SecurityProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/security_profile.rb'
67
+ autoload :VmSizesCapability, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_sizes_capability.rb'
68
+ autoload :ScriptAction, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action.rb'
69
+ autoload :VmSizeCompatibilityFilter, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_size_compatibility_filter.rb'
70
+ autoload :StorageProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_profile.rb'
71
+ autoload :RegionalQuotaCapability, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regional_quota_capability.rb'
72
+ autoload :ClusterIdentity, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity.rb'
73
+ autoload :QuotaCapability, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_capability.rb'
74
+ autoload :Errors, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/errors.rb'
75
+ autoload :CapabilitiesResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/capabilities_result.rb'
76
+ autoload :RuntimeScriptAction, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action.rb'
77
+ autoload :LocalizedName, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/localized_name.rb'
78
+ autoload :ScriptActionsList, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_actions_list.rb'
79
+ autoload :ClusterListResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_result.rb'
80
+ autoload :Usage, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usage.rb'
81
+ autoload :ComputeProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/compute_profile.rb'
82
+ autoload :UsagesListResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usages_list_result.rb'
83
+ autoload :ClusterPatchParameters, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_patch_parameters.rb'
84
+ autoload :Extension, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/extension.rb'
85
+ autoload :ClusterListPersistedScriptActionsResult, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_persisted_script_actions_result.rb'
86
+ autoload :ClusterMonitoringResponse, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_response.rb'
87
+ autoload :ClusterCreateProperties, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_properties.rb'
88
+ autoload :ClusterMonitoringRequest, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_request.rb'
89
+ autoload :VirtualNetworkProfile, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/virtual_network_profile.rb'
90
+ autoload :ScriptActionExecutionHistoryList, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_history_list.rb'
91
+ autoload :ClusterGetProperties, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_get_properties.rb'
92
+ autoload :ScriptActionPersistedGetResponseSpec, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_persisted_get_response_spec.rb'
93
+ autoload :RuntimeScriptActionDetail, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action_detail.rb'
94
+ autoload :TrackedResource, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tracked_resource.rb'
95
+ autoload :Cluster, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster.rb'
96
+ autoload :ProxyResource, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/proxy_resource.rb'
97
+ autoload :Application, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application.rb'
98
+ autoload :DirectoryType, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/directory_type.rb'
99
+ autoload :OSType, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ostype.rb'
100
+ autoload :Tier, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tier.rb'
101
+ autoload :JsonWebKeyEncryptionAlgorithm, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/json_web_key_encryption_algorithm.rb'
102
+ autoload :ResourceIdentityType, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource_identity_type.rb'
103
+ autoload :HDInsightClusterProvisioningState, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hdinsight_cluster_provisioning_state.rb'
104
+ autoload :AsyncOperationState, '2015-03-01-preview/generated/azure_mgmt_hdinsight/models/async_operation_state.rb'
105
+ end
106
+ end
@@ -0,0 +1,601 @@
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::Hdinsight::Mgmt::V2015_03_01_preview
7
+ #
8
+ # HDInsight Management Client
9
+ #
10
+ class Applications
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Applications class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [HDInsightManagementClient] reference to the HDInsightManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the applications for the HDInsight cluster.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param cluster_name [String] The name of the cluster.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<Application>] operation results.
33
+ #
34
+ def list(resource_group_name, cluster_name, custom_headers:nil)
35
+ first_page = list_as_lazy(resource_group_name, cluster_name, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Lists all of the applications for the HDInsight cluster.
41
+ #
42
+ # @param resource_group_name [String] The name of the resource group.
43
+ # @param cluster_name [String] The name of the cluster.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
50
+ list_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Lists all of the applications for the HDInsight cluster.
55
+ #
56
+ # @param resource_group_name [String] The name of the resource group.
57
+ # @param cluster_name [String] The name of the cluster.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(resource_group_name, cluster_name, custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
66
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+
69
+
70
+ request_headers = {}
71
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
72
+
73
+ # Set Headers
74
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
75
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
76
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications'
77
+
78
+ request_url = @base_url || @client.base_url
79
+
80
+ options = {
81
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
83
+ query_params: {'api-version' => @client.api_version},
84
+ headers: request_headers.merge(custom_headers || {}),
85
+ base_url: request_url
86
+ }
87
+ promise = @client.make_request_async(:get, path_template, options)
88
+
89
+ promise = promise.then do |result|
90
+ http_response = result.response
91
+ status_code = http_response.status
92
+ response_content = http_response.body
93
+ unless status_code == 200
94
+ error_model = JSON.load(response_content)
95
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
96
+ end
97
+
98
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
99
+ # Deserialize Response
100
+ if status_code == 200
101
+ begin
102
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
103
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ApplicationListResult.mapper()
104
+ result.body = @client.deserialize(result_mapper, parsed_response)
105
+ rescue Exception => e
106
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
107
+ end
108
+ end
109
+
110
+ result
111
+ end
112
+
113
+ promise.execute
114
+ end
115
+
116
+ #
117
+ # Lists properties of the specified application.
118
+ #
119
+ # @param resource_group_name [String] The name of the resource group.
120
+ # @param cluster_name [String] The name of the cluster.
121
+ # @param application_name [String] The constant value for the application name.
122
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
123
+ # will be added to the HTTP request.
124
+ #
125
+ # @return [Application] operation results.
126
+ #
127
+ def get(resource_group_name, cluster_name, application_name, custom_headers:nil)
128
+ response = get_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers).value!
129
+ response.body unless response.nil?
130
+ end
131
+
132
+ #
133
+ # Lists properties of the specified application.
134
+ #
135
+ # @param resource_group_name [String] The name of the resource group.
136
+ # @param cluster_name [String] The name of the cluster.
137
+ # @param application_name [String] The constant value for the application name.
138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
139
+ # will be added to the HTTP request.
140
+ #
141
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
142
+ #
143
+ def get_with_http_info(resource_group_name, cluster_name, application_name, custom_headers:nil)
144
+ get_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers).value!
145
+ end
146
+
147
+ #
148
+ # Lists properties of the specified application.
149
+ #
150
+ # @param resource_group_name [String] The name of the resource group.
151
+ # @param cluster_name [String] The name of the cluster.
152
+ # @param application_name [String] The constant value for the application name.
153
+ # @param [Hash{String => String}] A hash of custom headers that will be added
154
+ # to the HTTP request.
155
+ #
156
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
157
+ #
158
+ def get_async(resource_group_name, cluster_name, application_name, custom_headers:nil)
159
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
160
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
161
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
162
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
163
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
164
+
165
+
166
+ request_headers = {}
167
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
168
+
169
+ # Set Headers
170
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
171
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
172
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'
173
+
174
+ request_url = @base_url || @client.base_url
175
+
176
+ options = {
177
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
178
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationName' => application_name},
179
+ query_params: {'api-version' => @client.api_version},
180
+ headers: request_headers.merge(custom_headers || {}),
181
+ base_url: request_url
182
+ }
183
+ promise = @client.make_request_async(:get, path_template, options)
184
+
185
+ promise = promise.then do |result|
186
+ http_response = result.response
187
+ status_code = http_response.status
188
+ response_content = http_response.body
189
+ unless status_code == 200
190
+ error_model = JSON.load(response_content)
191
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
192
+ end
193
+
194
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
195
+ # Deserialize Response
196
+ if status_code == 200
197
+ begin
198
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
199
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Application.mapper()
200
+ result.body = @client.deserialize(result_mapper, parsed_response)
201
+ rescue Exception => e
202
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
203
+ end
204
+ end
205
+
206
+ result
207
+ end
208
+
209
+ promise.execute
210
+ end
211
+
212
+ #
213
+ # Creates applications for the HDInsight cluster.
214
+ #
215
+ # @param resource_group_name [String] The name of the resource group.
216
+ # @param cluster_name [String] The name of the cluster.
217
+ # @param application_name [String] The constant value for the application name.
218
+ # @param parameters [Application] The application create request.
219
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
220
+ # will be added to the HTTP request.
221
+ #
222
+ # @return [Application] operation results.
223
+ #
224
+ def create(resource_group_name, cluster_name, application_name, parameters, custom_headers:nil)
225
+ response = create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:custom_headers).value!
226
+ response.body unless response.nil?
227
+ end
228
+
229
+ #
230
+ # @param resource_group_name [String] The name of the resource group.
231
+ # @param cluster_name [String] The name of the cluster.
232
+ # @param application_name [String] The constant value for the application name.
233
+ # @param parameters [Application] The application create request.
234
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
235
+ # will be added to the HTTP request.
236
+ #
237
+ # @return [Concurrent::Promise] promise which provides async access to http
238
+ # response.
239
+ #
240
+ def create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:nil)
241
+ # Send request
242
+ promise = begin_create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:custom_headers)
243
+
244
+ promise = promise.then do |response|
245
+ # Defining deserialization method.
246
+ deserialize_method = lambda do |parsed_response|
247
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Application.mapper()
248
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
249
+ end
250
+
251
+ # Waiting for response.
252
+ @client.get_long_running_operation_result(response, deserialize_method)
253
+ end
254
+
255
+ promise
256
+ end
257
+
258
+ #
259
+ # Deletes the specified application on the HDInsight cluster.
260
+ #
261
+ # @param resource_group_name [String] The name of the resource group.
262
+ # @param cluster_name [String] The name of the cluster.
263
+ # @param application_name [String] The constant value for the application name.
264
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
265
+ # will be added to the HTTP request.
266
+ #
267
+ def delete(resource_group_name, cluster_name, application_name, custom_headers:nil)
268
+ response = delete_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers).value!
269
+ nil
270
+ end
271
+
272
+ #
273
+ # @param resource_group_name [String] The name of the resource group.
274
+ # @param cluster_name [String] The name of the cluster.
275
+ # @param application_name [String] The constant value for the application name.
276
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
277
+ # will be added to the HTTP request.
278
+ #
279
+ # @return [Concurrent::Promise] promise which provides async access to http
280
+ # response.
281
+ #
282
+ def delete_async(resource_group_name, cluster_name, application_name, custom_headers:nil)
283
+ # Send request
284
+ promise = begin_delete_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers)
285
+
286
+ promise = promise.then do |response|
287
+ # Defining deserialization method.
288
+ deserialize_method = lambda do |parsed_response|
289
+ end
290
+
291
+ # Waiting for response.
292
+ @client.get_long_running_operation_result(response, deserialize_method)
293
+ end
294
+
295
+ promise
296
+ end
297
+
298
+ #
299
+ # Creates applications for the HDInsight cluster.
300
+ #
301
+ # @param resource_group_name [String] The name of the resource group.
302
+ # @param cluster_name [String] The name of the cluster.
303
+ # @param application_name [String] The constant value for the application name.
304
+ # @param parameters [Application] The application create request.
305
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
306
+ # will be added to the HTTP request.
307
+ #
308
+ # @return [Application] operation results.
309
+ #
310
+ def begin_create(resource_group_name, cluster_name, application_name, parameters, custom_headers:nil)
311
+ response = begin_create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:custom_headers).value!
312
+ response.body unless response.nil?
313
+ end
314
+
315
+ #
316
+ # Creates applications for the HDInsight cluster.
317
+ #
318
+ # @param resource_group_name [String] The name of the resource group.
319
+ # @param cluster_name [String] The name of the cluster.
320
+ # @param application_name [String] The constant value for the application name.
321
+ # @param parameters [Application] The application create request.
322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
323
+ # will be added to the HTTP request.
324
+ #
325
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
326
+ #
327
+ def begin_create_with_http_info(resource_group_name, cluster_name, application_name, parameters, custom_headers:nil)
328
+ begin_create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:custom_headers).value!
329
+ end
330
+
331
+ #
332
+ # Creates applications for the HDInsight cluster.
333
+ #
334
+ # @param resource_group_name [String] The name of the resource group.
335
+ # @param cluster_name [String] The name of the cluster.
336
+ # @param application_name [String] The constant value for the application name.
337
+ # @param parameters [Application] The application create request.
338
+ # @param [Hash{String => String}] A hash of custom headers that will be added
339
+ # to the HTTP request.
340
+ #
341
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
342
+ #
343
+ def begin_create_async(resource_group_name, cluster_name, application_name, parameters, custom_headers:nil)
344
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
345
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
346
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
347
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
348
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
349
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
350
+
351
+
352
+ request_headers = {}
353
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
354
+
355
+ # Set Headers
356
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
357
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
358
+
359
+ # Serialize Request
360
+ request_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Application.mapper()
361
+ request_content = @client.serialize(request_mapper, parameters)
362
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
363
+
364
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'
365
+
366
+ request_url = @base_url || @client.base_url
367
+
368
+ options = {
369
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
370
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationName' => application_name},
371
+ query_params: {'api-version' => @client.api_version},
372
+ body: request_content,
373
+ headers: request_headers.merge(custom_headers || {}),
374
+ base_url: request_url
375
+ }
376
+ promise = @client.make_request_async(:put, path_template, options)
377
+
378
+ promise = promise.then do |result|
379
+ http_response = result.response
380
+ status_code = http_response.status
381
+ response_content = http_response.body
382
+ unless status_code == 200
383
+ error_model = JSON.load(response_content)
384
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
385
+ end
386
+
387
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
388
+ # Deserialize Response
389
+ if status_code == 200
390
+ begin
391
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
392
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Application.mapper()
393
+ result.body = @client.deserialize(result_mapper, parsed_response)
394
+ rescue Exception => e
395
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
396
+ end
397
+ end
398
+
399
+ result
400
+ end
401
+
402
+ promise.execute
403
+ end
404
+
405
+ #
406
+ # Deletes the specified application on the HDInsight cluster.
407
+ #
408
+ # @param resource_group_name [String] The name of the resource group.
409
+ # @param cluster_name [String] The name of the cluster.
410
+ # @param application_name [String] The constant value for the application name.
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
413
+ #
414
+ #
415
+ def begin_delete(resource_group_name, cluster_name, application_name, custom_headers:nil)
416
+ response = begin_delete_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers).value!
417
+ nil
418
+ end
419
+
420
+ #
421
+ # Deletes the specified application on the HDInsight cluster.
422
+ #
423
+ # @param resource_group_name [String] The name of the resource group.
424
+ # @param cluster_name [String] The name of the cluster.
425
+ # @param application_name [String] The constant value for the application name.
426
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
427
+ # will be added to the HTTP request.
428
+ #
429
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
430
+ #
431
+ def begin_delete_with_http_info(resource_group_name, cluster_name, application_name, custom_headers:nil)
432
+ begin_delete_async(resource_group_name, cluster_name, application_name, custom_headers:custom_headers).value!
433
+ end
434
+
435
+ #
436
+ # Deletes the specified application on the HDInsight cluster.
437
+ #
438
+ # @param resource_group_name [String] The name of the resource group.
439
+ # @param cluster_name [String] The name of the cluster.
440
+ # @param application_name [String] The constant value for the application name.
441
+ # @param [Hash{String => String}] A hash of custom headers that will be added
442
+ # to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
445
+ #
446
+ def begin_delete_async(resource_group_name, cluster_name, application_name, custom_headers:nil)
447
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
448
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
449
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
450
+ fail ArgumentError, 'application_name is nil' if application_name.nil?
451
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
452
+
453
+
454
+ request_headers = {}
455
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
456
+
457
+ # Set Headers
458
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
459
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
460
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'
461
+
462
+ request_url = @base_url || @client.base_url
463
+
464
+ options = {
465
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
466
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'applicationName' => application_name},
467
+ query_params: {'api-version' => @client.api_version},
468
+ headers: request_headers.merge(custom_headers || {}),
469
+ base_url: request_url
470
+ }
471
+ promise = @client.make_request_async(:delete, path_template, options)
472
+
473
+ promise = promise.then do |result|
474
+ http_response = result.response
475
+ status_code = http_response.status
476
+ response_content = http_response.body
477
+ unless status_code == 200 || status_code == 202
478
+ error_model = JSON.load(response_content)
479
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
480
+ end
481
+
482
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
483
+
484
+ result
485
+ end
486
+
487
+ promise.execute
488
+ end
489
+
490
+ #
491
+ # Lists all of the applications for the HDInsight cluster.
492
+ #
493
+ # @param next_page_link [String] The NextLink from the previous successful call
494
+ # to List operation.
495
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
496
+ # will be added to the HTTP request.
497
+ #
498
+ # @return [ApplicationListResult] operation results.
499
+ #
500
+ def list_next(next_page_link, custom_headers:nil)
501
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
502
+ response.body unless response.nil?
503
+ end
504
+
505
+ #
506
+ # Lists all of the applications for the HDInsight cluster.
507
+ #
508
+ # @param next_page_link [String] The NextLink from the previous successful call
509
+ # to List operation.
510
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
511
+ # will be added to the HTTP request.
512
+ #
513
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
514
+ #
515
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
516
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
517
+ end
518
+
519
+ #
520
+ # Lists all of the applications for the HDInsight cluster.
521
+ #
522
+ # @param next_page_link [String] The NextLink from the previous successful call
523
+ # to List operation.
524
+ # @param [Hash{String => String}] A hash of custom headers that will be added
525
+ # to the HTTP request.
526
+ #
527
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
528
+ #
529
+ def list_next_async(next_page_link, custom_headers:nil)
530
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
531
+
532
+
533
+ request_headers = {}
534
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
535
+
536
+ # Set Headers
537
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
538
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
539
+ path_template = '{nextLink}'
540
+
541
+ request_url = @base_url || @client.base_url
542
+
543
+ options = {
544
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
545
+ skip_encoding_path_params: {'nextLink' => next_page_link},
546
+ headers: request_headers.merge(custom_headers || {}),
547
+ base_url: request_url
548
+ }
549
+ promise = @client.make_request_async(:get, path_template, options)
550
+
551
+ promise = promise.then do |result|
552
+ http_response = result.response
553
+ status_code = http_response.status
554
+ response_content = http_response.body
555
+ unless status_code == 200
556
+ error_model = JSON.load(response_content)
557
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
558
+ end
559
+
560
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
561
+ # Deserialize Response
562
+ if status_code == 200
563
+ begin
564
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
565
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ApplicationListResult.mapper()
566
+ result.body = @client.deserialize(result_mapper, parsed_response)
567
+ rescue Exception => e
568
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
569
+ end
570
+ end
571
+
572
+ result
573
+ end
574
+
575
+ promise.execute
576
+ end
577
+
578
+ #
579
+ # Lists all of the applications for the HDInsight cluster.
580
+ #
581
+ # @param resource_group_name [String] The name of the resource group.
582
+ # @param cluster_name [String] The name of the cluster.
583
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
584
+ # will be added to the HTTP request.
585
+ #
586
+ # @return [ApplicationListResult] which provide lazy access to pages of the
587
+ # response.
588
+ #
589
+ def list_as_lazy(resource_group_name, cluster_name, custom_headers:nil)
590
+ response = list_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
591
+ unless response.nil?
592
+ page = response.body
593
+ page.next_method = Proc.new do |next_page_link|
594
+ list_next_async(next_page_link, custom_headers:custom_headers)
595
+ end
596
+ page
597
+ end
598
+ end
599
+
600
+ end
601
+ end