/// <summary>
 /// Creates a new Web Hosting Plan or updates an existing one.  (see
 /// http://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Web Hosting Plan operation response.
 /// </returns>
 public static WebHostingPlanCreateOrUpdateResponse CreateOrUpdate(this IWebHostingPlanOperations operations, string resourceGroupName, WebHostingPlanCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IWebHostingPlanOperations)s).CreateOrUpdateAsync(resourceGroupName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #2
0
 /// <summary>
 /// You can retrieve details for a specified web hosting plan name by
 /// issuing an HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn167017.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <returns>
 /// The Get Web Hosting Plans details operation response.
 /// </returns>
 public static WebHostingPlanGetResponse Get(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IWebHostingPlanOperations)s).GetAsync(webSpaceName, webHostingPlanName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all Web Hosting Plans in a current subscription and Resource
 /// Group.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <returns>
 /// The List Web Hosting Plans operation response.
 /// </returns>
 public static WebHostingPlanListResponse List(this IWebHostingPlanOperations operations, string resourceGroupName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IWebHostingPlanOperations)s).ListAsync(resourceGroupName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the WebSiteManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private WebSiteManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._webHostingPlans = new WebHostingPlanOperations(this);
     this._webSites        = new WebSiteOperations(this);
     this._apiVersion      = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Initializes a new instance of the WebSiteManagementClient class.
 /// </summary>
 public WebSiteManagementClient()
     : base()
 {
     this._sourceControls  = new SourceControlOperations(this);
     this._webHostingPlans = new WebHostingPlanOperations(this);
     this._webSites        = new WebSiteOperations(this);
     this._apiVersion      = "2014-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the WebSiteManagementClient class.
 /// </summary>
 private WebSiteManagementClient()
     : base()
 {
     this._serverFarms     = new ServerFarmOperations(this);
     this._webHostingPlans = new WebHostingPlanOperations(this);
     this._webSites        = new WebSiteOperations(this);
     this._webSpaces       = new WebSpaceOperations(this);
     this._apiVersion      = "2013-08-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Example #7
0
 /// <summary>
 /// You can retrieve details for a specified web hosting plan name by
 /// issuing an HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn167017.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <returns>
 /// The Get Web Hosting Plans details operation response.
 /// </returns>
 public static Task <WebHostingPlanGetResponse> GetAsync(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName)
 {
     return(operations.GetAsync(webSpaceName, webHostingPlanName, CancellationToken.None));
 }
Example #8
0
 /// <summary>
 /// You can retrieve historical usage metrics for a site by issuing an
 /// HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Get Historical Usage Metrics
 /// Web hosting plan operation.
 /// </param>
 /// <returns>
 /// The Get Historical Usage Metrics Web hosting plan operation
 /// response.
 /// </returns>
 public static Task <WebHostingPlanGetHistoricalUsageMetricsResponse> GetHistoricalUsageMetricsAsync(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters)
 {
     return(operations.GetHistoricalUsageMetricsAsync(webSpaceName, webHostingPlanName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Creates a new Web Hosting Plan or updates an existing one.  (see
 /// http://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Web Hosting Plan operation response.
 /// </returns>
 public static Task <WebHostingPlanCreateOrUpdateResponse> CreateOrUpdateAsync(this IWebHostingPlanOperations operations, string resourceGroupName, WebHostingPlanCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Gets all Web Hosting Plans in a current subscription and Resource
 /// Group.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <returns>
 /// The List Web Hosting Plans operation response.
 /// </returns>
 public static Task <WebHostingPlanListResponse> ListAsync(this IWebHostingPlanOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName, CancellationToken.None));
 }
 /// <summary>
 /// You can retrieve historical usage metrics for a site by issuing an
 /// HTTP GET request.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166964.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Get Historical Usage Metrics
 /// Web hosting plan operation.
 /// </param>
 /// <returns>
 /// The Get Historical Usage Metrics Web hosting plan operation
 /// response.
 /// </returns>
 public static WebHostingPlanGetHistoricalUsageMetricsResponse GetHistoricalUsageMetrics(this IWebHostingPlanOperations operations, string resourceGroupName, string webHostingPlanName, WebHostingPlanGetHistoricalUsageMetricsParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IWebHostingPlanOperations)s).GetHistoricalUsageMetricsAsync(resourceGroupName, webHostingPlanName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a Web Hosting Plan  (see
 /// http://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the Web Hosting Plan to delete.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this IWebHostingPlanOperations operations, string resourceGroupName, string webHostingPlanName)
 {
     return(operations.DeleteAsync(resourceGroupName, webHostingPlanName, CancellationToken.None));
 }
 /// <summary>
 /// Creates a new Web Hosting Plan.  (see
 /// http://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Required. Web Hosting Plan Parameters.
 /// </param>
 /// <returns>
 /// The Create Web Web Hosting Plan operation response.
 /// </returns>
 public static Task <WebHostingPlanCreateResponse> CreateAsync(this IWebHostingPlanOperations operations, string webSpaceName, WebHostingPlanCreateParameters parameters)
 {
     return(operations.CreateAsync(webSpaceName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Deletes a Web Hosting Plan  (see
 /// http://azure.microsoft.com/en-us/documentation/articles/azure-web-sites-web-hosting-plans-in-depth-overview/
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebHostingPlanOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='webHostingPlanName'>
 /// Required. The name of the web hosting plan.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IWebHostingPlanOperations operations, string webSpaceName, string webHostingPlanName)
 {
     return(operations.DeleteAsync(webSpaceName, webHostingPlanName, CancellationToken.None));
 }