コード例 #1
0
 /// <summary>
 /// If the user wants the server to create the job id then he can use a
 /// POST request to the jobs resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.WindowsAzure.Scheduler.IJobOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Job operation.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public static JobCreateResponse Create(this IJobOperations operations, JobCreateParameters parameters)
 {
     try
     {
         return(operations.CreateAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// If the user wants the server to create the job id then he can use a
 /// POST request to the jobs resource.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.WindowsAzure.Scheduler.IJobOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Job operation.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public static Task <JobCreateResponse> CreateAsync(this IJobOperations operations, JobCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters, CancellationToken.None));
 }
コード例 #3
0
 /// <summary>
 /// Create a job of the runbook.  (see
 /// http://aka.ms/azureautomationsdk/joboperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IJobOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create job operation.
 /// </param>
 /// <returns>
 /// The response model for the create job operation.
 /// </returns>
 public static Task <JobCreateResponse> CreateAsync(this IJobOperations operations, string automationAccount, JobCreateParameters parameters)
 {
     return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None));
 }
コード例 #4
0
 /// <summary>
 /// Submits a job to the specified Data Lake Analytics account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='accountName'>
 /// The Azure Data Lake Analytics account to execute job operations on.
 /// </param>
 /// <param name='jobIdentity'>
 /// Job identifier. Uniquely identifies the job across all jobs submitted to
 /// the service.
 /// </param>
 /// <param name='parameters'>
 /// The parameters to submit a job.
 /// </param>
 public static JobInformation Create(this IJobOperations operations, string accountName, System.Guid jobIdentity, CreateJobParameters parameters)
 {
     return(operations.CreateAsync(accountName, jobIdentity, parameters).GetAwaiter().GetResult());
 }
コード例 #5
0
 /// <summary>
 /// Create a job of the runbook.
 /// <see href="http://aka.ms/azureautomationsdk/joboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='jobName'>
 /// The job name.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the create job operation.
 /// </param>
 /// <param name='clientRequestId'>
 /// Identifies this specific client request.
 /// </param>
 public static Job Create(this IJobOperations operations, string resourceGroupName, string automationAccountName, string jobName, JobCreateParameters parameters, string clientRequestId = default(string))
 {
     return(operations.CreateAsync(resourceGroupName, automationAccountName, jobName, parameters, clientRequestId).GetAwaiter().GetResult());
 }
コード例 #6
0
 /// <summary>
 /// Submits the specified job to the specified Data Lake Analytics
 /// account for computation.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataLake.AnalyticsJob.IJobOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='accountName'>
 /// Required. The name of the Data Lake Analytics account to create the
 /// job for
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters to submit a job.
 /// </param>
 /// <returns>
 /// Data Lake Analytics job information response from a build or create
 /// request.
 /// </returns>
 public static Task <JobInfoBuildOrCreateResponse> CreateAsync(this IJobOperations operations, string resourceGroupName, string accountName, JobInfoBuildOrCreateParameters parameters)
 {
     return(operations.CreateAsync(resourceGroupName, accountName, parameters, CancellationToken.None));
 }