Esempio n. 1
0
 /// <summary>
 /// Begins creating a new Azure SQL Job Account or updating an existing
 /// Azure SQL Job Account. To determine the status of the operation
 /// call GetJobAccountOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Database Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server that the Job
 /// Account is hosted in.
 /// </param>
 /// <param name='jobAccountName'>
 /// Required. The name of the Azure SQL Job Account to be created or
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a Job
 /// Account.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Job Account operations.
 /// </returns>
 public static JobAccountOperationResponse BeginCreateOrUpdate(this IJobAccountOperations operations, string resourceGroupName, string serverName, string jobAccountName, JobAccountCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IJobAccountOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, serverName, jobAccountName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new Azure SQL Job Account or updates an existing Azure
 /// SQL Job Account.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IJobAccountOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the server
 /// belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Job Database Server that the
 /// Job Account is hosted in.
 /// </param>
 /// <param name='jobAccountName'>
 /// Required. The name of the Azure SQL Job Account to be created or
 /// updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for creating or updating a Job
 /// Account.
 /// </param>
 /// <returns>
 /// Response for long running Azure Sql Job Account operations.
 /// </returns>
 public static Task <JobAccountOperationResponse> CreateOrUpdateAsync(this IJobAccountOperations operations, string resourceGroupName, string serverName, string jobAccountName, JobAccountCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, jobAccountName, parameters, CancellationToken.None));
 }