Add Load Balancer

 

The Add Load Balancer operation adds an internal load balancer to an existing deployment. When used by an input endpoint, the internal load balancer provides an additional private virtual IP address that can be used for load balancing to the Virtual Machines in the deployment.

Request

The Add Load Balancer request is specified as follows. Replace <subscription-id> with your subscription ID, <service-name> with the name of the cloud service, and <deployment-name> with the name of the deployment.

Method

Request URI

POST

https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/loadbalancers

URI Parameters

None.

Request Headers

The following table describes the request headers.

Request Header

Description

Content-Type

Required. Set this header to application/xml.

x-ms-version

Required. Specifies the version of the operation to use for this request. The value of this header must be set to 2014-05-01 or higher.

Request Body

The format of the request body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<LoadBalancer xmlns="http://schemas.microsoft.com/windowsazure">
  <Name>name-of-internal-load-balancer</Name>
  <FrontendIpConfiguration>
    <Type>type-of-ip-address</Type>
    <SubnetName>name-of-subnet</SubnetName>
    <StaticVirtualNetworkIPAddress>static-ip-address</StaticVirtualNetworkIPAddress>
  </FrontendIpConfiguration>
</LoadBalancer>

The following table describes the elements of the request body.

Element Name

Description

Name

Required. Specifies the name of the internal load balancer.

FrontendIpConfiguration

Required. Specifies the configuration for the virtual IP address that is provided by the load balancer.

Type

Required. Specifies the type of virtual IP address that is provided by the load balancer. The only allowable value is Private.

SubnetName

Required if the deployment exists in a virtual network and a StaticVirtualNetworkIPAddress is assigned. Specifies the subnet of the virtual network that the load balancer uses. The virtual IP address that is managed by the load balancer is contained in this subnet.

StaticVirtualNetworkIPAddress

Optional. Specifies a specific virtual IP address that the load balancer uses from the subnet in the virtual network.

Response

The response includes an HTTP status code and a set of response headers.

Status Code

A successful operation returns status code 201 (Created).

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers.

Response Header

Description

x-ms-request-id

A value that uniquely identifies a request made against the management service. For an asynchronous operation, you can call Get Operation Status with the value of the header to determine whether the operation is complete, has failed, or is still in progress.

Response Body

None.