Class: Azure::BatchAI::Mgmt::V2018_05_01::Jobs
- Inherits:
-
Object
- Object
- Azure::BatchAI::Mgmt::V2018_05_01::Jobs
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-05-01/generated/azure_mgmt_batchai/jobs.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, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Job
Creates a Job in the given Experiment.
-
#begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a Job in the given Experiment.
-
#begin_create_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a Job in the given Experiment.
-
#begin_delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Deletes a Job.
-
#begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Job.
-
#begin_delete_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Job.
-
#begin_terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
-
#begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Terminates a job.
-
#begin_terminate_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Terminates a job.
-
#create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Job
Creates a Job in the given Experiment.
-
#create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Deletes a Job.
-
#delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#get(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Job
Gets information about a Job.
-
#get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about a Job.
-
#get_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about a Job.
-
#initialize(client) ⇒ Jobs
constructor
Creates and initializes a new instance of the Jobs class.
-
#list_by_experiment(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ JobListResult
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of Jobs within the specified Experiment.
-
#list_by_experiment_with_http_info(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of Jobs within the specified Experiment.
-
#list_output_files(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Array<File>
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_next(next_page_link, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_output_files_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
-
#list_remote_login_information(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_next(next_page_link, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of currently existing nodes which were used for the Job execution.
-
#list_remote_login_information_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of currently existing nodes which were used for the Job execution.
-
#terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
-
#terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
Constructor Details
#initialize(client) ⇒ Jobs
Creates and initializes a new instance of the Jobs class.
17 18 19 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ BatchAIManagementClient (readonly)
22 23 24 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Job
Creates a Job in the given Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. creation. will be added to the HTTP request.
801 802 803 804 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 801 def begin_create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil) response = begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Creates a Job in the given Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. creation. to the HTTP request.
854 855 856 857 858 859 860 861 862 863 864 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 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 854 def begin_create_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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::V2018_05_01::Models::JobCreateParameters.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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_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::V2018_05_01::Models::Job.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, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a Job in the given Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. creation. will be added to the HTTP request.
828 829 830 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 828 def begin_create_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil) begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Deletes a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
948 949 950 951 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 948 def begin_delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 997 def begin_delete_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
973 974 975 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 973 def begin_delete_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! end |
#begin_terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
1073 1074 1075 1076 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1073 def begin_terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! nil end |
#begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Terminates a job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
1122 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 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1122 def begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/terminate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_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 || 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? result end promise.execute end |
#begin_terminate_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Terminates a job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
1098 1099 1100 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1098 def begin_terminate_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! end |
#create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Job
Creates a Job in the given Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. creation. will be added to the HTTP request.
176 177 178 179 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 176 def create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil) response = create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. creation. will be added to the HTTP request.
response.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 202 def create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, workspace_name, experiment_name, job_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::V2018_05_01::Models::Job.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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Deletes a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
238 239 240 241 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 238 def delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 262 def delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, workspace_name, experiment_name, job_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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Job
Gets information about a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
298 299 300 301 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 298 def get(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
347 348 349 350 351 352 353 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 408 409 410 411 412 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 347 def get_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_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::V2018_05_01::Models::Job.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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about a Job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
323 324 325 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 323 def get_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! end |
#list_by_experiment(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets a list of Jobs within the specified Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. Additional parameters for the operation will be added to the HTTP request.
42 43 44 45 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 42 def list_by_experiment(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil) first_page = list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ JobListResult
Gets a list of Jobs within the specified Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. Additional parameters for the operation will be added to the HTTP request.
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1479 def list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil) response = list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_experiment_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of Jobs within the specified Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. Additional parameters for the operation to the HTTP request.
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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 87 def list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_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? max_results = nil 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/workspaces/{workspaceName}/experiments/{experimentName}/jobs' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'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::V2018_05_01::Models::JobListResult.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_experiment_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets a list of Jobs within the specified Experiment.
to List operation. will be added to the HTTP request.
1189 1190 1191 1192 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1189 def list_by_experiment_next(next_page_link, custom_headers:nil) response = list_by_experiment_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_experiment_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of Jobs within the specified Experiment.
to List operation. to the HTTP request.
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 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 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1218 def list_by_experiment_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::V2018_05_01::Models::JobListResult.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_experiment_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of Jobs within the specified Experiment.
to List operation. will be added to the HTTP request.
1204 1205 1206 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1204 def list_by_experiment_next_with_http_info(next_page_link, custom_headers:nil) list_by_experiment_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_experiment_with_http_info(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of Jobs within the specified Experiment.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. Additional parameters for the operation will be added to the HTTP request.
65 66 67 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 65 def list_by_experiment_with_http_info(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil) list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:, custom_headers:custom_headers).value! end |
#list_output_files(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Array<File>
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. parameters for the operation will be added to the HTTP request.
438 439 440 441 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 438 def list_output_files(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:nil) first_page = list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:custom_headers) first_page.get_all_items end |
#list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. parameters for the operation will be added to the HTTP request.
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1514 def list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:nil) response = list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_output_files_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. parameters for the operation to the HTTP request.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 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 572 573 574 575 576 577 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 495 def list_output_files_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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? fail ArgumentError, 'jobs_list_output_files_options is nil' if .nil? outputdirectoryid = nil directory = nil = nil max_results = nil unless .nil? outputdirectoryid = .outputdirectoryid end unless .nil? directory = .directory end unless .nil? = . 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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listOutputFiles' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'outputdirectoryid' => outputdirectoryid,'directory' => directory,'linkexpiryinminutes' => ,'maxresults' => max_results}, 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::V2018_05_01::Models::FileListResult.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_output_files_next(next_page_link, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
to List operation. will be added to the HTTP request.
1281 1282 1283 1284 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1281 def list_output_files_next(next_page_link, custom_headers:nil) response = list_output_files_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_output_files_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
to List operation. to the HTTP request.
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 1363 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1314 def list_output_files_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::V2018_05_01::Models::FileListResult.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_output_files_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
to List operation. will be added to the HTTP request.
1298 1299 1300 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1298 def list_output_files_next_with_http_info(next_page_link, custom_headers:nil) list_output_files_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_output_files_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the Job’s output directory (if the output directory is on Azure File Share or Azure Storage Container).
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. parameters for the operation will be added to the HTTP request.
467 468 469 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 467 def list_output_files_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:nil) list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, , custom_headers:custom_headers).value! end |
#list_remote_login_information(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
601 602 603 604 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 601 def list_remote_login_information(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) first_page = list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1548 def list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
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 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 654 def list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_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, 'workspace_name is nil' if workspace_name.nil? fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1 fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'experiment_name is nil' if experiment_name.nil? fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1 fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil? fail ArgumentError, 'job_name is nil' if job_name.nil? fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64 fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1 fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_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/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listRemoteLoginInformation' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_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::V2018_05_01::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
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
to List operation. will be added to the HTTP request.
1377 1378 1379 1380 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1377 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
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
to List operation. to the HTTP request.
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 1453 1454 1455 1456 1457 1458 1459 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1410 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::V2018_05_01::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
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
to List operation. will be added to the HTTP request.
1394 1395 1396 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 1394 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, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of currently existing nodes which were used for the Job execution. The returned information contains the node ID, its public IP and SSH port.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
628 629 630 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 628 def list_remote_login_information_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! end |
#terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
739 740 741 742 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 739 def terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) response = terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value! nil end |
#terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long. group. Job 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.
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb', line 763 def terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil) # Send request promise = begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_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 |