/// <summary> /// Whether hosting environment name is available /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Hosting environment name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> IsHostingEnvironmentNameAvailableAsync(this IGlobalModelOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.IsHostingEnvironmentNameAvailableWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates publishing credentials for the subscription owner /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestMessage'> /// requestMessage with new publishing credentials /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <User> UpdateSubscriptionPublishingCredentialsAsync(this IGlobalModelOperations operations, User requestMessage, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateSubscriptionPublishingCredentialsWithHttpMessagesAsync(requestMessage, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List premier add on offers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> ListPremierAddOnOffersAsync(this IGlobalModelOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListPremierAddOnOffersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all App Service Plans for a subcription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='detailed'> /// False to return a subset of App Service Plan properties, true to return /// all of the properties. /// Retrieval of all properties may increase the API latency. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerFarmCollection> GetAllServerFarmsAsync(this IGlobalModelOperations operations, bool?detailed = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllServerFarmsWithHttpMessagesAsync(detailed, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all Web Apps for a subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SiteCollection> GetAllSitesAsync(this IGlobalModelOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllSitesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all deleted apps for a subscription. /// </summary> /// <remarks> /// Description for Get all deleted apps for a subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deletedSiteId'> /// The numeric ID of the deleted app, e.g. 12345 /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <Snapshot> > GetDeletedWebAppSnapshotsAsync(this IGlobalModelOperations operations, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetDeletedWebAppSnapshotsWithHttpMessagesAsync(deletedSiteId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Check if resource name is available /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// Name availability request /// </param> public static ResourceNameAvailability CheckNameAvailability(this IGlobalModelOperations operations, ResourceNameAvailabilityRequest request) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).CheckNameAvailabilityAsync(request), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Whether hosting environment name is available /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// Hosting environment name /// </param> public static object IsHostingEnvironmentWithLegacyNameAvailable(this IGlobalModelOperations operations, string name) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).IsHostingEnvironmentWithLegacyNameAvailableAsync(name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List premier add on offers /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static object ListPremierAddOnOffers(this IGlobalModelOperations operations) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).ListPremierAddOnOffersAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets an operation in a subscription and given region /// </summary> /// <remarks> /// Description for Gets an operation in a subscription and given region /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location name /// </param> /// <param name='operationId'> /// Operation Id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task GetSubscriptionOperationWithAsyncResponseAsync(this IGlobalModelOperations operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets all App Service Plans for a subcription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='detailed'> /// False to return a subset of App Service Plan properties, true to return /// all of the properties. /// Retrieval of all properties may increase the API latency. /// </param> public static ServerFarmCollection GetAllServerFarms(this IGlobalModelOperations operations, bool?detailed = default(bool?)) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).GetAllServerFarmsAsync(detailed), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets list of available geo regions /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='sku'> /// Filter only to regions that support this sku /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GeoRegionCollection> GetSubscriptionGeoRegionsAsync(this IGlobalModelOperations operations, string sku = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSubscriptionGeoRegionsWithHttpMessagesAsync(sku, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all deleted apps for a subscription. /// </summary> /// <remarks> /// Description for Get all deleted apps for a subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deletedSiteId'> /// The numeric ID of the deleted app, e.g. 12345 /// </param> public static IList <Snapshot> GetDeletedWebAppSnapshots(this IGlobalModelOperations operations, string deletedSiteId) { return(operations.GetDeletedWebAppSnapshotsAsync(deletedSiteId).GetAwaiter().GetResult()); }
/// <summary> /// Get deleted app for a subscription. /// </summary> /// <remarks> /// Description for Get deleted app for a subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deletedSiteId'> /// The numeric ID of the deleted app, e.g. 12345 /// </param> public static DeletedSite GetDeletedWebApp(this IGlobalModelOperations operations, string deletedSiteId) { return(operations.GetDeletedWebAppAsync(deletedSiteId).GetAwaiter().GetResult()); }
/// <summary> /// Check if resource name is available /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// Name availability request /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ResourceNameAvailability> CheckNameAvailabilityAsync(this IGlobalModelOperations operations, ResourceNameAvailabilityRequest request, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(request, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all managed hosting environments for a subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static ManagedHostingEnvironmentCollection GetAllManagedHostingEnvironments(this IGlobalModelOperations operations) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).GetAllManagedHostingEnvironmentsAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Updates publishing credentials for the subscription owner /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestMessage'> /// requestMessage with new publishing credentials /// </param> public static User UpdateSubscriptionPublishingCredentials(this IGlobalModelOperations operations, User requestMessage) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).UpdateSubscriptionPublishingCredentialsAsync(requestMessage), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets all mobile services for a subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static ClassicMobileServiceCollection GetAllClassicMobileServices(this IGlobalModelOperations operations) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).GetAllClassicMobileServicesAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets list of available geo regions /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='sku'> /// Filter only to regions that support this sku /// </param> public static GeoRegionCollection GetSubscriptionGeoRegions(this IGlobalModelOperations operations, string sku = default(string)) { return(Task.Factory.StartNew(s => ((IGlobalModelOperations)s).GetSubscriptionGeoRegionsAsync(sku), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Gets an operation in a subscription and given region /// </summary> /// <remarks> /// Description for Gets an operation in a subscription and given region /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location name /// </param> /// <param name='operationId'> /// Operation Id /// </param> public static void GetSubscriptionOperationWithAsyncResponse(this IGlobalModelOperations operations, string location, string operationId) { operations.GetSubscriptionOperationWithAsyncResponseAsync(location, operationId).GetAwaiter().GetResult(); }