/// <summary>
 /// Waits for the service to be deployed.
 /// </summary>
 /// <param name="cdnService">The <see cref="IContentDeliveryNetworkService"/> service instance.</param>
 /// <param name="serviceId">The service identifier.</param>
 /// <param name="refreshDelay">The amount of time to wait between requests.</param>
 /// <param name="timeout">The amount of time to wait before throwing a <see cref="TimeoutException"/>.</param>
 /// <param name="progress">The progress callback.</param>
 /// <exception cref="ServiceOperationFailedException">If the previous service operation failed.</exception>
 /// <exception cref="TimeoutException">If the <paramref name="timeout"/> value is reached.</exception>
 /// <exception cref="FlurlHttpException">If the API call returns a bad <see cref="HttpStatusCode"/>.</exception>
 public static Service WaitForServiceDeployed(this IContentDeliveryNetworkService cdnService, string serviceId, TimeSpan?refreshDelay = null, TimeSpan?timeout = null, IProgress <bool> progress = null)
 {
     return(cdnService.WaitForServiceDeployedAsync(serviceId, refreshDelay, timeout, progress).ForceSynchronous());
 }