/// <summary> /// Gets a deployment for a website. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <returns> /// The deployment information operation response. /// </returns> public static DeploymentGetResponse Get(this IDeploymentOperations operations, string deploymentId) { try { return(operations.GetAsync(deploymentId).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Gets a deployment for a website. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <returns> /// The deployment information operation response. /// </returns> public static Task <DeploymentGetResponse> GetAsync(this IDeploymentOperations operations, string deploymentId) { return(operations.GetAsync(deploymentId, CancellationToken.None)); }
/// <summary> /// Get a deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IDeploymentOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to get. The name is case /// insensitive. /// </param> /// <param name='deploymentName'> /// Required. The name of the deployment. /// </param> /// <returns> /// Template deployment information. /// </returns> public static Task <DeploymentGetResult> GetAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName) { return(operations.GetAsync(resourceGroupName, deploymentName, CancellationToken.None)); }
/// <summary> /// Gets a deployments operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='deploymentName'> /// The name of the deployment. /// </param> /// <param name='operationId'> /// The ID of the operation to get. /// </param> public static DeploymentOperation Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId) { return(operations.GetAsync(resourceGroupName, deploymentName, operationId).GetAwaiter().GetResult()); }