Class: Azure::BatchAI::Mgmt::V2017_09_01_preview::Clusters
- Inherits:
-
Object
- Object
- Azure::BatchAI::Mgmt::V2017_09_01_preview::Clusters
- Includes:
- MsRestAzure
- Defined in:
- lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb
Overview
The Azure BatchAI Management API.
Instance Attribute Summary collapse
-
#client ⇒ BatchAIManagementClient
readonly
Reference to the BatchAIManagementClient.
Instance Method Summary collapse
-
#begin_create(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Adds a cluster.
-
#begin_create_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a cluster.
-
#begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a cluster.
-
#begin_delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Cluster.
-
#begin_delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Cluster.
-
#begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Cluster.
-
#create(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Adds a cluster.
-
#create_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Cluster.
-
#delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#get(resource_group_name, cluster_name, custom_headers: nil) ⇒ Cluster
Gets information about the specified Cluster.
-
#get_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the specified Cluster.
-
#get_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the specified Cluster.
-
#initialize(client) ⇒ Clusters
constructor
Creates and initializes a new instance of the Clusters class.
-
#list(clusters_list_options: nil, custom_headers: nil) ⇒ Array<Cluster>
Gets information about the Clusters associated with the subscription.
-
#list_as_lazy(clusters_list_options: nil, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated with the subscription.
-
#list_async(clusters_list_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated with the subscription.
-
#list_by_resource_group(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Array<Cluster>
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated within the specified resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated within the specified resource group.
-
#list_next(next_page_link, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated with the subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated with the subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated with the subscription.
-
#list_remote_login_information(resource_group_name, cluster_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_next(next_page_link, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the IP address, port of all the compute nodes in the cluster.
-
#list_remote_login_information_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the IP address, port of all the compute nodes in the cluster.
-
#list_with_http_info(clusters_list_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated with the subscription.
-
#update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update the properties of a given cluster.
-
#update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update the properties of a given cluster.
-
#update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the properties of a given cluster.
Constructor Details
#initialize(client) ⇒ Clusters
Creates and initializes a new instance of the Clusters class.
17 18 19 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ BatchAIManagementClient (readonly)
Returns reference to the BatchAIManagementClient.
22 23 24 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can be run on the same cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. cluster creation. will be added to the HTTP request.
705 706 707 708 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 705 def begin_create(resource_group_name, cluster_name, parameters, custom_headers:nil) response = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can be run on the same cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. cluster creation. to the HTTP request.
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 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 748 def begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterCreateParameters.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.BatchAI/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'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(: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 == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can be run on the same cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. cluster creation. will be added to the HTTP request.
727 728 729 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 727 def begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
828 829 830 831 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 828 def begin_delete(resource_group_name, cluster_name, custom_headers:nil) response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. to the HTTP request.
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 865 def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).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}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'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(: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 MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
847 848 849 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 847 def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil) begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#create(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can be run on the same cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. cluster creation. will be added to the HTTP request.
41 42 43 44 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 41 def create(resource_group_name, cluster_name, parameters, custom_headers:nil) response = create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. cluster creation. will be added to the HTTP request.
response.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 61 def create_async(resource_group_name, cluster_name, parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::BatchAI::Mgmt::V2017_09_01_preview::Models::Cluster.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, cluster_name, custom_headers: nil) ⇒ Object
Deletes a Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
215 216 217 218 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 215 def delete(resource_group_name, cluster_name, custom_headers:nil) response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
response.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 233 def delete_async(resource_group_name, cluster_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, cluster_name, custom_headers: nil) ⇒ Cluster
Gets information about the specified Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
263 264 265 266 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 263 def get(resource_group_name, cluster_name, custom_headers:nil) response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the specified Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. to the HTTP request.
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 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 300 def get_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).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}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the specified Cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
282 283 284 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 282 def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil) get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#list(clusters_list_options: nil, custom_headers: nil) ⇒ Array<Cluster>
Gets information about the Clusters associated with the subscription.
the operation will be added to the HTTP request.
479 480 481 482 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 479 def list(clusters_list_options:nil, custom_headers:nil) first_page = list_as_lazy(clusters_list_options:, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(clusters_list_options: nil, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated with the subscription.
the operation will be added to the HTTP request.
response.
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1224 def list_as_lazy(clusters_list_options:nil, custom_headers:nil) response = list_async(clusters_list_options:, 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(clusters_list_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated with the subscription.
the operation to the HTTP request.
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 559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 508 def list_async(clusters_list_options: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? filter = nil select = nil max_results = nil unless .nil? filter = .filter end unless .nil? select = .select end unless .nil? max_results = .maxResults end 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.BatchAI/clusters' 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,'$filter' => filter,'$select' => select,'maxresults' => max_results}, 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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Array<Cluster>
Gets information about the Clusters associated within the specified resource group.
resource belongs.
- ClustersListByResourceGroupOptions
-
Additional parameters for the operation
will be added to the HTTP request.
586 587 588 589 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 586 def list_by_resource_group(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated within the specified resource group.
resource belongs.
- ClustersListByResourceGroupOptions
-
Additional parameters for the operation
will be added to the HTTP request.
response.
1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1249 def list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:, 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, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Clusters associated within the specified resource group.
resource belongs.
- ClustersListByResourceGroupOptions
-
Additional parameters for the operation
to the HTTP request.
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 621 def list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).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? filter = nil select = nil max_results = nil unless .nil? filter = .filter end unless .nil? select = .select end unless .nil? max_results = .maxResults end 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.BatchAI/clusters' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'maxresults' => max_results}, 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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated within the specified resource group.
to List operation. will be added to the HTTP request.
1105 1106 1107 1108 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1105 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 information about the Clusters associated within the specified resource group.
to List operation. to the HTTP request.
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 1184 1185 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1136 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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., 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 information about the Clusters associated within the specified resource group.
to List operation. will be added to the HTTP request.
1121 1122 1123 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1121 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, clusters_list_by_resource_group_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated within the specified resource group.
resource belongs.
- ClustersListByResourceGroupOptions
-
Additional parameters for the operation
will be added to the HTTP request.
604 605 606 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 604 def list_by_resource_group_with_http_info(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ ClusterListResult
Gets information about the Clusters associated with the subscription.
to List operation. will be added to the HTTP request.
1014 1015 1016 1017 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1014 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 information about the Clusters associated with the subscription.
to List operation. to the HTTP request.
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 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1043 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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated with the subscription.
to List operation. will be added to the HTTP request.
1029 1030 1031 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1029 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_remote_login_information(resource_group_name, cluster_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Get the IP address, port of all the compute nodes in the cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
373 374 375 376 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 373 def list_remote_login_information(resource_group_name, cluster_name, custom_headers:nil) first_page = list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Get the IP address, port of all the compute nodes in the cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
of the response.
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 1202 def list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers:nil) response = list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_remote_login_information_async(resource_group_name, cluster_name, custom_headers: nil) ⇒ Concurrent::Promise
Get the IP address, port of all the compute nodes in the cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. to the HTTP request.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 410 def list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).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}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}/listRemoteLoginInformation' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'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(: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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::RemoteLoginInformationListResult.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_remote_login_information_next(next_page_link, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Get the IP address, port of all the compute nodes in the cluster.
to List operation. will be added to the HTTP request.
924 925 926 927 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 924 def list_remote_login_information_next(next_page_link, custom_headers:nil) response = list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_remote_login_information_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Get the IP address, port of all the compute nodes in the cluster.
to List operation. to the HTTP request.
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 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 953 def list_remote_login_information_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(: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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::RemoteLoginInformationListResult.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_remote_login_information_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the IP address, port of all the compute nodes in the cluster.
to List operation. will be added to the HTTP request.
939 940 941 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 939 def list_remote_login_information_next_with_http_info(next_page_link, custom_headers:nil) list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_remote_login_information_with_http_info(resource_group_name, cluster_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Get the IP address, port of all the compute nodes in the cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. will be added to the HTTP request.
392 393 394 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 392 def list_remote_login_information_with_http_info(resource_group_name, cluster_name, custom_headers:nil) list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:custom_headers).value! end |
#list_with_http_info(clusters_list_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Clusters associated with the subscription.
the operation will be added to the HTTP request.
494 495 496 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 494 def list_with_http_info(clusters_list_options:nil, custom_headers:nil) list_async(clusters_list_options:, custom_headers:custom_headers).value! end |
#update(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Cluster
Update the properties of a given cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. update. will be added to the HTTP request.
95 96 97 98 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 95 def update(resource_group_name, cluster_name, parameters, custom_headers:nil) response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update the properties of a given cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. update. to the HTTP request.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 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 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 136 def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'cluster_name is nil' if cluster_name.nil? fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1 fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.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::BatchAI::Mgmt::V2017_09_01_preview::Models::ClusterUpdateParameters.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.BatchAI/clusters/{clusterName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'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(: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 MsRestAzure::AzureOperationError.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::BatchAI::Mgmt::V2017_09_01_preview::Models::Cluster.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update the properties of a given cluster.
resource belongs. resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. update. will be added to the HTTP request.
116 117 118 |
# File 'lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb', line 116 def update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil) update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value! end |