Austin.Linode.LinodeClient.Linode_Ip_Swap C# (CSharp) Method

Linode_Ip_Swap() public method

Exchanges Public IP addresses between two Linodes within a Datacenter. The destination of the IP Address can be designated by either the toLinodeID or withIPAddressID parameter. Returns the resulting relationship of the Linode and IP Address parameters. When performing a one directional swap, the source is represented by the first of the two resultant array members.
possible errors: NOTFOUND,VALIDATION
public Linode_Ip_Swap ( int IPAddressID, int toLinodeID = null, int withIPAddressID = null ) : void
IPAddressID int The IPAddressID of an IP Address to transfer or swap
toLinodeID int The LinodeID of the Linode where IPAddressID will be transfered
withIPAddressID int The IP Address ID to swap
return void
        public void Linode_Ip_Swap(
                int IPAddressID,
                int? toLinodeID = null,
                int? withIPAddressID = null)
        {
            var myParams = new Dictionary<string, string>();
            myParams.Add("IPAddressID", IPAddressID.ToString(CultureInfo.InvariantCulture));
            if (toLinodeID != null)
                myParams.Add("toLinodeID", toLinodeID.Value.ToString(CultureInfo.InvariantCulture));
            if (withIPAddressID != null)
                myParams.Add("withIPAddressID", withIPAddressID.Value.ToString(CultureInfo.InvariantCulture));
            GetResponse<object>("linode.ip.swap", myParams);
        }