class Azure::Hdinsight::Mgmt::V2018_06_01_preview::Clusters

HDInsight Management Client

Attributes

client[R]

@return [HDInsightManagementClient] reference to the HDInsightManagementClient

Private Class Methods

new(client) click to toggle source

Creates and initializes a new instance of the Clusters class. @param client service class for accessing basic functionality.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 17
def initialize(client)
  @client = client
end

Private Instance Methods

begin_create(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Creates a new HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterCreateParametersExtended] The cluster create request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Cluster] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 897
def begin_create(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Creates a new HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterCreateParametersExtended] The cluster create request. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 930
def begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterCreateParametersExtended.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::Cluster.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Creates a new HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterCreateParametersExtended] The cluster create request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 914
def begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
begin_delete(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Deletes the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1002
def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
  response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  nil
end
begin_delete_async(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Deletes the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1031
def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 202 || status_code == 200 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Deletes the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1017
def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
  begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
end
begin_execute_script_actions(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Executes script actions on the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ExecuteScriptActionParameters] The parameters for executing script actions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1477
def begin_execute_script_actions(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
begin_execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Executes script actions on the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ExecuteScriptActionParameters] The parameters for executing script actions. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1510
def begin_execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ExecuteScriptActionParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 202 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_execute_script_actions_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Executes script actions on the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ExecuteScriptActionParameters] The parameters for executing script actions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1494
def begin_execute_script_actions_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
begin_resize(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Resizes the specified HDInsight cluster to the specified size.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterResizeParameters] The parameters for the resize operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1087
def begin_resize(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_resize_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
begin_resize_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Resizes the specified HDInsight cluster to the specified size.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterResizeParameters] The parameters for the resize operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1120
def begin_resize_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  role_name = 'workernode'
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterResizeParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'roleName' => role_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_resize_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Resizes the specified HDInsight cluster to the specified size.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterResizeParameters] The parameters for the resize operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1104
def begin_resize_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_resize_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
begin_rotate_disk_encryption_key(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Rotate disk encryption key of the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterDiskEncryptionParameters] The parameters for the disk encryption operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1283
def begin_rotate_disk_encryption_key(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
begin_rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Rotate disk encryption key of the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterDiskEncryptionParameters] The parameters for the disk encryption operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1316
def begin_rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterDiskEncryptionParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_rotate_disk_encryption_key_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Rotate disk encryption key of the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterDiskEncryptionParameters] The parameters for the disk encryption operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1300
def begin_rotate_disk_encryption_key_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
begin_update_auto_scale_configuration(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Updates the Autoscale Configuration for HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [AutoscaleConfigurationUpdateParameter] The parameters for the update autoscale configuration operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1185
def begin_update_auto_scale_configuration(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
begin_update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Updates the Autoscale Configuration for HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [AutoscaleConfigurationUpdateParameter] The parameters for the update autoscale configuration operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1218
def begin_update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  role_name = 'workernode'
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::AutoscaleConfigurationUpdateParameter.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'roleName' => role_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_update_auto_scale_configuration_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Updates the Autoscale Configuration for HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [AutoscaleConfigurationUpdateParameter] The parameters for the update autoscale configuration operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1202
def begin_update_auto_scale_configuration_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
begin_update_gateway_settings(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Configures the gateway settings on the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [UpdateGatewaySettingsParameters] The cluster configurations. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1380
def begin_update_gateway_settings(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = begin_update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
begin_update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Configures the gateway settings on the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [UpdateGatewaySettingsParameters] The cluster configurations. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1413
def begin_update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::UpdateGatewaySettingsParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateGatewaySettings'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end
begin_update_gateway_settings_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Configures the gateway settings on the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [UpdateGatewaySettingsParameters] The cluster configurations. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1397
def begin_update_gateway_settings_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  begin_update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end
create(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Creates a new HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterCreateParametersExtended] The cluster create request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Cluster] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 36
def create(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
create_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterCreateParametersExtended] The cluster create request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 52
def create_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::Cluster.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
delete(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Deletes the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 183
def delete(resource_group_name, cluster_name, custom_headers:nil)
  response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  nil
end
delete_async(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 197
def delete_async(resource_group_name, cluster_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
execute_script_actions(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Executes script actions on the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ExecuteScriptActionParameters] The parameters for executing script actions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 853
def execute_script_actions(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ExecuteScriptActionParameters] The parameters for executing script actions. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 869
def execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_execute_script_actions_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
get(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Cluster] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 223
def get(resource_group_name, cluster_name, custom_headers:nil)
  response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_async(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 252
def get_async(resource_group_name, cluster_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::Cluster.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_azure_async_operation_status(resource_group_name, cluster_name, operation_id, custom_headers:nil) click to toggle source

The the async operation status.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param operation_id [String] The long running operation id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [AsyncOperationResult] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 756
def get_azure_async_operation_status(resource_group_name, cluster_name, operation_id, custom_headers:nil)
  response = get_azure_async_operation_status_async(resource_group_name, cluster_name, operation_id, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_azure_async_operation_status_async(resource_group_name, cluster_name, operation_id, custom_headers:nil) click to toggle source

The the async operation status.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param operation_id [String] The long running operation id. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 787
def get_azure_async_operation_status_async(resource_group_name, cluster_name, operation_id, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'operation_id is nil' if operation_id.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/azureasyncoperations/{operationId}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'operationId' => operation_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::AsyncOperationResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_azure_async_operation_status_with_http_info(resource_group_name, cluster_name, operation_id, custom_headers:nil) click to toggle source

The the async operation status.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param operation_id [String] The long running operation id. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 772
def get_azure_async_operation_status_with_http_info(resource_group_name, cluster_name, operation_id, custom_headers:nil)
  get_azure_async_operation_status_async(resource_group_name, cluster_name, operation_id, custom_headers:custom_headers).value!
end
get_gateway_settings(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the gateway settings for the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [GatewaySettings] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 619
def get_gateway_settings(resource_group_name, cluster_name, custom_headers:nil)
  response = get_gateway_settings_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
get_gateway_settings_async(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the gateway settings for the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 648
def get_gateway_settings_async(resource_group_name, cluster_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/getGatewaySettings'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::GatewaySettings.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
get_gateway_settings_with_http_info(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the gateway settings for the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 634
def get_gateway_settings_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
  get_gateway_settings_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
end
get_with_http_info(resource_group_name, cluster_name, custom_headers:nil) click to toggle source

Gets the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 238
def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
  get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
end
list(custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<Cluster>] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 489
def list(custom_headers:nil)
  first_page = list_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end
list_as_lazy(custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterListResult] which provide lazy access to pages of the response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1773
def list_as_lazy(custom_headers:nil)
  response = list_async(custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_async(custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 514
def list_async(custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_by_resource_group(resource_group_name, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param resource_group_name [String] The name of the resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Array<Cluster>] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 316
def list_by_resource_group(resource_group_name, custom_headers:nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
  first_page.get_all_items
end
list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param resource_group_name [String] The name of the resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterListResult] which provide lazy access to pages of the response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1753
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
  response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end
list_by_resource_group_async(resource_group_name, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param resource_group_name [String] The name of the resource group. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 343
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_by_resource_group_next(next_page_link, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterListResult] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1573
def list_by_resource_group_next(next_page_link, custom_headers:nil)
  response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_by_resource_group_next_async(next_page_link, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1602
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1588
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) click to toggle source

Lists the HDInsight clusters in a resource group.

@param resource_group_name [String] The name of the resource group. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 330
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
  list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
end
list_next(next_page_link, custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [ClusterListResult] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1663
def list_next(next_page_link, custom_headers:nil)
  response = list_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
list_next_async(next_page_link, custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1692
def list_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
list_next_with_http_info(next_page_link, custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 1678
def list_next_with_http_info(next_page_link, custom_headers:nil)
  list_next_async(next_page_link, custom_headers:custom_headers).value!
end
list_with_http_info(custom_headers:nil) click to toggle source

Lists all the HDInsight clusters under the subscription.

@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 502
def list_with_http_info(custom_headers:nil)
  list_async(custom_headers:custom_headers).value!
end
resize(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Resizes the specified HDInsight cluster to the specified size.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterResizeParameters] The parameters for the resize operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 407
def resize(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = resize_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
resize_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterResizeParameters] The parameters for the resize operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 423
def resize_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_resize_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
rotate_disk_encryption_key(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Rotate disk encryption key of the specified HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterDiskEncryptionParameters] The parameters for the disk encryption operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 577
def rotate_disk_encryption_key(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterDiskEncryptionParameters] The parameters for the disk encryption operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 593
def rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_rotate_disk_encryption_key_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
update(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Patch HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterPatchParameters] The cluster patch request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Cluster] operation results.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 81
def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end
update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Patch HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterPatchParameters] The cluster patch request. @param [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] Promise object which holds the HTTP response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 112
def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?


  request_headers = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::ClusterPatchParameters.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'clusterName' => cluster_name},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:patch, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Hdinsight::Mgmt::V2018_06_01_preview::Models::Cluster.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end
update_auto_scale_configuration(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Updates the Autoscale Configuration for HDInsight cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [AutoscaleConfigurationUpdateParameter] The parameters for the update autoscale configuration operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 449
def update_auto_scale_configuration(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [AutoscaleConfigurationUpdateParameter] The parameters for the update autoscale configuration operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 465
def update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_update_auto_scale_configuration_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
update_gateway_settings(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Configures the gateway settings on the specified cluster.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [UpdateGatewaySettingsParameters] The cluster configurations. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 713
def update_gateway_settings(resource_group_name, cluster_name, parameters, custom_headers:nil)
  response = update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
  nil
end
update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [UpdateGatewaySettingsParameters] The cluster configurations. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [Concurrent::Promise] promise which provides async access to http response.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 729
def update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_update_gateway_settings_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end
update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) click to toggle source

Patch HDInsight cluster with the specified parameters.

@param resource_group_name [String] The name of the resource group. @param cluster_name [String] The name of the cluster. @param parameters [ClusterPatchParameters] The cluster patch request. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.

@return [MsRestAzure::AzureOperationResponse] HTTP response information.

# File lib/2018-06-01-preview/generated/azure_mgmt_hdinsight/clusters.rb, line 97
def update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
  update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
end