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
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::Hdinsight end
8
+ module Azure::Hdinsight::Mgmt end
9
+ module Azure::Hdinsight::Mgmt::V2015_03_01_preview end
@@ -0,0 +1,215 @@
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 Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations 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 available HDInsight REST API operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists all of the available HDInsight REST API operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available HDInsight REST API operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.HDInsight/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::OperationListResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ #
107
+ # Lists all of the available HDInsight REST API operations.
108
+ #
109
+ # @param next_page_link [String] The NextLink from the previous successful call
110
+ # to List operation.
111
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
112
+ # will be added to the HTTP request.
113
+ #
114
+ # @return [OperationListResult] operation results.
115
+ #
116
+ def list_next(next_page_link, custom_headers:nil)
117
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
118
+ response.body unless response.nil?
119
+ end
120
+
121
+ #
122
+ # Lists all of the available HDInsight REST API operations.
123
+ #
124
+ # @param next_page_link [String] The NextLink from the previous successful call
125
+ # to List operation.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
130
+ #
131
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
132
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
133
+ end
134
+
135
+ #
136
+ # Lists all of the available HDInsight REST API operations.
137
+ #
138
+ # @param next_page_link [String] The NextLink from the previous successful call
139
+ # to List operation.
140
+ # @param [Hash{String => String}] A hash of custom headers that will be added
141
+ # to the HTTP request.
142
+ #
143
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
144
+ #
145
+ def list_next_async(next_page_link, custom_headers:nil)
146
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
147
+
148
+
149
+ request_headers = {}
150
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
151
+
152
+ # Set Headers
153
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
154
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
155
+ path_template = '{nextLink}'
156
+
157
+ request_url = @base_url || @client.base_url
158
+
159
+ options = {
160
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
+ skip_encoding_path_params: {'nextLink' => next_page_link},
162
+ headers: request_headers.merge(custom_headers || {}),
163
+ base_url: request_url
164
+ }
165
+ promise = @client.make_request_async(:get, path_template, options)
166
+
167
+ promise = promise.then do |result|
168
+ http_response = result.response
169
+ status_code = http_response.status
170
+ response_content = http_response.body
171
+ unless status_code == 200
172
+ error_model = JSON.load(response_content)
173
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
174
+ end
175
+
176
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
+ # Deserialize Response
178
+ if status_code == 200
179
+ begin
180
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::OperationListResult.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response)
183
+ rescue Exception => e
184
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
185
+ end
186
+ end
187
+
188
+ result
189
+ end
190
+
191
+ promise.execute
192
+ end
193
+
194
+ #
195
+ # Lists all of the available HDInsight REST API operations.
196
+ #
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [OperationListResult] which provide lazy access to pages of the
201
+ # response.
202
+ #
203
+ def list_as_lazy(custom_headers:nil)
204
+ response = list_async(custom_headers:custom_headers).value!
205
+ unless response.nil?
206
+ page = response.body
207
+ page.next_method = Proc.new do |next_page_link|
208
+ list_next_async(next_page_link, custom_headers:custom_headers)
209
+ end
210
+ page
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -0,0 +1,408 @@
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 ScriptActions
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ScriptActions 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
+ # Deletes a specified persisted script action of the 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 script_name [String] The name of the script.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ #
34
+ def delete(resource_group_name, cluster_name, script_name, custom_headers:nil)
35
+ response = delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value!
36
+ nil
37
+ end
38
+
39
+ #
40
+ # Deletes a specified persisted script action of the 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 script_name [String] The name of the script.
45
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
46
+ # will be added to the HTTP request.
47
+ #
48
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
49
+ #
50
+ def delete_with_http_info(resource_group_name, cluster_name, script_name, custom_headers:nil)
51
+ delete_async(resource_group_name, cluster_name, script_name, custom_headers:custom_headers).value!
52
+ end
53
+
54
+ #
55
+ # Deletes a specified persisted script action of the cluster.
56
+ #
57
+ # @param resource_group_name [String] The name of the resource group.
58
+ # @param cluster_name [String] The name of the cluster.
59
+ # @param script_name [String] The name of the script.
60
+ # @param [Hash{String => String}] A hash of custom headers that will be added
61
+ # to the HTTP request.
62
+ #
63
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
64
+ #
65
+ def delete_async(resource_group_name, cluster_name, script_name, custom_headers:nil)
66
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
68
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
69
+ fail ArgumentError, 'script_name is nil' if script_name.nil?
70
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName}'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'scriptName' => script_name},
86
+ query_params: {'api-version' => @client.api_version},
87
+ headers: request_headers.merge(custom_headers || {}),
88
+ base_url: request_url
89
+ }
90
+ promise = @client.make_request_async(:delete, path_template, options)
91
+
92
+ promise = promise.then do |result|
93
+ http_response = result.response
94
+ status_code = http_response.status
95
+ response_content = http_response.body
96
+ unless status_code == 200
97
+ error_model = JSON.load(response_content)
98
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
99
+ end
100
+
101
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ #
110
+ # Lists all the persisted script actions for the specified cluster.
111
+ #
112
+ # @param resource_group_name [String] The name of the resource group.
113
+ # @param cluster_name [String] The name of the cluster.
114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
115
+ # will be added to the HTTP request.
116
+ #
117
+ # @return [Array<RuntimeScriptActionDetail>] operation results.
118
+ #
119
+ def list_persisted_scripts(resource_group_name, cluster_name, custom_headers:nil)
120
+ first_page = list_persisted_scripts_as_lazy(resource_group_name, cluster_name, custom_headers:custom_headers)
121
+ first_page.get_all_items
122
+ end
123
+
124
+ #
125
+ # Lists all the persisted script actions for the specified cluster.
126
+ #
127
+ # @param resource_group_name [String] The name of the resource group.
128
+ # @param cluster_name [String] The name of the cluster.
129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
+ # will be added to the HTTP request.
131
+ #
132
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
133
+ #
134
+ def list_persisted_scripts_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
135
+ list_persisted_scripts_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
136
+ end
137
+
138
+ #
139
+ # Lists all the persisted script actions for the specified cluster.
140
+ #
141
+ # @param resource_group_name [String] The name of the resource group.
142
+ # @param cluster_name [String] The name of the cluster.
143
+ # @param [Hash{String => String}] A hash of custom headers that will be added
144
+ # to the HTTP request.
145
+ #
146
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
147
+ #
148
+ def list_persisted_scripts_async(resource_group_name, cluster_name, custom_headers:nil)
149
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
150
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
151
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
152
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
153
+
154
+
155
+ request_headers = {}
156
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
157
+
158
+ # Set Headers
159
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
160
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
161
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions'
162
+
163
+ request_url = @base_url || @client.base_url
164
+
165
+ options = {
166
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
167
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
168
+ query_params: {'api-version' => @client.api_version},
169
+ headers: request_headers.merge(custom_headers || {}),
170
+ base_url: request_url
171
+ }
172
+ promise = @client.make_request_async(:get, path_template, options)
173
+
174
+ promise = promise.then do |result|
175
+ http_response = result.response
176
+ status_code = http_response.status
177
+ response_content = http_response.body
178
+ unless status_code == 200
179
+ error_model = JSON.load(response_content)
180
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
181
+ end
182
+
183
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
184
+ # Deserialize Response
185
+ if status_code == 200
186
+ begin
187
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
188
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ScriptActionsList.mapper()
189
+ result.body = @client.deserialize(result_mapper, parsed_response)
190
+ rescue Exception => e
191
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
192
+ end
193
+ end
194
+
195
+ result
196
+ end
197
+
198
+ promise.execute
199
+ end
200
+
201
+ #
202
+ # Gets the script execution detail for the given script execution ID.
203
+ #
204
+ # @param resource_group_name [String] The name of the resource group.
205
+ # @param cluster_name [String] The name of the cluster.
206
+ # @param script_execution_id [String] The script execution Id
207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
208
+ # will be added to the HTTP request.
209
+ #
210
+ # @return [RuntimeScriptActionDetail] operation results.
211
+ #
212
+ def get_execution_detail(resource_group_name, cluster_name, script_execution_id, custom_headers:nil)
213
+ response = get_execution_detail_async(resource_group_name, cluster_name, script_execution_id, custom_headers:custom_headers).value!
214
+ response.body unless response.nil?
215
+ end
216
+
217
+ #
218
+ # Gets the script execution detail for the given script execution ID.
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group.
221
+ # @param cluster_name [String] The name of the cluster.
222
+ # @param script_execution_id [String] The script execution Id
223
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
224
+ # will be added to the HTTP request.
225
+ #
226
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
227
+ #
228
+ def get_execution_detail_with_http_info(resource_group_name, cluster_name, script_execution_id, custom_headers:nil)
229
+ get_execution_detail_async(resource_group_name, cluster_name, script_execution_id, custom_headers:custom_headers).value!
230
+ end
231
+
232
+ #
233
+ # Gets the script execution detail for the given script execution ID.
234
+ #
235
+ # @param resource_group_name [String] The name of the resource group.
236
+ # @param cluster_name [String] The name of the cluster.
237
+ # @param script_execution_id [String] The script execution Id
238
+ # @param [Hash{String => String}] A hash of custom headers that will be added
239
+ # to the HTTP request.
240
+ #
241
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
242
+ #
243
+ def get_execution_detail_async(resource_group_name, cluster_name, script_execution_id, custom_headers:nil)
244
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
245
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
246
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
247
+ fail ArgumentError, 'script_execution_id is nil' if script_execution_id.nil?
248
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
249
+
250
+
251
+ request_headers = {}
252
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
253
+
254
+ # Set Headers
255
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
256
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
257
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}'
258
+
259
+ request_url = @base_url || @client.base_url
260
+
261
+ options = {
262
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
263
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'scriptExecutionId' => script_execution_id},
264
+ query_params: {'api-version' => @client.api_version},
265
+ headers: request_headers.merge(custom_headers || {}),
266
+ base_url: request_url
267
+ }
268
+ promise = @client.make_request_async(:get, path_template, options)
269
+
270
+ promise = promise.then do |result|
271
+ http_response = result.response
272
+ status_code = http_response.status
273
+ response_content = http_response.body
274
+ unless status_code == 200
275
+ error_model = JSON.load(response_content)
276
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
277
+ end
278
+
279
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
280
+ # Deserialize Response
281
+ if status_code == 200
282
+ begin
283
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
284
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::RuntimeScriptActionDetail.mapper()
285
+ result.body = @client.deserialize(result_mapper, parsed_response)
286
+ rescue Exception => e
287
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
288
+ end
289
+ end
290
+
291
+ result
292
+ end
293
+
294
+ promise.execute
295
+ end
296
+
297
+ #
298
+ # Lists all the persisted script actions for the specified cluster.
299
+ #
300
+ # @param next_page_link [String] The NextLink from the previous successful call
301
+ # to List operation.
302
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
303
+ # will be added to the HTTP request.
304
+ #
305
+ # @return [ScriptActionsList] operation results.
306
+ #
307
+ def list_persisted_scripts_next(next_page_link, custom_headers:nil)
308
+ response = list_persisted_scripts_next_async(next_page_link, custom_headers:custom_headers).value!
309
+ response.body unless response.nil?
310
+ end
311
+
312
+ #
313
+ # Lists all the persisted script actions for the specified cluster.
314
+ #
315
+ # @param next_page_link [String] The NextLink from the previous successful call
316
+ # to List operation.
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
319
+ #
320
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
321
+ #
322
+ def list_persisted_scripts_next_with_http_info(next_page_link, custom_headers:nil)
323
+ list_persisted_scripts_next_async(next_page_link, custom_headers:custom_headers).value!
324
+ end
325
+
326
+ #
327
+ # Lists all the persisted script actions for the specified cluster.
328
+ #
329
+ # @param next_page_link [String] The NextLink from the previous successful call
330
+ # to List operation.
331
+ # @param [Hash{String => String}] A hash of custom headers that will be added
332
+ # to the HTTP request.
333
+ #
334
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
335
+ #
336
+ def list_persisted_scripts_next_async(next_page_link, custom_headers:nil)
337
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
338
+
339
+
340
+ request_headers = {}
341
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
342
+
343
+ # Set Headers
344
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
345
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
346
+ path_template = '{nextLink}'
347
+
348
+ request_url = @base_url || @client.base_url
349
+
350
+ options = {
351
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
352
+ skip_encoding_path_params: {'nextLink' => next_page_link},
353
+ headers: request_headers.merge(custom_headers || {}),
354
+ base_url: request_url
355
+ }
356
+ promise = @client.make_request_async(:get, path_template, options)
357
+
358
+ promise = promise.then do |result|
359
+ http_response = result.response
360
+ status_code = http_response.status
361
+ response_content = http_response.body
362
+ unless status_code == 200
363
+ error_model = JSON.load(response_content)
364
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
365
+ end
366
+
367
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
368
+ # Deserialize Response
369
+ if status_code == 200
370
+ begin
371
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
372
+ result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ScriptActionsList.mapper()
373
+ result.body = @client.deserialize(result_mapper, parsed_response)
374
+ rescue Exception => e
375
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
376
+ end
377
+ end
378
+
379
+ result
380
+ end
381
+
382
+ promise.execute
383
+ end
384
+
385
+ #
386
+ # Lists all the persisted script actions for the specified cluster.
387
+ #
388
+ # @param resource_group_name [String] The name of the resource group.
389
+ # @param cluster_name [String] The name of the cluster.
390
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
+ # will be added to the HTTP request.
392
+ #
393
+ # @return [ScriptActionsList] which provide lazy access to pages of the
394
+ # response.
395
+ #
396
+ def list_persisted_scripts_as_lazy(resource_group_name, cluster_name, custom_headers:nil)
397
+ response = list_persisted_scripts_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
398
+ unless response.nil?
399
+ page = response.body
400
+ page.next_method = Proc.new do |next_page_link|
401
+ list_persisted_scripts_next_async(next_page_link, custom_headers:custom_headers)
402
+ end
403
+ page
404
+ end
405
+ end
406
+
407
+ end
408
+ end