azure_mgmt_hdinsight 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight.rb +106 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/applications.rb +601 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/clusters.rb +1292 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/configurations.rb +289 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/extension_operations.rb +653 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/hdinsight_management_client.rb +161 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/locations.rb +201 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application.rb +104 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_endpoint.rb +68 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_get_https_endpoint.rb +87 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_list_result.rb +102 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/application_properties.rb +210 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/async_operation_state.rb +17 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/capabilities_result.rb +148 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster.rb +121 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_parameters_extended.rb +89 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_properties.rb +132 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_definition.rb +88 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_disk_encryption_parameters.rb +70 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_get_properties.rb +209 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity.rb +101 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity_user_assigned_identities_value.rb +61 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_persisted_script_actions_result.rb +68 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_result.rb +99 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_runtime_script_action_detail_result.rb +70 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_request.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_response.rb +59 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_patch_parameters.rb +54 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/cluster_resize_parameters.rb +46 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/compute_profile.rb +55 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/connectivity_endpoint.rb +79 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/data_disks_groups.rb +71 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/directory_type.rb +15 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/disk_encryption_properties.rb +95 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/error_response.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/errors.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/execute_script_action_parameters.rb +67 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/extension.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hardware_profile.rb +46 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/hdinsight_cluster_provisioning_state.rb +19 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/json_web_key_encryption_algorithm.rb +17 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/linux_operating_system_profile.rb +69 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/localized_name.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation.rb +58 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_display.rb +69 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_list_result.rb +101 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/operation_resource.rb +60 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/os_profile.rb +47 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ostype.rb +16 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/proxy_resource.rb +63 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_capability.rb +56 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/quota_info.rb +46 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regional_quota_capability.rb +68 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/regions_capability.rb +54 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource.rb +80 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/resource_identity_type.rb +18 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/role.rb +144 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action.rb +100 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action_detail.rb +178 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action.rb +68 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_history_list.rb +101 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_summary.rb +60 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_action_persisted_get_response_spec.rb +99 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/script_actions_list.rb +100 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/security_profile.rb +159 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_profile.rb +55 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/ssh_public_key.rb +46 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_account.rb +93 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/storage_profile.rb +56 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tier.rb +16 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/tracked_resource.rb +92 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usage.rb +81 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/usages_list_result.rb +55 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/version_spec.rb +87 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/versions_capability.rb +55 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/virtual_network_profile.rb +57 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_size_compatibility_filter.rb +141 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/models/vm_sizes_capability.rb +54 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/module_definition.rb +9 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/operations.rb +215 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb +408 -0
- data/lib/2015-03-01-preview/generated/azure_mgmt_hdinsight/script_execution_history.rb +312 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight.rb +98 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/applications.rb +601 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb +1292 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/configurations.rb +289 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/extensions.rb +735 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/hdinsight_management_client.rb +161 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/locations.rb +113 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application.rb +104 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_get_endpoint.rb +68 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_get_https_endpoint.rb +87 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_list_result.rb +102 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/application_properties.rb +210 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/async_operation_state.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster.rb +121 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_parameters_extended.rb +89 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_create_properties.rb +132 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_definition.rb +88 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_disk_encryption_parameters.rb +70 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_get_properties.rb +209 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity.rb +101 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_identity_user_assigned_identities_value.rb +61 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_persisted_script_actions_result.rb +68 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_result.rb +99 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_list_runtime_script_action_detail_result.rb +70 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_request.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_monitoring_response.rb +59 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_patch_parameters.rb +54 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/cluster_resize_parameters.rb +46 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/compute_profile.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/connectivity_endpoint.rb +79 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/data_disks_groups.rb +71 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/directory_type.rb +15 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/disk_encryption_properties.rb +95 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/error_response.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/errors.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/execute_script_action_parameters.rb +67 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/extension.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/hardware_profile.rb +46 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/hdinsight_cluster_provisioning_state.rb +19 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/json_web_key_encryption_algorithm.rb +17 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/linux_operating_system_profile.rb +69 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/localized_name.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation.rb +58 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_display.rb +69 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_list_result.rb +101 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/operation_resource.rb +60 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/os_profile.rb +47 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ostype.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/proxy_resource.rb +63 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/quota_info.rb +46 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/resource.rb +80 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/resource_identity_type.rb +18 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/role.rb +144 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action.rb +100 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/runtime_script_action_detail.rb +178 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action.rb +68 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_history_list.rb +101 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_execution_summary.rb +60 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_action_persisted_get_response_spec.rb +99 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/script_actions_list.rb +100 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/security_profile.rb +159 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ssh_profile.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/ssh_public_key.rb +46 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/storage_account.rb +93 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/storage_profile.rb +56 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/tier.rb +16 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/tracked_resource.rb +92 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/usage.rb +81 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/usages_list_result.rb +55 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/models/virtual_network_profile.rb +57 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/module_definition.rb +9 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/operations.rb +215 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/script_actions.rb +408 -0
- data/lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/script_execution_history.rb +312 -0
- data/lib/azure_mgmt_hdinsight.rb +7 -0
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/latest/hdinsight_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/hdinsight_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/hdinsight_profile_module.rb +327 -0
- data/lib/version.rb +7 -0
- metadata +282 -0
|
@@ -0,0 +1,289 @@
|
|
|
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 Configurations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the Configurations 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
|
+
# Configures the HTTP settings on the specified 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 configuration_name [String] The name of the cluster configuration.
|
|
30
|
+
# @param parameters [Hash{String => String}] The cluster configurations.
|
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
32
|
+
# will be added to the HTTP request.
|
|
33
|
+
#
|
|
34
|
+
def update_httpsettings(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:nil)
|
|
35
|
+
response = update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:custom_headers).value!
|
|
36
|
+
nil
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
41
|
+
# @param cluster_name [String] The name of the cluster.
|
|
42
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
43
|
+
# @param parameters [Hash{String => String}] The cluster configurations.
|
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
45
|
+
# will be added to the HTTP request.
|
|
46
|
+
#
|
|
47
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
48
|
+
# response.
|
|
49
|
+
#
|
|
50
|
+
def update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:nil)
|
|
51
|
+
# Send request
|
|
52
|
+
promise = begin_update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:custom_headers)
|
|
53
|
+
|
|
54
|
+
promise = promise.then do |response|
|
|
55
|
+
# Defining deserialization method.
|
|
56
|
+
deserialize_method = lambda do |parsed_response|
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Waiting for response.
|
|
60
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
promise
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
#
|
|
67
|
+
# The configuration object for the specified cluster.
|
|
68
|
+
#
|
|
69
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
70
|
+
# @param cluster_name [String] The name of the cluster.
|
|
71
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
72
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
73
|
+
# will be added to the HTTP request.
|
|
74
|
+
#
|
|
75
|
+
# @return [Hash] operation results.
|
|
76
|
+
#
|
|
77
|
+
def get(resource_group_name, cluster_name, configuration_name, custom_headers:nil)
|
|
78
|
+
response = get_async(resource_group_name, cluster_name, configuration_name, custom_headers:custom_headers).value!
|
|
79
|
+
response.body unless response.nil?
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
#
|
|
83
|
+
# The configuration object for the specified cluster.
|
|
84
|
+
#
|
|
85
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
86
|
+
# @param cluster_name [String] The name of the cluster.
|
|
87
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
88
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
89
|
+
# will be added to the HTTP request.
|
|
90
|
+
#
|
|
91
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
92
|
+
#
|
|
93
|
+
def get_with_http_info(resource_group_name, cluster_name, configuration_name, custom_headers:nil)
|
|
94
|
+
get_async(resource_group_name, cluster_name, configuration_name, custom_headers:custom_headers).value!
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
#
|
|
98
|
+
# The configuration object for the specified cluster.
|
|
99
|
+
#
|
|
100
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
101
|
+
# @param cluster_name [String] The name of the cluster.
|
|
102
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
103
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
104
|
+
# to the HTTP request.
|
|
105
|
+
#
|
|
106
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
107
|
+
#
|
|
108
|
+
def get_async(resource_group_name, cluster_name, configuration_name, custom_headers:nil)
|
|
109
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
110
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
111
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
112
|
+
fail ArgumentError, 'configuration_name is nil' if configuration_name.nil?
|
|
113
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
request_headers = {}
|
|
117
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
118
|
+
|
|
119
|
+
# Set Headers
|
|
120
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
121
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
122
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}'
|
|
123
|
+
|
|
124
|
+
request_url = @base_url || @client.base_url
|
|
125
|
+
|
|
126
|
+
options = {
|
|
127
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
128
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'configurationName' => configuration_name},
|
|
129
|
+
query_params: {'api-version' => @client.api_version},
|
|
130
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
131
|
+
base_url: request_url
|
|
132
|
+
}
|
|
133
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
134
|
+
|
|
135
|
+
promise = promise.then do |result|
|
|
136
|
+
http_response = result.response
|
|
137
|
+
status_code = http_response.status
|
|
138
|
+
response_content = http_response.body
|
|
139
|
+
unless status_code == 200
|
|
140
|
+
error_model = JSON.load(response_content)
|
|
141
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
145
|
+
# Deserialize Response
|
|
146
|
+
if status_code == 200
|
|
147
|
+
begin
|
|
148
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
149
|
+
result_mapper = {
|
|
150
|
+
client_side_validation: true,
|
|
151
|
+
required: false,
|
|
152
|
+
serialized_name: 'parsed_response',
|
|
153
|
+
type: {
|
|
154
|
+
name: 'Dictionary',
|
|
155
|
+
value: {
|
|
156
|
+
client_side_validation: true,
|
|
157
|
+
required: false,
|
|
158
|
+
serialized_name: 'StringElementType',
|
|
159
|
+
type: {
|
|
160
|
+
name: 'String'
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
166
|
+
rescue Exception => e
|
|
167
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
result
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
promise.execute
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
#
|
|
178
|
+
# Configures the HTTP settings on the specified cluster.
|
|
179
|
+
#
|
|
180
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
181
|
+
# @param cluster_name [String] The name of the cluster.
|
|
182
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
183
|
+
# @param parameters [Hash{String => String}] The cluster configurations.
|
|
184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
185
|
+
# will be added to the HTTP request.
|
|
186
|
+
#
|
|
187
|
+
#
|
|
188
|
+
def begin_update_httpsettings(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:nil)
|
|
189
|
+
response = begin_update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:custom_headers).value!
|
|
190
|
+
nil
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
#
|
|
194
|
+
# Configures the HTTP settings on the specified cluster.
|
|
195
|
+
#
|
|
196
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
197
|
+
# @param cluster_name [String] The name of the cluster.
|
|
198
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
199
|
+
# @param parameters [Hash{String => String}] The cluster configurations.
|
|
200
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
201
|
+
# will be added to the HTTP request.
|
|
202
|
+
#
|
|
203
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
204
|
+
#
|
|
205
|
+
def begin_update_httpsettings_with_http_info(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:nil)
|
|
206
|
+
begin_update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:custom_headers).value!
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
#
|
|
210
|
+
# Configures the HTTP settings on the specified cluster.
|
|
211
|
+
#
|
|
212
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
213
|
+
# @param cluster_name [String] The name of the cluster.
|
|
214
|
+
# @param configuration_name [String] The name of the cluster configuration.
|
|
215
|
+
# @param parameters [Hash{String => String}] The cluster configurations.
|
|
216
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
217
|
+
# to the HTTP request.
|
|
218
|
+
#
|
|
219
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
220
|
+
#
|
|
221
|
+
def begin_update_httpsettings_async(resource_group_name, cluster_name, configuration_name, parameters, custom_headers:nil)
|
|
222
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
223
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
224
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
225
|
+
fail ArgumentError, 'configuration_name is nil' if configuration_name.nil?
|
|
226
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
227
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
request_headers = {}
|
|
231
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
232
|
+
|
|
233
|
+
# Set Headers
|
|
234
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
235
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
236
|
+
|
|
237
|
+
# Serialize Request
|
|
238
|
+
request_mapper = {
|
|
239
|
+
client_side_validation: true,
|
|
240
|
+
required: true,
|
|
241
|
+
serialized_name: 'parameters',
|
|
242
|
+
type: {
|
|
243
|
+
name: 'Dictionary',
|
|
244
|
+
value: {
|
|
245
|
+
client_side_validation: true,
|
|
246
|
+
required: false,
|
|
247
|
+
serialized_name: 'StringElementType',
|
|
248
|
+
type: {
|
|
249
|
+
name: 'String'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
request_content = @client.serialize(request_mapper, parameters)
|
|
255
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
256
|
+
|
|
257
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}'
|
|
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,'configurationName' => configuration_name},
|
|
264
|
+
query_params: {'api-version' => @client.api_version},
|
|
265
|
+
body: request_content,
|
|
266
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
267
|
+
base_url: request_url
|
|
268
|
+
}
|
|
269
|
+
promise = @client.make_request_async(:post, path_template, options)
|
|
270
|
+
|
|
271
|
+
promise = promise.then do |result|
|
|
272
|
+
http_response = result.response
|
|
273
|
+
status_code = http_response.status
|
|
274
|
+
response_content = http_response.body
|
|
275
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
|
276
|
+
error_model = JSON.load(response_content)
|
|
277
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
281
|
+
|
|
282
|
+
result
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
promise.execute
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
end
|
|
@@ -0,0 +1,653 @@
|
|
|
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 ExtensionOperations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the ExtensionOperations 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
|
+
# Enables the Operations Management Suite (OMS) on 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 parameters [ClusterMonitoringRequest] The Operations Management Suite
|
|
30
|
+
# (OMS) workspace parameters.
|
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
32
|
+
# will be added to the HTTP request.
|
|
33
|
+
#
|
|
34
|
+
def enable_monitoring(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
|
35
|
+
response = enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
|
36
|
+
nil
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
41
|
+
# @param cluster_name [String] The name of the cluster.
|
|
42
|
+
# @param parameters [ClusterMonitoringRequest] The Operations Management Suite
|
|
43
|
+
# (OMS) workspace parameters.
|
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
45
|
+
# will be added to the HTTP request.
|
|
46
|
+
#
|
|
47
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
48
|
+
# response.
|
|
49
|
+
#
|
|
50
|
+
def enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
|
51
|
+
# Send request
|
|
52
|
+
promise = begin_enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
|
|
53
|
+
|
|
54
|
+
promise = promise.then do |response|
|
|
55
|
+
# Defining deserialization method.
|
|
56
|
+
deserialize_method = lambda do |parsed_response|
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Waiting for response.
|
|
60
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
promise
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
#
|
|
67
|
+
# Gets the status of Operations Management Suite (OMS) on the HDInsight
|
|
68
|
+
# cluster.
|
|
69
|
+
#
|
|
70
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
71
|
+
# @param cluster_name [String] The name of the cluster.
|
|
72
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
73
|
+
# will be added to the HTTP request.
|
|
74
|
+
#
|
|
75
|
+
# @return [ClusterMonitoringResponse] operation results.
|
|
76
|
+
#
|
|
77
|
+
def get_monitoring_status(resource_group_name, cluster_name, custom_headers:nil)
|
|
78
|
+
response = get_monitoring_status_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
|
79
|
+
response.body unless response.nil?
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
#
|
|
83
|
+
# Gets the status of Operations Management Suite (OMS) on the HDInsight
|
|
84
|
+
# cluster.
|
|
85
|
+
#
|
|
86
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
87
|
+
# @param cluster_name [String] The name of the cluster.
|
|
88
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
89
|
+
# will be added to the HTTP request.
|
|
90
|
+
#
|
|
91
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
92
|
+
#
|
|
93
|
+
def get_monitoring_status_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
|
94
|
+
get_monitoring_status_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
#
|
|
98
|
+
# Gets the status of Operations Management Suite (OMS) on the HDInsight
|
|
99
|
+
# cluster.
|
|
100
|
+
#
|
|
101
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
102
|
+
# @param cluster_name [String] The name of the cluster.
|
|
103
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
104
|
+
# to the HTTP request.
|
|
105
|
+
#
|
|
106
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
107
|
+
#
|
|
108
|
+
def get_monitoring_status_async(resource_group_name, cluster_name, custom_headers:nil)
|
|
109
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
110
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
111
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
112
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
request_headers = {}
|
|
116
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
117
|
+
|
|
118
|
+
# Set Headers
|
|
119
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
120
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
121
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'
|
|
122
|
+
|
|
123
|
+
request_url = @base_url || @client.base_url
|
|
124
|
+
|
|
125
|
+
options = {
|
|
126
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
127
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
|
128
|
+
query_params: {'api-version' => @client.api_version},
|
|
129
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
130
|
+
base_url: request_url
|
|
131
|
+
}
|
|
132
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
133
|
+
|
|
134
|
+
promise = promise.then do |result|
|
|
135
|
+
http_response = result.response
|
|
136
|
+
status_code = http_response.status
|
|
137
|
+
response_content = http_response.body
|
|
138
|
+
unless status_code == 200
|
|
139
|
+
error_model = JSON.load(response_content)
|
|
140
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
144
|
+
# Deserialize Response
|
|
145
|
+
if status_code == 200
|
|
146
|
+
begin
|
|
147
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
148
|
+
result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ClusterMonitoringResponse.mapper()
|
|
149
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
150
|
+
rescue Exception => e
|
|
151
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
result
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
promise.execute
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
#
|
|
162
|
+
# Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
163
|
+
#
|
|
164
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
165
|
+
# @param cluster_name [String] The name of the cluster.
|
|
166
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
167
|
+
# will be added to the HTTP request.
|
|
168
|
+
#
|
|
169
|
+
def disable_monitoring(resource_group_name, cluster_name, custom_headers:nil)
|
|
170
|
+
response = disable_monitoring_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
|
171
|
+
nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
#
|
|
175
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
176
|
+
# @param cluster_name [String] The name of the cluster.
|
|
177
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
178
|
+
# will be added to the HTTP request.
|
|
179
|
+
#
|
|
180
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
|
181
|
+
# response.
|
|
182
|
+
#
|
|
183
|
+
def disable_monitoring_async(resource_group_name, cluster_name, custom_headers:nil)
|
|
184
|
+
# Send request
|
|
185
|
+
promise = begin_disable_monitoring_async(resource_group_name, cluster_name, custom_headers:custom_headers)
|
|
186
|
+
|
|
187
|
+
promise = promise.then do |response|
|
|
188
|
+
# Defining deserialization method.
|
|
189
|
+
deserialize_method = lambda do |parsed_response|
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Waiting for response.
|
|
193
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
promise
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
#
|
|
200
|
+
# Creates an HDInsight cluster extension.
|
|
201
|
+
#
|
|
202
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
203
|
+
# @param cluster_name [String] The name of the cluster.
|
|
204
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
205
|
+
# @param parameters [Extension] The cluster extensions create request.
|
|
206
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
207
|
+
# will be added to the HTTP request.
|
|
208
|
+
#
|
|
209
|
+
#
|
|
210
|
+
def create(resource_group_name, cluster_name, extension_name, parameters, custom_headers:nil)
|
|
211
|
+
response = create_async(resource_group_name, cluster_name, extension_name, parameters, custom_headers:custom_headers).value!
|
|
212
|
+
nil
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
#
|
|
216
|
+
# Creates an HDInsight cluster extension.
|
|
217
|
+
#
|
|
218
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
219
|
+
# @param cluster_name [String] The name of the cluster.
|
|
220
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
221
|
+
# @param parameters [Extension] The cluster extensions create request.
|
|
222
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
223
|
+
# will be added to the HTTP request.
|
|
224
|
+
#
|
|
225
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
226
|
+
#
|
|
227
|
+
def create_with_http_info(resource_group_name, cluster_name, extension_name, parameters, custom_headers:nil)
|
|
228
|
+
create_async(resource_group_name, cluster_name, extension_name, parameters, custom_headers:custom_headers).value!
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
#
|
|
232
|
+
# Creates an HDInsight cluster extension.
|
|
233
|
+
#
|
|
234
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
235
|
+
# @param cluster_name [String] The name of the cluster.
|
|
236
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
237
|
+
# @param parameters [Extension] The cluster extensions create request.
|
|
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 create_async(resource_group_name, cluster_name, extension_name, parameters, 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, 'extension_name is nil' if extension_name.nil?
|
|
248
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
249
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
request_headers = {}
|
|
253
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
254
|
+
|
|
255
|
+
# Set Headers
|
|
256
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
257
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
258
|
+
|
|
259
|
+
# Serialize Request
|
|
260
|
+
request_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Extension.mapper()
|
|
261
|
+
request_content = @client.serialize(request_mapper, parameters)
|
|
262
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
263
|
+
|
|
264
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'
|
|
265
|
+
|
|
266
|
+
request_url = @base_url || @client.base_url
|
|
267
|
+
|
|
268
|
+
options = {
|
|
269
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
270
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'extensionName' => extension_name},
|
|
271
|
+
query_params: {'api-version' => @client.api_version},
|
|
272
|
+
body: request_content,
|
|
273
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
274
|
+
base_url: request_url
|
|
275
|
+
}
|
|
276
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
277
|
+
|
|
278
|
+
promise = promise.then do |result|
|
|
279
|
+
http_response = result.response
|
|
280
|
+
status_code = http_response.status
|
|
281
|
+
response_content = http_response.body
|
|
282
|
+
unless status_code == 200 || status_code == 202
|
|
283
|
+
error_model = JSON.load(response_content)
|
|
284
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
288
|
+
|
|
289
|
+
result
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
promise.execute
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
#
|
|
296
|
+
# Gets the extension properties for the specified HDInsight cluster extension.
|
|
297
|
+
#
|
|
298
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
299
|
+
# @param cluster_name [String] The name of the cluster.
|
|
300
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
301
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
302
|
+
# will be added to the HTTP request.
|
|
303
|
+
#
|
|
304
|
+
# @return [Extension] operation results.
|
|
305
|
+
#
|
|
306
|
+
def get(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
307
|
+
response = get_async(resource_group_name, cluster_name, extension_name, custom_headers:custom_headers).value!
|
|
308
|
+
response.body unless response.nil?
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
#
|
|
312
|
+
# Gets the extension properties for the specified HDInsight cluster extension.
|
|
313
|
+
#
|
|
314
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
315
|
+
# @param cluster_name [String] The name of the cluster.
|
|
316
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
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 get_with_http_info(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
323
|
+
get_async(resource_group_name, cluster_name, extension_name, custom_headers:custom_headers).value!
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
#
|
|
327
|
+
# Gets the extension properties for the specified HDInsight cluster extension.
|
|
328
|
+
#
|
|
329
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
330
|
+
# @param cluster_name [String] The name of the cluster.
|
|
331
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
332
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
333
|
+
# to the HTTP request.
|
|
334
|
+
#
|
|
335
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
336
|
+
#
|
|
337
|
+
def get_async(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
338
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
339
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
340
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
341
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
|
342
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
request_headers = {}
|
|
346
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
347
|
+
|
|
348
|
+
# Set Headers
|
|
349
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
350
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
351
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'
|
|
352
|
+
|
|
353
|
+
request_url = @base_url || @client.base_url
|
|
354
|
+
|
|
355
|
+
options = {
|
|
356
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
357
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'extensionName' => extension_name},
|
|
358
|
+
query_params: {'api-version' => @client.api_version},
|
|
359
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
360
|
+
base_url: request_url
|
|
361
|
+
}
|
|
362
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
363
|
+
|
|
364
|
+
promise = promise.then do |result|
|
|
365
|
+
http_response = result.response
|
|
366
|
+
status_code = http_response.status
|
|
367
|
+
response_content = http_response.body
|
|
368
|
+
unless status_code == 200
|
|
369
|
+
error_model = JSON.load(response_content)
|
|
370
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
374
|
+
# Deserialize Response
|
|
375
|
+
if status_code == 200
|
|
376
|
+
begin
|
|
377
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
378
|
+
result_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::Extension.mapper()
|
|
379
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
380
|
+
rescue Exception => e
|
|
381
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
result
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
promise.execute
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
#
|
|
392
|
+
# Deletes the specified extension for HDInsight cluster.
|
|
393
|
+
#
|
|
394
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
395
|
+
# @param cluster_name [String] The name of the cluster.
|
|
396
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
397
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
398
|
+
# will be added to the HTTP request.
|
|
399
|
+
#
|
|
400
|
+
#
|
|
401
|
+
def delete(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
402
|
+
response = delete_async(resource_group_name, cluster_name, extension_name, custom_headers:custom_headers).value!
|
|
403
|
+
nil
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
#
|
|
407
|
+
# Deletes the specified extension for HDInsight cluster.
|
|
408
|
+
#
|
|
409
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
410
|
+
# @param cluster_name [String] The name of the cluster.
|
|
411
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
412
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
413
|
+
# will be added to the HTTP request.
|
|
414
|
+
#
|
|
415
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
416
|
+
#
|
|
417
|
+
def delete_with_http_info(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
418
|
+
delete_async(resource_group_name, cluster_name, extension_name, custom_headers:custom_headers).value!
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
#
|
|
422
|
+
# Deletes the specified extension for HDInsight cluster.
|
|
423
|
+
#
|
|
424
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
425
|
+
# @param cluster_name [String] The name of the cluster.
|
|
426
|
+
# @param extension_name [String] The name of the cluster extension.
|
|
427
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
428
|
+
# to the HTTP request.
|
|
429
|
+
#
|
|
430
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
431
|
+
#
|
|
432
|
+
def delete_async(resource_group_name, cluster_name, extension_name, custom_headers:nil)
|
|
433
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
434
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
435
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
436
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
|
437
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
request_headers = {}
|
|
441
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
442
|
+
|
|
443
|
+
# Set Headers
|
|
444
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
445
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
446
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'
|
|
447
|
+
|
|
448
|
+
request_url = @base_url || @client.base_url
|
|
449
|
+
|
|
450
|
+
options = {
|
|
451
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
452
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'extensionName' => extension_name},
|
|
453
|
+
query_params: {'api-version' => @client.api_version},
|
|
454
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
455
|
+
base_url: request_url
|
|
456
|
+
}
|
|
457
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
458
|
+
|
|
459
|
+
promise = promise.then do |result|
|
|
460
|
+
http_response = result.response
|
|
461
|
+
status_code = http_response.status
|
|
462
|
+
response_content = http_response.body
|
|
463
|
+
unless status_code == 200 || status_code == 202
|
|
464
|
+
error_model = JSON.load(response_content)
|
|
465
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
469
|
+
|
|
470
|
+
result
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
promise.execute
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
#
|
|
477
|
+
# Enables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
478
|
+
#
|
|
479
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
480
|
+
# @param cluster_name [String] The name of the cluster.
|
|
481
|
+
# @param parameters [ClusterMonitoringRequest] The Operations Management Suite
|
|
482
|
+
# (OMS) workspace parameters.
|
|
483
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
484
|
+
# will be added to the HTTP request.
|
|
485
|
+
#
|
|
486
|
+
#
|
|
487
|
+
def begin_enable_monitoring(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
|
488
|
+
response = begin_enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
|
489
|
+
nil
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
#
|
|
493
|
+
# Enables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
494
|
+
#
|
|
495
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
496
|
+
# @param cluster_name [String] The name of the cluster.
|
|
497
|
+
# @param parameters [ClusterMonitoringRequest] The Operations Management Suite
|
|
498
|
+
# (OMS) workspace parameters.
|
|
499
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
500
|
+
# will be added to the HTTP request.
|
|
501
|
+
#
|
|
502
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
503
|
+
#
|
|
504
|
+
def begin_enable_monitoring_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
|
505
|
+
begin_enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
#
|
|
509
|
+
# Enables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
510
|
+
#
|
|
511
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
512
|
+
# @param cluster_name [String] The name of the cluster.
|
|
513
|
+
# @param parameters [ClusterMonitoringRequest] The Operations Management Suite
|
|
514
|
+
# (OMS) workspace parameters.
|
|
515
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
516
|
+
# to the HTTP request.
|
|
517
|
+
#
|
|
518
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
519
|
+
#
|
|
520
|
+
def begin_enable_monitoring_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
|
|
521
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
522
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
523
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
524
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
525
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
request_headers = {}
|
|
529
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
530
|
+
|
|
531
|
+
# Set Headers
|
|
532
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
533
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
534
|
+
|
|
535
|
+
# Serialize Request
|
|
536
|
+
request_mapper = Azure::Hdinsight::Mgmt::V2015_03_01_preview::Models::ClusterMonitoringRequest.mapper()
|
|
537
|
+
request_content = @client.serialize(request_mapper, parameters)
|
|
538
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
539
|
+
|
|
540
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'
|
|
541
|
+
|
|
542
|
+
request_url = @base_url || @client.base_url
|
|
543
|
+
|
|
544
|
+
options = {
|
|
545
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
546
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
|
547
|
+
query_params: {'api-version' => @client.api_version},
|
|
548
|
+
body: request_content,
|
|
549
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
550
|
+
base_url: request_url
|
|
551
|
+
}
|
|
552
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
553
|
+
|
|
554
|
+
promise = promise.then do |result|
|
|
555
|
+
http_response = result.response
|
|
556
|
+
status_code = http_response.status
|
|
557
|
+
response_content = http_response.body
|
|
558
|
+
unless status_code == 200 || status_code == 202
|
|
559
|
+
error_model = JSON.load(response_content)
|
|
560
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
564
|
+
|
|
565
|
+
result
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
promise.execute
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
#
|
|
572
|
+
# Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
573
|
+
#
|
|
574
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
575
|
+
# @param cluster_name [String] The name of the cluster.
|
|
576
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
577
|
+
# will be added to the HTTP request.
|
|
578
|
+
#
|
|
579
|
+
#
|
|
580
|
+
def begin_disable_monitoring(resource_group_name, cluster_name, custom_headers:nil)
|
|
581
|
+
response = begin_disable_monitoring_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
|
582
|
+
nil
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
#
|
|
586
|
+
# Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
587
|
+
#
|
|
588
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
589
|
+
# @param cluster_name [String] The name of the cluster.
|
|
590
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
591
|
+
# will be added to the HTTP request.
|
|
592
|
+
#
|
|
593
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
594
|
+
#
|
|
595
|
+
def begin_disable_monitoring_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
|
|
596
|
+
begin_disable_monitoring_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
#
|
|
600
|
+
# Disables the Operations Management Suite (OMS) on the HDInsight cluster.
|
|
601
|
+
#
|
|
602
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
603
|
+
# @param cluster_name [String] The name of the cluster.
|
|
604
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
605
|
+
# to the HTTP request.
|
|
606
|
+
#
|
|
607
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
608
|
+
#
|
|
609
|
+
def begin_disable_monitoring_async(resource_group_name, cluster_name, custom_headers:nil)
|
|
610
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
611
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
612
|
+
fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
|
|
613
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
request_headers = {}
|
|
617
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
618
|
+
|
|
619
|
+
# Set Headers
|
|
620
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
621
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
622
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'
|
|
623
|
+
|
|
624
|
+
request_url = @base_url || @client.base_url
|
|
625
|
+
|
|
626
|
+
options = {
|
|
627
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
628
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
|
|
629
|
+
query_params: {'api-version' => @client.api_version},
|
|
630
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
631
|
+
base_url: request_url
|
|
632
|
+
}
|
|
633
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
634
|
+
|
|
635
|
+
promise = promise.then do |result|
|
|
636
|
+
http_response = result.response
|
|
637
|
+
status_code = http_response.status
|
|
638
|
+
response_content = http_response.body
|
|
639
|
+
unless status_code == 200 || status_code == 202
|
|
640
|
+
error_model = JSON.load(response_content)
|
|
641
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
645
|
+
|
|
646
|
+
result
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
promise.execute
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
end
|
|
653
|
+
end
|