Click or drag to resize

IJsonpWsEndUserSetPurchaseVLan Method

Reserve a VLAN upon authentication to the specified account. By the method SetPurchaseVLan() of Aruba WsEndUser, you can buy a VLAN named. The recording operation of VLAN association and the account is subject to presence of a claim equal to or greater than the cost of purchasing that resource. If the recording operation and the allocation of VLAN is successful, the object returned by the method SetPurchaseVLan() will contain all the information about the resource: name, code, etc.

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 = "SetPurchaseVLan/{jsonp}/{userName}/{token}/{vlanName}/{clusterGroupTypeID}")]
Stream SetPurchaseVLan(
	string jsonp,
	string userName,
	string token,
	string vlanName,
	string clusterGroupTypeID
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString
vlanName
Type: SystemString
clusterGroupTypeID
Type: SystemString

Return Value

Type: Stream
The method returns an object WsResult<VLan> contains information about the private VLAN and assigned to the account. The method returns an object WsResult contains information about the method call. For further details on the information returned by the method see the class definition WsResult VLAN .
Examples
private static void PurchaseVLan(WsEndUserClient client)
{
  try
  {
    WsResultOfVLan result = client.SetPurchaseVLan("NewVLan");

    if (!result.Success)
    {
      throw new ApplicationException(String.Format(
        "An error has occurred while invoking SetPurchaseVLan(). {0}", result.ResultMessage));
    }
  }
  catch (Exception ex)
  {
    throw new ApplicationException(
      String.Format("An error has occurred while setting server note {0}", ex.Message));
  }
}
See Also