Class: Azure::Signalr::Mgmt::V2018_10_01::SignalR
- Inherits:
-
Object
- Object
- Azure::Signalr::Mgmt::V2018_10_01::SignalR
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb
Overview
REST API for Azure SignalR Service
Instance Attribute Summary collapse
-
#client ⇒ SignalRManagementClient
readonly
Reference to the SignalRManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Create a new SignalR service and update an exiting SignalR service.
-
#begin_create_or_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Create a new SignalR service and update an exiting SignalR service.
-
#begin_create_or_update_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create a new SignalR service and update an exiting SignalR service.
-
#begin_delete(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to delete a SignalR service.
-
#begin_delete_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Operation to delete a SignalR service.
-
#begin_delete_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to delete a SignalR service.
-
#begin_regenerate_key(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRKeys
Regenerate SignalR service access key.
-
#begin_regenerate_key_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Regenerate SignalR service access key.
-
#begin_regenerate_key_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerate SignalR service access key.
-
#begin_restart(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to restart a SignalR service.
-
#begin_restart_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Operation to restart a SignalR service.
-
#begin_restart_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to restart a SignalR service.
-
#begin_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Operation to update an exiting SignalR service.
-
#begin_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Operation to update an exiting SignalR service.
-
#begin_update_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to update an exiting SignalR service.
-
#check_name_availability(location, parameters: nil, custom_headers: nil) ⇒ NameAvailability
Checks that the SignalR name is valid and is not already in use.
-
#check_name_availability_async(location, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Checks that the SignalR name is valid and is not already in use.
-
#check_name_availability_with_http_info(location, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks that the SignalR name is valid and is not already in use.
-
#create_or_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Create a new SignalR service and update an exiting SignalR service.
-
#create_or_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#delete(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to delete a SignalR service.
-
#delete_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#get(resource_group_name, resource_name, custom_headers: nil) ⇒ SignalRResource
Get the SignalR service and its properties.
-
#get_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the SignalR service and its properties.
-
#get_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the SignalR service and its properties.
-
#initialize(client) ⇒ SignalR
constructor
Creates and initializes a new instance of the SignalR class.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<SignalRResource>
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a resource group.
-
#list_by_subscription(custom_headers: nil) ⇒ Array<SignalRResource>
Handles requests to list all resources in a subscription.
-
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a subscription.
-
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a subscription.
-
#list_by_subscription_next(next_page_link, custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a subscription.
-
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a subscription.
-
#list_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a subscription.
-
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a subscription.
-
#list_keys(resource_group_name, resource_name, custom_headers: nil) ⇒ SignalRKeys
Get the access keys of the SignalR resource.
-
#list_keys_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the access keys of the SignalR resource.
-
#list_keys_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the access keys of the SignalR resource.
-
#regenerate_key(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRKeys
Regenerate SignalR service access key.
-
#regenerate_key_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#restart(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to restart a SignalR service.
-
#restart_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
-
#update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Operation to update an exiting SignalR service.
-
#update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource.
Constructor Details
#initialize(client) ⇒ SignalR
Creates and initializes a new instance of the SignalR class.
17 18 19 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ SignalRManagementClient (readonly)
Returns reference to the SignalRManagementClient.
22 23 24 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Create a new SignalR service and update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. update operation will be added to the HTTP request.
874 875 876 877 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 874 def begin_create_or_update(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Create a new SignalR service and update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. update operation to the HTTP request.
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 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 911 def begin_create_or_update_async(resource_group_name, resource_name, parameters:nil, 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, 'resource_name is nil' if resource_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? # Serialize Request request_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRCreateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}' 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,'resourceName' => resource_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 || 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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_or_update_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create a new SignalR service and update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. update operation will be added to the HTTP request.
893 894 895 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 893 def begin_create_or_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to delete a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
994 995 996 997 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 994 def begin_delete(resource_group_name, resource_name, custom_headers:nil) response = begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Operation to delete a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1027 def begin_delete_async(resource_group_name, resource_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, 'resource_name is nil' if resource_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.SignalRService/signalR/{resourceName}' 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,'resourceName' => resource_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 == 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, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to delete a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
1011 1012 1013 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1011 def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers:nil) begin_delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value! end |
#begin_regenerate_key(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRKeys
Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Regenerate Key Operation. will be added to the HTTP request.
759 760 761 762 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 759 def begin_regenerate_key(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = begin_regenerate_key_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_regenerate_key_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Regenerate Key Operation. to the HTTP request.
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 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 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 798 def begin_regenerate_key_async(resource_group_name, resource_name, parameters:nil, 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, 'resource_name is nil' if resource_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? # Serialize Request request_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::RegenerateKeyParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey' 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,'resourceName' => resource_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless 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 == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRKeys.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_regenerate_key_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Regenerate Key Operation. will be added to the HTTP request.
779 780 781 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 779 def begin_regenerate_key_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_regenerate_key_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end |
#begin_restart(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to restart a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
1196 1197 1198 1199 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1196 def begin_restart(resource_group_name, resource_name, custom_headers:nil) response = begin_restart_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end |
#begin_restart_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Operation to restart a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1229 def begin_restart_async(resource_group_name, resource_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, 'resource_name is nil' if resource_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.SignalRService/signalR/{resourceName}/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,'resourceName' => resource_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 == 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_restart_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to restart a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
1213 1214 1215 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1213 def begin_restart_with_http_info(resource_group_name, resource_name, custom_headers:nil) begin_restart_async(resource_group_name, resource_name, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Operation to update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. operation will be added to the HTTP request.
1086 1087 1088 1089 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1086 def begin_update(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = begin_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Operation to update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. operation to the HTTP request.
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1123 def begin_update_async(resource_group_name, resource_name, parameters:nil, 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, 'resource_name is nil' if resource_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? # Serialize Request request_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRUpdateParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}' 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,'resourceName' => resource_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 || 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? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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_update_with_http_info(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Operation to update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. operation will be added to the HTTP request.
1105 1106 1107 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1105 def begin_update_with_http_info(resource_group_name, resource_name, parameters:nil, custom_headers:nil) begin_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! end |
#check_name_availability(location, parameters: nil, custom_headers: nil) ⇒ NameAvailability
Checks that the SignalR name is valid and is not already in use.
operation. will be added to the HTTP request.
35 36 37 38 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 35 def check_name_availability(location, parameters:nil, custom_headers:nil) response = check_name_availability_async(location, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_name_availability_async(location, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Checks that the SignalR name is valid and is not already in use.
operation. 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 118 119 120 121 122 123 124 125 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 66 def check_name_availability_async(location, parameters:nil, custom_headers:nil) fail ArgumentError, 'location is nil' if location.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? # Serialize Request request_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::NameAvailabilityParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/checkNameAvailability' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'location' => location,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) 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::Signalr::Mgmt::V2018_10_01::Models::NameAvailability.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 |
#check_name_availability_with_http_info(location, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks that the SignalR name is valid and is not already in use.
operation. will be added to the HTTP request.
51 52 53 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 51 def check_name_availability_with_http_info(location, parameters:nil, custom_headers:nil) check_name_availability_async(location, parameters:parameters, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Create a new SignalR service and update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. update operation will be added to the HTTP request.
574 575 576 577 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 574 def create_or_update(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. update operation will be added to the HTTP request.
response.
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 592 def create_or_update_async(resource_group_name, resource_name, parameters:nil, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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, resource_name, custom_headers: nil) ⇒ Object
Operation to delete a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
620 621 622 623 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 620 def delete(resource_group_name, resource_name, custom_headers:nil) response = delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
response.
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 636 def delete_async(resource_group_name, resource_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, resource_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, resource_name, custom_headers: nil) ⇒ SignalRResource
Get the SignalR service and its properties.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
472 473 474 475 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 472 def get(resource_group_name, resource_name, custom_headers:nil) response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the SignalR service and its properties.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.
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 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 505 def get_async(resource_group_name, resource_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, 'resource_name is nil' if resource_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.SignalRService/signalR/{resourceName}' 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,'resourceName' => resource_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::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the SignalR service and its properties.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
489 490 491 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 489 def get_with_http_info(resource_group_name, resource_name, custom_headers:nil) get_async(resource_group_name, resource_name, custom_headers:custom_headers).value! end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<SignalRResource>
Handles requests to list all resources in a resource group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
224 225 226 227 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 224 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) ⇒ SignalRResourceList
Handles requests to list all resources in a resource group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
response.
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1486 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
Handles requests to list all resources in a resource group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 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 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 255 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.SignalRService/SignalR' 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::Signalr::Mgmt::V2018_10_01::Models::SignalRResourceList.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) ⇒ SignalRResourceList
Handles requests to list all resources in a resource group.
to List operation. will be added to the HTTP request.
1374 1375 1376 1377 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1374 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
Handles requests to list all resources in a resource group.
to List operation. to the HTTP request.
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1403 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::Signalr::Mgmt::V2018_10_01::Models::SignalRResourceList.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
Handles requests to list all resources in a resource group.
to List operation. will be added to the HTTP request.
1389 1390 1391 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1389 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
Handles requests to list all resources in a resource group.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
240 241 242 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 240 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_by_subscription(custom_headers: nil) ⇒ Array<SignalRResource>
Handles requests to list all resources in a subscription.
will be added to the HTTP request.
135 136 137 138 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 135 def list_by_subscription(custom_headers:nil) first_page = list_by_subscription_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_by_subscription_as_lazy(custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a subscription.
will be added to the HTTP request.
response.
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1463 def list_by_subscription_as_lazy(custom_headers:nil) response = list_by_subscription_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a subscription.
to the HTTP request.
160 161 162 163 164 165 166 167 168 169 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 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 160 def list_by_subscription_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.SignalRService/SignalR' 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::Signalr::Mgmt::V2018_10_01::Models::SignalRResourceList.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_subscription_next(next_page_link, custom_headers: nil) ⇒ SignalRResourceList
Handles requests to list all resources in a subscription.
to List operation. will be added to the HTTP request.
1284 1285 1286 1287 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1284 def list_by_subscription_next(next_page_link, custom_headers:nil) response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Handles requests to list all resources in a subscription.
to List operation. to the HTTP request.
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1313 def list_by_subscription_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::Signalr::Mgmt::V2018_10_01::Models::SignalRResourceList.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_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a subscription.
to List operation. will be added to the HTTP request.
1299 1300 1301 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 1299 def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Handles requests to list all resources in a subscription.
will be added to the HTTP request.
148 149 150 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 148 def list_by_subscription_with_http_info(custom_headers:nil) list_by_subscription_async(custom_headers:custom_headers).value! end |
#list_keys(resource_group_name, resource_name, custom_headers: nil) ⇒ SignalRKeys
Get the access keys of the SignalR resource.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
321 322 323 324 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 321 def list_keys(resource_group_name, resource_name, custom_headers:nil) response = list_keys_async(resource_group_name, resource_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_keys_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the access keys of the SignalR resource.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. to the HTTP request.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 354 def list_keys_async(resource_group_name, resource_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, 'resource_name is nil' if resource_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.SignalRService/SignalR/{resourceName}/listKeys' 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,'resourceName' => resource_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 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::Signalr::Mgmt::V2018_10_01::Models::SignalRKeys.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_keys_with_http_info(resource_group_name, resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the access keys of the SignalR resource.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
338 339 340 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 338 def list_keys_with_http_info(resource_group_name, resource_name, custom_headers:nil) list_keys_async(resource_group_name, resource_name, custom_headers:custom_headers).value! end |
#regenerate_key(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRKeys
Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Regenerate Key Operation. will be added to the HTTP request.
424 425 426 427 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 424 def regenerate_key(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = regenerate_key_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#regenerate_key_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. Regenerate Key Operation. will be added to the HTTP request.
response.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 442 def regenerate_key_async(resource_group_name, resource_name, parameters:nil, custom_headers:nil) # Send request promise = begin_regenerate_key_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRKeys.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#restart(resource_group_name, resource_name, custom_headers: nil) ⇒ Object
Operation to restart a SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
712 713 714 715 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 712 def restart(resource_group_name, resource_name, custom_headers:nil) response = restart_async(resource_group_name, resource_name, custom_headers:custom_headers).value! nil end |
#restart_async(resource_group_name, resource_name, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. will be added to the HTTP request.
response.
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 728 def restart_async(resource_group_name, resource_name, custom_headers:nil) # Send request promise = begin_restart_async(resource_group_name, resource_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, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#update(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ SignalRResource
Operation to update an exiting SignalR service.
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. operation will be added to the HTTP request.
666 667 668 669 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 666 def update(resource_group_name, resource_name, parameters:nil, custom_headers:nil) response = update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, resource_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. operation will be added to the HTTP request.
response.
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 |
# File 'lib/2018-10-01/generated/azure_mgmt_signalr/signal_r.rb', line 684 def update_async(resource_group_name, resource_name, parameters:nil, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, resource_name, parameters:parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Signalr::Mgmt::V2018_10_01::Models::SignalRResource.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 |