/// <summary>
 /// Initializes a new instance of the WebSiteManagementClient class.
 /// </summary>
 private WebSiteManagementClient()
     : base()
 {
     this._serverFarms       = new ServerFarmOperations(this);
     this._webSites          = new WebSiteOperations(this);
     this._webSpaces         = new WebSpaceOperations(this);
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 2
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (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.IServerFarmOperations.
 /// </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 Server Farm operation response.
 /// </returns>
 public static ServerFarmCreateOrUpdateResponse CreateOrUpdate(this IServerFarmOperations operations, string resourceGroupName, ServerFarmCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerFarmOperations)s).CreateOrUpdateAsync(resourceGroupName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (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.IServerFarmOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <returns>
 /// The List Server Farm operation response.
 /// </returns>
 public static ServerFarmListResponse List(this IServerFarmOperations operations, string resourceGroupName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerFarmOperations)s).ListAsync(resourceGroupName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT). Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='serverFarmName'>
 /// Required. The name of the server farm.
 /// </param>
 /// <returns>
 /// The Get Server Farm operation response.
 /// </returns>
 public static ServerFarmGetResponse Get(this IServerFarmOperations operations, string webSpaceName, string serverFarmName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IServerFarmOperations)s).GetAsync(webSpaceName, serverFarmName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the WebSiteManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private WebSiteManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._serverFarms = new ServerFarmOperations(this);
     this._webSites    = new WebSiteOperations(this);
     this._apiVersion  = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Server Farm operation response.
 /// </returns>
 public static ServerFarmCreateResponse Create(this IServerFarmOperations operations, string webSpaceName, ServerFarmCreateParameters parameters)
 {
     try
     {
         return(operations.CreateAsync(webSpaceName, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <returns>
 /// The List Server Farm operation response.
 /// </returns>
 public static ServerFarmListResponse List(this IServerFarmOperations operations, string webSpaceName)
 {
     try
     {
         return(operations.ListAsync(webSpaceName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Server Farm operation.
 /// </param>
 /// <returns>
 /// The Update Server Farm operation response.
 /// </returns>
 public static Task <ServerFarmUpdateResponse> UpdateAsync(this IServerFarmOperations operations, string webSpaceName, ServerFarmUpdateParameters parameters)
 {
     return(operations.UpdateAsync(webSpaceName, parameters, CancellationToken.None));
 }
Exemplo n.º 10
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <returns>
 /// The List Server Farm operation response.
 /// </returns>
 public static Task <ServerFarmListResponse> ListAsync(this IServerFarmOperations operations, string webSpaceName)
 {
     return(operations.ListAsync(webSpaceName, CancellationToken.None));
 }
Exemplo n.º 11
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this IServerFarmOperations operations, string webSpaceName)
 {
     return(operations.DeleteAsync(webSpaceName, CancellationToken.None));
 }
Exemplo n.º 12
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (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.IServerFarmOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <returns>
 /// The List Server Farm operation response.
 /// </returns>
 public static Task <ServerFarmListResponse> ListAsync(this IServerFarmOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName, CancellationToken.None));
 }
Exemplo n.º 13
0
 /// <summary>
 /// TBD.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serverFarmName'>
 /// Required. The name of the server farm.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> DeleteAsync(this IServerFarmOperations operations, string resourceGroupName, string serverFarmName)
 {
     return(operations.DeleteAsync(resourceGroupName, serverFarmName, CancellationToken.None));
 }
Exemplo n.º 14
0
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace's Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (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.IServerFarmOperations.
 /// </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 Server Farm operation response.
 /// </returns>
 public static Task <ServerFarmCreateOrUpdateResponse> CreateOrUpdateAsync(this IServerFarmOperations operations, string resourceGroupName, ServerFarmCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None));
 }