Class: Azure::Hanaonazure::Mgmt::V2017_11_03_preview::HanaInstances
- Inherits:
-
Object
- Object
- Azure::Hanaonazure::Mgmt::V2017_11_03_preview::HanaInstances
- Includes:
- MsRestAzure
- Defined in:
- lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb
Overview
HANA on Azure Client
Instance Attribute Summary collapse
-
#client ⇒ HanaManagementClient
readonly
Reference to the HanaManagementClient.
Instance Method Summary collapse
-
#begin_create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ HanaInstance
Creates a SAP HANA instance.
-
#begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ Concurrent::Promise
Creates a SAP HANA instance.
-
#begin_create_with_http_info(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a SAP HANA instance.
-
#begin_delete(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
Deletes a SAP HANA instance.
-
#begin_delete_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a SAP HANA instance.
-
#begin_delete_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a SAP HANA instance.
-
#begin_restart(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to restart a SAP HANA instance.
-
#begin_restart_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to restart a SAP HANA instance.
-
#begin_restart_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to restart a SAP HANA instance.
-
#begin_shutdown(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to shutdown a SAP HANA instance.
-
#begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to shutdown a SAP HANA instance.
-
#begin_shutdown_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to shutdown a SAP HANA instance.
-
#begin_start(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to start a SAP HANA instance.
-
#begin_start_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to start a SAP HANA instance.
-
#begin_start_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to start a SAP HANA instance.
-
#create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ HanaInstance
Creates a SAP HANA instance.
-
#create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ Concurrent::Promise
HanaInstance will be added to the HTTP request.
-
#delete(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
Deletes a SAP HANA instance.
-
#delete_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#get(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ HanaInstance
Gets properties of a SAP HANA instance.
-
#get_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets properties of a SAP HANA instance.
-
#get_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets properties of a SAP HANA instance.
-
#initialize(client) ⇒ HanaInstances
constructor
Creates and initializes a new instance of the HanaInstances class.
-
#list(custom_headers: nil) ⇒ Array<HanaInstance>
Gets a list of SAP HANA instances in the specified subscription.
-
#list_as_lazy(custom_headers: nil) ⇒ HanaInstancesListResult
Gets a list of SAP HANA instances in the specified subscription.
-
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SAP HANA instances in the specified subscription.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<HanaInstance>
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ HanaInstancesListResult
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ HanaInstancesListResult
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SAP HANA instances in the specified subscription and the resource group.
-
#list_next(next_page_link, custom_headers: nil) ⇒ HanaInstancesListResult
Gets a list of SAP HANA instances in the specified subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SAP HANA instances in the specified subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SAP HANA instances in the specified subscription.
-
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SAP HANA instances in the specified subscription.
-
#restart(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to restart a SAP HANA instance.
-
#restart_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#shutdown(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to shutdown a SAP HANA instance.
-
#shutdown_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#start(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to start a SAP HANA instance.
-
#start_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#update(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ HanaInstance
Patches the Tags field of a SAP HANA instance.
-
#update_async(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ Concurrent::Promise
Patches the Tags field of a SAP HANA instance.
-
#update_with_http_info(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Patches the Tags field of a SAP HANA instance.
Constructor Details
#initialize(client) ⇒ HanaInstances
Creates and initializes a new instance of the HanaInstances class.
17 18 19 |
# File 'lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ HanaManagementClient (readonly)
Returns reference to the HanaManagementClient.
22 23 24 |
# File 'lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ HanaInstance
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
HanaInstance will be added to the HTTP request.
663 664 665 666 |
# 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 |
#begin_create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ Concurrent::Promise
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
HanaInstance to the HTTP request.
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
# 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 = { 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, ) 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., 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., e.backtrace, result) end end result end promise.execute end |
#begin_create_with_http_info(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
HanaInstance will be added to the HTTP request.
683 684 685 |
# 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 |
#begin_delete(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
will be added to the HTTP request.
787 788 789 790 |
# 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 |
#begin_delete_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
to the HTTP request.
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
# 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 = { 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, ) 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 |
#begin_delete_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
will be added to the HTTP request.
805 806 807 |
# 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 |
#begin_restart(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to restart a SAP HANA instance.
will be added to the HTTP request.
876 877 878 879 |
# 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 |
#begin_restart_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to restart a SAP HANA instance.
to the HTTP request.
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# 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 = { 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, ) 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_restart_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to restart a SAP HANA instance.
will be added to the HTTP request.
891 892 893 |
# 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 |
#begin_shutdown(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to shutdown a SAP HANA instance.
will be added to the HTTP request.
1042 1043 1044 1045 |
# 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 |
#begin_shutdown_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to shutdown a SAP HANA instance.
to the HTTP request.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 |
# 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 = { 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, ) 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_shutdown_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to shutdown a SAP HANA instance.
will be added to the HTTP request.
1057 1058 1059 |
# 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 |
#begin_start(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to start a SAP HANA instance.
will be added to the HTTP request.
959 960 961 962 |
# 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 |
#begin_start_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
The operation to start a SAP HANA instance.
to the HTTP request.
988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# 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 = { 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, ) 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_start_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The operation to start a SAP HANA instance.
will be added to the HTTP request.
974 975 976 |
# 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 |
#create(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ HanaInstance
Creates a SAP HANA instance.
Creates a SAP HANA instance for the specified subscription, resource group, and instance name.
HanaInstance will be added to the HTTP request.
342 343 344 345 |
# 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 |
#create_async(resource_group_name, hana_instance_name, hana_instance_parameter, custom_headers: nil) ⇒ Concurrent::Promise
HanaInstance will be added to the HTTP request.
response.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# 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 |
#delete(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
Deletes a SAP HANA instance.
Deletes a SAP HANA instance with the specified subscription, resource group, and instance name.
will be added to the HTTP request.
387 388 389 390 |
# 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 |
#delete_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# 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 |
#get(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ HanaInstance
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
will be added to the HTTP request.
237 238 239 240 |
# 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 |
#get_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
to the HTTP request.
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets properties of a SAP HANA instance.
Gets properties of a SAP HANA instance for the specified subscription, resource group, and instance name.
will be added to the HTTP request.
255 256 257 |
# 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 |
#list(custom_headers: nil) ⇒ Array<HanaInstance>
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.
will be added to the HTTP request.
35 36 37 38 |
# 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 |
#list_as_lazy(custom_headers: nil) ⇒ HanaInstancesListResult
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.
will be added to the HTTP request.
response.
1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 |
# 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 |
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
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.
to the HTTP request.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<HanaInstance>
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.
will be added to the HTTP request.
133 134 135 136 |
# 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 |
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ HanaInstancesListResult
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.
will be added to the HTTP request.
response.
1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 |
# 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 |
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
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.
to the HTTP request.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ HanaInstancesListResult
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.
to List operation. will be added to the HTTP request.
1230 1231 1232 1233 |
# 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 |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
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.
to List operation. to the HTTP request.
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 |
# 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
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.
to List operation. will be added to the HTTP request.
1250 1251 1252 |
# 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 |
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
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.
will be added to the HTTP request.
152 153 154 |
# 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 |
#list_next(next_page_link, custom_headers: nil) ⇒ HanaInstancesListResult
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.
to List operation. will be added to the HTTP request.
1129 1130 1131 1132 |
# 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 |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
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.
to List operation. to the HTTP request.
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 |
# 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
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.
to List operation. will be added to the HTTP request.
1147 1148 1149 |
# 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 |
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
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.
will be added to the HTTP request.
51 52 53 |
# 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 |
#restart(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to restart a SAP HANA instance.
will be added to the HTTP request.
542 543 544 545 |
# 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 |
#restart_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# 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 |
#shutdown(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to shutdown a SAP HANA instance.
will be added to the HTTP request.
618 619 620 621 |
# 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 |
#shutdown_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
# 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 |
#start(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Object
The operation to start a SAP HANA instance.
will be added to the HTTP request.
580 581 582 583 |
# 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 |
#start_async(resource_group_name, hana_instance_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# 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 |
#update(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ HanaInstance
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.
field will be added to the HTTP request.
432 433 434 435 |
# File 'lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb', line 432 def update(resource_group_name, hana_instance_name, , custom_headers:nil) response = update_async(resource_group_name, hana_instance_name, , custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ Concurrent::Promise
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.
field to the HTTP request.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/2017-11-03-preview/generated/azure_mgmt_hanaonazure/hana_instances.rb', line 471 def update_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? fail ArgumentError, 'tags_parameter is nil' if .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, ) 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 = { 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, ) 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., e.backtrace, result) end end result end promise.execute end |
#update_with_http_info(resource_group_name, hana_instance_name, tags_parameter, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
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.
field will be added to the HTTP request.
452 453 454 |
# 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, , custom_headers:nil) update_async(resource_group_name, hana_instance_name, , custom_headers:custom_headers).value! end |