Class: Azure::BatchAI::Mgmt::V2018_03_01::Jobs
- Inherits:
-
Object
- Object
- Azure::BatchAI::Mgmt::V2018_03_01::Jobs
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-03-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, job_name, parameters, custom_headers: nil) ⇒ Job
Adds a Job that gets executed on a cluster.
-
#begin_create_async(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a Job that gets executed on a cluster.
-
#begin_create_with_http_info(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a Job that gets executed on a cluster.
-
#begin_delete(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Deletes the specified Batch AI job.
-
#begin_delete_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified Batch AI job.
-
#begin_delete_with_http_info(resource_group_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified Batch AI job.
-
#begin_terminate(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
-
#begin_terminate_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Terminates a job.
-
#begin_terminate_with_http_info(resource_group_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Terminates a job.
-
#create(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Job
Adds a Job that gets executed on a cluster.
-
#create_async(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#delete(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Deletes the specified Batch AI job.
-
#delete_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs.
-
#get(resource_group_name, job_name, custom_headers: nil) ⇒ Job
Gets information about the specified Batch AI job.
-
#get_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the specified Batch AI job.
-
#get_with_http_info(resource_group_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the specified Batch AI job.
-
#initialize(client) ⇒ Jobs
constructor
Creates and initializes a new instance of the Jobs class.
-
#list(jobs_list_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets information about the jobs associated with the subscription.
-
#list_as_lazy(jobs_list_options: nil, custom_headers: nil) ⇒ JobListResult
Gets information about the jobs associated with the subscription.
-
#list_async(jobs_list_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the jobs associated with the subscription.
-
#list_by_resource_group(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets information about the Batch AI jobs associated within the specified resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ JobListResult
Gets information about the Batch AI jobs associated within the specified resource group.
-
#list_by_resource_group_async(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Batch AI jobs associated within the specified resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets information about the Batch AI jobs associated within the specified resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Batch AI jobs 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 Batch AI jobs associated within the specified resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Batch AI jobs associated within the specified resource group.
-
#list_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets information about the jobs associated with the subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the jobs associated with the subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the jobs associated with the subscription.
-
#list_output_files(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Array<File>
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
-
#list_output_files_as_lazy(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
-
#list_output_files_async(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the output directory (Only 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 output directory (Only 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 output directory (Only 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 output directory (Only if the output directory is on Azure File Share or Azure Storage container).
-
#list_output_files_with_http_info(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
-
#list_remote_login_information(resource_group_name, job_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_as_lazy(resource_group_name, job_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_next(next_page_link, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_remote_login_information_with_http_info(resource_group_name, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the IP address and port information of all the compute nodes which are used for job execution.
-
#list_with_http_info(jobs_list_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the jobs associated with the subscription.
-
#terminate(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
-
#terminate_async(resource_group_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-03-01/generated/azure_mgmt_batchai/jobs.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/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Job
Adds a Job that gets executed on a cluster.
resource belongs. 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.
767 768 769 770 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 767 def begin_create(resource_group_name, job_name, parameters, custom_headers:nil) response = begin_create_async(resource_group_name, job_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Adds a Job that gets executed on a cluster.
resource belongs. 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.
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 808 def begin_create_async(resource_group_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, '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_03_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/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,'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_03_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, job_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Adds a Job that gets executed on a cluster.
resource belongs. 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.
788 789 790 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 788 def begin_create_with_http_info(resource_group_name, job_name, parameters, custom_headers:nil) begin_create_async(resource_group_name, job_name, parameters, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Deletes the specified Batch AI job.
resource belongs. 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.
888 889 890 891 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 888 def begin_delete(resource_group_name, job_name, custom_headers:nil) response = begin_delete_async(resource_group_name, job_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes the specified Batch AI job.
resource belongs. 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.
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 925 def begin_delete_async(resource_group_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, '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/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,'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, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes the specified Batch AI job.
resource belongs. 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.
907 908 909 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 907 def begin_delete_with_http_info(resource_group_name, job_name, custom_headers:nil) begin_delete_async(resource_group_name, job_name, custom_headers:custom_headers).value! end |
#begin_terminate(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
resource belongs. 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.
987 988 989 990 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 987 def begin_terminate(resource_group_name, job_name, custom_headers:nil) response = begin_terminate_async(resource_group_name, job_name, custom_headers:custom_headers).value! nil end |
#begin_terminate_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Terminates a job.
resource belongs. 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.
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 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1024 def begin_terminate_async(resource_group_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, '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/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,'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, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Terminates a job.
resource belongs. 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.
1006 1007 1008 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1006 def begin_terminate_with_http_info(resource_group_name, job_name, custom_headers:nil) begin_terminate_async(resource_group_name, job_name, custom_headers:custom_headers).value! end |
#create(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Job
Adds a Job that gets executed on a cluster.
resource belongs. 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.
40 41 42 43 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 40 def create(resource_group_name, job_name, parameters, custom_headers:nil) response = create_async(resource_group_name, job_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, job_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. 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.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 60 def create_async(resource_group_name, job_name, parameters, custom_headers:nil) # Send request promise = begin_create_async(resource_group_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_03_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, job_name, custom_headers: nil) ⇒ Object
Deletes the specified Batch AI job.
resource belongs. 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.
90 91 92 93 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 90 def delete(resource_group_name, job_name, custom_headers:nil) response = delete_async(resource_group_name, job_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. 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.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 108 def delete_async(resource_group_name, job_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_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, job_name, custom_headers: nil) ⇒ Job
Gets information about the specified Batch AI job.
resource belongs. 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.
138 139 140 141 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 138 def get(resource_group_name, job_name, custom_headers:nil) response = get_async(resource_group_name, job_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the specified Batch AI job.
resource belongs. 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.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 175 def get_async(resource_group_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, '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/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,'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_03_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, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the specified Batch AI job.
resource belongs. 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.
157 158 159 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 157 def get_with_http_info(resource_group_name, job_name, custom_headers:nil) get_async(resource_group_name, job_name, custom_headers:custom_headers).value! end |
#list(jobs_list_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets information about the jobs associated with the subscription.
operation will be added to the HTTP request.
403 404 405 406 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 403 def list(jobs_list_options:nil, custom_headers:nil) first_page = list_as_lazy(jobs_list_options:, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(jobs_list_options: nil, custom_headers: nil) ⇒ JobListResult
Gets information about the jobs associated with the subscription.
operation will be added to the HTTP request.
1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1482 def list_as_lazy(jobs_list_options:nil, custom_headers:nil) response = list_async(jobs_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(jobs_list_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the jobs associated with the subscription.
operation to the HTTP request.
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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 432 def list_async(jobs_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/jobs' 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::V2018_03_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_resource_group(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Array<Job>
Gets information about the Batch AI jobs associated within the specified resource group.
resource belongs. Additional parameters for the operation will be added to the HTTP request.
510 511 512 513 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 510 def list_by_resource_group(resource_group_name, jobs_list_by_resource_group_options:nil, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, jobs_list_by_resource_group_options:, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ JobListResult
Gets information about the Batch AI jobs associated within the specified resource group.
resource belongs. Additional parameters for the operation will be added to the HTTP request.
1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1506 def list_by_resource_group_as_lazy(resource_group_name, jobs_list_by_resource_group_options:nil, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, jobs_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, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets information about the Batch AI jobs associated within the specified resource group.
resource belongs. Additional parameters for the operation to the HTTP request.
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 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 545 def list_by_resource_group_async(resource_group_name, jobs_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/jobs' 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::V2018_03_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_resource_group_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets information about the Batch AI jobs associated within the specified resource group.
to List operation. will be added to the HTTP request.
1267 1268 1269 1270 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1267 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 Batch AI jobs associated within the specified resource group.
to List operation. to the HTTP request.
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1298 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::V2018_03_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_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Batch AI jobs associated within the specified resource group.
to List operation. will be added to the HTTP request.
1283 1284 1285 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1283 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, jobs_list_by_resource_group_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the Batch AI jobs associated within the specified resource group.
resource belongs. Additional parameters for the operation will be added to the HTTP request.
528 529 530 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 528 def list_by_resource_group_with_http_info(resource_group_name, jobs_list_by_resource_group_options:nil, custom_headers:nil) list_by_resource_group_async(resource_group_name, jobs_list_by_resource_group_options:, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ JobListResult
Gets information about the jobs associated with the subscription.
to List operation. will be added to the HTTP request.
1176 1177 1178 1179 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1176 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 jobs associated with the subscription.
to List operation. to the HTTP request.
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 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 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1205 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::V2018_03_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_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the jobs associated with the subscription.
to List operation. will be added to the HTTP request.
1191 1192 1193 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1191 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_output_files(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Array<File>
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
resource belongs. 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.
630 631 632 633 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 630 def list_output_files(resource_group_name, job_name, , custom_headers:nil) first_page = list_output_files_as_lazy(resource_group_name, job_name, , custom_headers:custom_headers) first_page.get_all_items end |
#list_output_files_as_lazy(resource_group_name, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ FileListResult
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
resource belongs. 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.
1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1535 def list_output_files_as_lazy(resource_group_name, job_name, , custom_headers:nil) response = list_output_files_async(resource_group_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, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ Concurrent::Promise
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
resource belongs. 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.
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 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 675 def list_output_files_async(resource_group_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, '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/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,'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_03_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 output directory (Only if the output directory is on Azure File Share or Azure Storage container).
to List operation. will be added to the HTTP request.
1361 1362 1363 1364 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1361 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 output directory (Only if the output directory is on Azure File Share or Azure Storage container).
to List operation. to the HTTP request.
1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1394 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_03_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 output directory (Only if the output directory is on Azure File Share or Azure Storage container).
to List operation. will be added to the HTTP request.
1378 1379 1380 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1378 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, job_name, jobs_list_output_files_options, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
List all directories and files inside the given directory of the output directory (Only if the output directory is on Azure File Share or Azure Storage container).
resource belongs. 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.
653 654 655 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 653 def list_output_files_with_http_info(resource_group_name, job_name, , custom_headers:nil) list_output_files_async(resource_group_name, job_name, , custom_headers:custom_headers).value! end |
#list_remote_login_information(resource_group_name, job_name, custom_headers: nil) ⇒ Array<RemoteLoginInformation>
Gets the IP address and port information of all the compute nodes which are used for job execution.
resource belongs. 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.
249 250 251 252 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 249 def list_remote_login_information(resource_group_name, job_name, custom_headers:nil) first_page = list_remote_login_information_as_lazy(resource_group_name, job_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_remote_login_information_as_lazy(resource_group_name, job_name, custom_headers: nil) ⇒ RemoteLoginInformationListResult
Gets the IP address and port information of all the compute nodes which are used for job execution.
resource belongs. 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.
1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1461 def list_remote_login_information_as_lazy(resource_group_name, job_name, custom_headers:nil) response = list_remote_login_information_async(resource_group_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, job_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the IP address and port information of all the compute nodes which are used for job execution.
resource belongs. 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.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 288 def list_remote_login_information_async(resource_group_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, '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/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,'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_03_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 the IP address and port information of all the compute nodes which are used for job execution.
to List operation. will be added to the HTTP request.
1084 1085 1086 1087 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1084 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 the IP address and port information of all the compute nodes which are used for job execution.
to List operation. to the HTTP request.
1115 1116 1117 1118 1119 1120 1121 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 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1115 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_03_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 the IP address and port information of all the compute nodes which are used for job execution.
to List operation. will be added to the HTTP request.
1100 1101 1102 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 1100 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, job_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the IP address and port information of all the compute nodes which are used for job execution.
resource belongs. 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.
269 270 271 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 269 def list_remote_login_information_with_http_info(resource_group_name, job_name, custom_headers:nil) list_remote_login_information_async(resource_group_name, job_name, custom_headers:custom_headers).value! end |
#list_with_http_info(jobs_list_options: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets information about the jobs associated with the subscription.
operation will be added to the HTTP request.
418 419 420 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 418 def list_with_http_info(jobs_list_options:nil, custom_headers:nil) list_async(jobs_list_options:, custom_headers:custom_headers).value! end |
#terminate(resource_group_name, job_name, custom_headers: nil) ⇒ Object
Terminates a job.
resource belongs. 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.
359 360 361 362 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 359 def terminate(resource_group_name, job_name, custom_headers:nil) response = terminate_async(resource_group_name, job_name, custom_headers:custom_headers).value! nil end |
#terminate_async(resource_group_name, job_name, custom_headers: nil) ⇒ Concurrent::Promise
resource belongs. 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.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb', line 377 def terminate_async(resource_group_name, job_name, custom_headers:nil) # Send request promise = begin_terminate_async(resource_group_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 |