SALES: 1-800-867-1380

Create, Manage, or Delete a Server Farm

Updated: January 15, 2014

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).

WarningWarning
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.

Replace <Subscription-ID> and <WebSpaceName> with the corresponding values for your subscription and webspace. For the PUT and DELETE operations, you must specify DefaultServerFarm as the server farm name.

 

Method Request URI HTTP Version

POST

https://management.core.windows.net/<Subscription-ID>/services/WebSpaces/<WebSpaceName>/ServerFarms

HTTP/1.1

GET

https://management.core.windows.net/<Subscription-ID>/services/WebSpaces/<WebSpaceName>/ServerFarms

HTTP/1.1

PUT

https://management.core.windows.net/<Subscription-ID>/services/WebSpaces/<WebSpaceName>/ServerFarms/DefaultServerFarm

HTTP/1.1

DELETE

https://management.core.windows.net/<Subscription-ID>/services/WebSpaces/<WebSpaceName>/ServerFarms/DefaultServerFarm

HTTP/1.1

The following table describes required and optional request headers.

 

Request Header Description

x-ms-version

Optional. Specifies the version of the operation to use for this request. If you do not specify a version, the latest version is used. For more information about versioning headers, see API Versioning on the Web Sites Management REST API Reference page.

accept: application/json

Optional. Use this header to receive the response in JSON format.

Content-Length

Required for HTTP POST and HTTP PUT.

Content-Type: application/json; charset=utf-8

Required if the request body is sent in JSON format.

A request body is required for server farm creation (HTTP POST) and server farm update (HTTP PUT).

The following example JSON request body creates or updates a server farm with the properties specified. The name of the server farm must be DefaultServerFarm. For WorkerSize, use the values in the following table.

 

Size WorkerSize Value

Small

0

Medium

1

Large

2


{
  "CurrentNumberOfWorkers":2,
  "CurrentWorkerSize":0,
  "Name":"DefaultServerFarm",
  "NumberOfWorkers":2,
  "Status":0,
  "WorkerSize":0
}

The following example XML request body creates or updates a server farm with the properties specified. The name of the server farm must be DefaultServerFarm.


<ServerFarm xmlns="http://schemas.microsoft.com/windowsazure">
  <Name>DefaultServerFarm</Name>
  <NumberOfWorkers>2</NumberOfWorkers>
  <WorkerSize>Small</WorkerSize>
</ServerFarm>

The response includes an HTTP status code, a set of response headers, and a response body. The response body is empty for a DELETE operation.

A successful operation returns status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies the request made against the Management service.

The following is an example JSON response body for the 2012-10-10 version.


{
  "CurrentNumberOfWorkers":2,
  "CurrentWorkerSize":0,
  "Name":"DefaultServerFarm",
  "NumberOfWorkers":2,
  "Status":0,
  "WorkerSize":0
}

The following is an example XML response body for the 2012-10-10 version.


<ServerFarm xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <CurrentNumberOfWorkers>2</CurrentNumberOfWorkers>
  <CurrentWorkerSize>Small</CurrentWorkerSize>
  <Name>DefaultServerFarm</Name>
  <NumberOfWorkers>2</NumberOfWorkers>
  <Status>Ready</Status>
  <WorkerSize>Small</WorkerSize>
</ServerFarm>


The following table describes the key elements of the response body.

 

Element Name Description

ServerFarm

Container element for server farm properties.

ServerFarm.CurrentNumberOfWorkers

The current number of Virtual Machines (VMs) in the server farm.

ServerFarm.CurrentWorkerSize

The current worker size Possible values are Small, Medium, or Large.

ServerFarm.Name

The name of the server farm.

ServerFarm.NumberOfWorkers

The instance count, which is the number of virtual machines dedicated to the farm. Supported values are 1-10.

ServerFarm.Status

Server farm status. Possible values are Ready or Pending.

ServerFarm.WorkerSize

The instance size. Possible values are Small, Medium, or Large.

Any management certificate associated with the subscription specified by <Subscription-Id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft