class Azure::Hanaonazure::Mgmt::V2017_11_03_preview::HanaInstances
HANA on Azure
Client
Attributes
@return [HanaManagementClient] reference to the HanaManagementClient
Private Class Methods
Creates and initializes a new instance of the HanaInstances
class. @param client service class for accessing basic functionality.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param hana_instance_parameter [HanaInstance] Request body representing a HanaInstance @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HanaInstance] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 663 def begin_create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil) response = begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value! response.body unless response.nil? end
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param hana_instance_parameter [HanaInstance] Request body representing a HanaInstance @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 702 def begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.nil? fail ArgumentError, 'hana_instance_parameter is nil' if hana_instance_parameter.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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.mapper() request_content = @client.serialize(request_mapper, hana_instance_parameter) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}' 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,'hanaInstanceName' => hana_instance_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 || status_code == 201 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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.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 # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.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
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param hana_instance_parameter [HanaInstance] Request body representing a HanaInstance @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 683 def begin_create_with_http_info(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil) begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value! end
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 787 def begin_delete(resource_group_name, hana_instance_name, custom_headers:nil) response = begin_delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 822 def begin_delete_async(resource_group_name, hana_instance_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.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.HanaOnAzure/hanaInstances/{hanaInstanceName}' 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,'hanaInstanceName' => hana_instance_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 == 200 || status_code == 202 || 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
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 805 def begin_delete_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil) begin_delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! end
The operation to restart a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 876 def begin_restart(resource_group_name, hana_instance_name, custom_headers:nil) response = begin_restart_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
The operation to restart a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 905 def begin_restart_async(resource_group_name, hana_instance_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.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.HanaOnAzure/hanaInstances/{hanaInstanceName}/restart' 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,'hanaInstanceName' => hana_instance_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 || 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
The operation to restart a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 891 def begin_restart_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil) begin_restart_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! end
The operation to shutdown a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1042 def begin_shutdown(resource_group_name, hana_instance_name, custom_headers:nil) response = begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
The operation to shutdown a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1071 def begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.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.HanaOnAzure/hanaInstances/{hanaInstanceName}/shutdown' 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,'hanaInstanceName' => hana_instance_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 || 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
The operation to shutdown a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1057 def begin_shutdown_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil) begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! end
The operation to start a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 959 def begin_start(resource_group_name, hana_instance_name, custom_headers:nil) response = begin_start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
The operation to start a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 988 def begin_start_async(resource_group_name, hana_instance_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.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.HanaOnAzure/hanaInstances/{hanaInstanceName}/start' 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,'hanaInstanceName' => hana_instance_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 || 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
The operation to start a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 974 def begin_start_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil) begin_start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! end
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param hana_instance_parameter [HanaInstance] Request body representing a HanaInstance @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HanaInstance] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 342 def create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil) response = create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers).value! response.body unless response.nil? end
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param hana_instance_parameter [HanaInstance] Request body representing a HanaInstance @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 358 def create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.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
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 387 def delete(resource_group_name, hana_instance_name, custom_headers:nil) response = delete_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 401 def delete_async(resource_group_name, hana_instance_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, hana_instance_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
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HanaInstance] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 237 def get(resource_group_name, hana_instance_name, custom_headers:nil) response = get_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 272 def get_async(resource_group_name, hana_instance_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.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.HanaOnAzure/hanaInstances/{hanaInstanceName}' 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,'hanaInstanceName' => hana_instance_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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.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
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 255 def get_with_http_info(resource_group_name, hana_instance_name, custom_headers:nil) get_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! end
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<HanaInstance>] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 35 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HanaInstancesListResult] which provide lazy access to pages of the response.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1332 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
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 66 def list_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_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}/providers/Microsoft.HanaOnAzure/hanaInstances' 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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstancesListResult.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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@param resource_group_name [String] 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<HanaInstance>] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 133 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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@param resource_group_name [String] 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 [HanaInstancesListResult] which provide lazy access to pages of the response.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1358 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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@param resource_group_name [String] 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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 170 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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? 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.HanaOnAzure/hanaInstances' 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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstancesListResult.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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@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 [HanaInstancesListResult] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1230 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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1269 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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstancesListResult.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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1250 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
Gets a list of SAP HANA instances in the specified subscription and the resource group.
Gets a list of SAP HANA instances in the specified subscription and the resource group. The operations returns various properties of each SAP HANA on Azure
instance.
@param resource_group_name [String] 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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 152 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
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@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 [HanaInstancesListResult] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1129 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
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1164 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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstancesListResult.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
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 1147 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end
Gets a list of SAP HANA instances in the specified subscription.
Gets a list of SAP HANA instances in the specified subscription. The operations returns various properties of each SAP HANA on Azure
instance.
@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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 51 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end
The operation to restart a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 542 def restart(resource_group_name, hana_instance_name, custom_headers:nil) response = restart_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 556 def restart_async(resource_group_name, hana_instance_name, custom_headers:nil) # Send request promise = begin_restart_async(resource_group_name, hana_instance_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
The operation to shutdown a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 618 def shutdown(resource_group_name, hana_instance_name, custom_headers:nil) response = shutdown_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 632 def shutdown_async(resource_group_name, hana_instance_name, custom_headers:nil) # Send request promise = begin_shutdown_async(resource_group_name, hana_instance_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
The operation to start a SAP HANA instance.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 580 def start(resource_group_name, hana_instance_name, custom_headers:nil) response = start_async(resource_group_name, hana_instance_name, custom_headers:custom_headers).value! nil end
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 594 def start_async(resource_group_name, hana_instance_name, custom_headers:nil) # Send request promise = begin_start_async(resource_group_name, hana_instance_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
Patches the Tags field of a SAP HANA instance.
Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param tags_parameter [Tags] Request body that only contains the new Tags field @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [HanaInstance] operation results.
# File lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 432 def update(resource_group_name, hana_instance_name, tags_parameter, custom_headers:nil) response = update_async(resource_group_name, hana_instance_name, tags_parameter, custom_headers:custom_headers).value! response.body unless response.nil? end
Patches the Tags field of a SAP HANA instance.
Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param tags_parameter [Tags] Request body that only contains the new Tags field @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 471 def update_async(resource_group_name, hana_instance_name, tags_parameter, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.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, 'hana_instance_name is nil' if hana_instance_name.nil? fail ArgumentError, 'tags_parameter is nil' if tags_parameter.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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::Tags.mapper() request_content = @client.serialize(request_mapper, tags_parameter) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/hanaInstances/{hanaInstanceName}' 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,'hanaInstanceName' => hana_instance_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::Hanaonazure::Mgmt::V2017_11_03_preview::Models::HanaInstance.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
Patches the Tags field of a SAP HANA instance.
Patches the Tags field of a SAP HANA instance for the specified subscription, resource group, and instance name.
@param resource_group_name [String] Name of the resource group. @param hana_instance_name [String] Name of the SAP HANA on Azure
instance. @param tags_parameter [Tags] Request body that only contains the new Tags field @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/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb, line 452 def update_with_http_info(resource_group_name, hana_instance_name, tags_parameter, custom_headers:nil) update_async(resource_group_name, hana_instance_name, tags_parameter, custom_headers:custom_headers).value! end