/// <summary>
 /// Gets the details of a specified job on a Data Box Edge/Data Box Gateway
 /// device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The job name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Job> GetAsync(this IOperationsStatus operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Gets the status of operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The region the operation is in.
 /// </param>
 /// <param name='operationId'>
 /// The operation's unique identifier.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationStatus> GetAsync(this IOperationsStatus operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets the details of a specified job on a Data Box Edge/Data Box Gateway
 /// device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The job name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static Job Get(this IOperationsStatus operations, string deviceName, string name, string resourceGroupName)
 {
     return(operations.GetAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult());
 }
Exemple #4
0
 /// <summary>
 /// Gets the status of operation.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// The region the operation is in.
 /// </param>
 /// <param name='operationId'>
 /// The operation's unique identifier.
 /// </param>
 public static OperationStatus Get(this IOperationsStatus operations, string location, string operationId)
 {
     return(operations.GetAsync(location, operationId).GetAwaiter().GetResult());
 }