IJsonpWsEndUserSetEnqueueLoadBalancerCreation Method
|
By the method SetEnqueueLoadBalancerCreation you can create a load balancer. The method require to specify the name, the IP Address of balancer, the Class of Service of balancer, the load balancing algorithm, the rules for load balancing and the IP addresses to balance.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueLoadBalancerCreation/{jsonp}/{userName}/{token}?name={name}&ipAddressResourceId={ipAddressResourceId}&healthCheckNotification={healthCheckNotification}&loadBalancerClassOfServiceID={loadBalancerClassOfServiceID}¬ificationContacts={notificationContacts}&rules={rules}&instance={instance}")]
Stream SetEnqueueLoadBalancerCreation(
string jsonp,
string userName,
string token,
string name,
string ipAddressResourceId,
bool healthCheckNotification,
int loadBalancerClassOfServiceID,
string notificationContacts,
string rules,
string instance
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetEnqueueLoadBalancerCreation/{jsonp}/{userName}/{token}?name={name}&ipAddressResourceId={ipAddressResourceId}&healthCheckNotification={healthCheckNotification}&loadBalancerClassOfServiceID={loadBalancerClassOfServiceID}¬ificationContacts={notificationContacts}&rules={rules}&instance={instance}")>
Function SetEnqueueLoadBalancerCreation (
jsonp As String,
userName As String,
token As String,
name As String,
ipAddressResourceId As String,
healthCheckNotification As Boolean,
loadBalancerClassOfServiceID As Integer,
notificationContacts As String,
rules As String,
instance As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetEnqueueLoadBalancerCreation/{jsonp}/{userName}/{token}?name={name}&ipAddressResourceId={ipAddressResourceId}&healthCheckNotification={healthCheckNotification}&loadBalancerClassOfServiceID={loadBalancerClassOfServiceID}¬ificationContacts={notificationContacts}&rules={rules}&instance={instance}")]
Stream^ SetEnqueueLoadBalancerCreation(
String^ jsonp,
String^ userName,
String^ token,
String^ name,
String^ ipAddressResourceId,
bool healthCheckNotification,
int loadBalancerClassOfServiceID,
String^ notificationContacts,
String^ rules,
String^ instance
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueLoadBalancerCreation/{jsonp}/{userName}/{token}?name={name}&ipAddressResourceId={ipAddressResourceId}&healthCheckNotification={healthCheckNotification}&loadBalancerClassOfServiceID={loadBalancerClassOfServiceID}¬ificationContacts={notificationContacts}&rules={rules}&instance={instance}")>]
abstract SetEnqueueLoadBalancerCreation :
jsonp : string *
userName : string *
token : string *
name : string *
ipAddressResourceId : string *
healthCheckNotification : bool *
loadBalancerClassOfServiceID : int *
notificationContacts : string *
rules : string *
instance : string -> Stream
function SetEnqueueLoadBalancerCreation(
jsonp : String,
userName : String,
token : String,
name : String,
ipAddressResourceId : String,
healthCheckNotification : boolean,
loadBalancerClassOfServiceID : int,
notificationContacts : String,
rules : String,
instance : String
) : Stream
Parameters
- jsonp
- Type: SystemString
- userName
- Type: SystemString
- token
- Type: SystemString
- name
- Type: SystemString
- ipAddressResourceId
- Type: SystemString
- healthCheckNotification
- Type: SystemBoolean
- loadBalancerClassOfServiceID
- Type: SystemInt32
- notificationContacts
- Type: SystemString
- rules
- Type: SystemString
- instance
- Type: SystemString
Return Value
Type:
Stream
Examples
public static string SetEnqueueLoadBalancerCreation(WsEndUserClient client,
string name, LoadBalancerRule[] rules,
int[] ipAddressesResourceId, int loadBalancerClassOfServiceID)
{
client.ClientCredentials.UserName.UserName = "ARU-0000";
client.ClientCredentials.UserName.Password = "0123456789";
StringBuilder stringBuilder = new StringBuilder();
try
{
LoadBalancerCreationRequest request = new LoadBalancerCreationRequest();
request.IpAddressResourceId = ipAddressesResourceId;
request.LoadBalancerClassOfServiceID = loadBalancerClassOfServiceID;
request.Name = name;
request.Rules = rules;
WsResult result = client.SetEnqueueLoadBalancerCreation(request);
if (result.Success)
{
stringBuilder.Append(" Operation ends successfully. Result Code : ");
stringBuilder.Append(result.ResultCode);
}
else
{
throw new ApplicationException(result.ResultMessage);
}
}
catch (Exception ex)
{
throw new ApplicationException(ex.Message);
}
return stringBuilder.ToString();
}
See Also