Click or drag to resize

IWsEndUserSetPurchaseVLan 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]
WsResult<VLan> SetPurchaseVLan(
	string vLanName,
	Nullable<int> clusterGroupTypeID
)

Parameters

vLanName
Type: SystemString
Value of type System.String that represents the name of the VLAN you want to buy
clusterGroupTypeID
Type: SystemNullableInt32
Value of type nullable int that represents the id of the ClusterGroupType you want to buy

Return Value

Type: WsResultVLan
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 Test_wsEndUser_SetPurchaseVLan()
{
    using (var client = new WsEndUser.WsEndUserClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;

        string vLanName = "NewName";
        try
        {
            var res = client.SetPurchaseVLan(vLanName, 5);

            if (res.Success)
            {
                Console.WriteLine("VLan successfully purchased");
            }
            else
            {
                throw new ApplicationException(String.Format(
                    "An error has occurred while invoking SetPurchaseVLan(). {0}", res.ResultMessage));
            }
        }
        catch(Exception ex)
        {
            throw new ApplicationException(
                String.Format("An error has occurred while setting server note {0}", ex.Message));
        }
    }
    Console.ReadLine();
}
See Also