IWsEndUserSetPurchaseIpAddress Method
|
Reserve an IP address to the specified account at the time of authentication. By the method SetPurchaseIpAddress() of Aruba WsEndUser,
You can reserve all'acocunt specifies the first free public IP address. The recording operation of the IP address,
depends on the presence of a claim equal to or above the cost of acquisition of the IP address. If the recording operation and
free IP address assignment is successful, the object returned by the method SetPurchaseIpAddress() will
all information related to the resource: address, subnet mask, gateway address, 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<IPAddress> SetPurchaseIpAddress(
Nullable<int> clusterGroupTypeId,
Nullable<int> publicVLanId
)
<OperationContractAttribute>
Function SetPurchaseIpAddress (
clusterGroupTypeId As Nullable(Of Integer),
publicVLanId As Nullable(Of Integer)
) As WsResult(Of IPAddress)
[OperationContractAttribute]
WsResult<IPAddress^>^ SetPurchaseIpAddress(
Nullable<int> clusterGroupTypeId,
Nullable<int> publicVLanId
)
[<OperationContractAttribute>]
abstract SetPurchaseIpAddress :
clusterGroupTypeId : Nullable<int> *
publicVLanId : Nullable<int> -> WsResult<IPAddress>
function SetPurchaseIpAddress(
clusterGroupTypeId : Nullable<int>,
publicVLanId : Nullable<int>
) : WsResult<IPAddress>
Parameters
- clusterGroupTypeId
- Type: SystemNullableInt32
Value of type nullable int that represents the id of the ClusterGroupType where you want to buy IP
- publicVLanId
- Type: SystemNullableInt32
Value of type nullable int that represents the id of the PublicVLAN where you want to buy IP
Return Value
Type:
WsResultIPAddress
The method returns an object WsResult<WsResultOfIPAddress[]> containing the IP address information confidential.
Examples private static void Test_wsEndUser_SetPurchaseIpAddress()
{
using (var client = new WsEndUser.WsEndUserClient())
{
client.ClientCredentials.UserName.UserName = ARU_0000;
client.ClientCredentials.UserName.Password = ARU_PSW;
try
{
var res = client.SetPurchaseIpAddress(5);
if (res.Success)
{
Console.WriteLine("IP {0} successfully purchased", res.Value.Value);
}
else
{
throw new ApplicationException(String.Format("An error has occurred while invoking SetPurchaseIpAddress(). {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