/// <summary> /// Gets the status of a long running operation, such as create, update or /// delete a provisioning service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='operationId'> /// Operation id corresponding to long running operation. Use this to poll for /// the status. /// </param> /// <param name='resourceGroupName'> /// Resource group identifier. /// </param> /// <param name='provisioningServiceName'> /// Name of provisioning service that the operation is running on. /// </param> /// <param name='asyncinfo'> /// Async header used to poll on the status of the operation, obtained while /// creating the long running operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AsyncOperationResult> GetOperationResultAsync(this IIotDpsResourceOperations operations, string operationId, string resourceGroupName, string provisioningServiceName, string asyncinfo, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetOperationResultWithHttpMessagesAsync(operationId, resourceGroupName, provisioningServiceName, asyncinfo, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }