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

Linode_Disk_CreateFromDistribution() public method

possible errors: NOTFOUND,VALIDATION
public Linode_Disk_CreateFromDistribution ( int DistributionID, string Label, int LinodeID, string rootPass, int Size, string rootSSHKey = null ) : Austin.Linode.DiskIdResponse
DistributionID int The DistributionID to create this disk from. Found in avail.distributions()
Label string The label of this new disk image
LinodeID int
rootPass string The root user's password
Size int Size of this disk image in MB
rootSSHKey string Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.
return Austin.Linode.DiskIdResponse
        public Austin.Linode.DiskIdResponse Linode_Disk_CreateFromDistribution(
                int DistributionID,
                string Label,
                int LinodeID,
                string rootPass,
                int Size,
                string rootSSHKey = null)
        {
            var myParams = new Dictionary<string, string>();
            myParams.Add("DistributionID", DistributionID.ToString(CultureInfo.InvariantCulture));
            myParams.Add("Label", Label);
            myParams.Add("LinodeID", LinodeID.ToString(CultureInfo.InvariantCulture));
            myParams.Add("rootPass", rootPass);
            myParams.Add("Size", Size.ToString(CultureInfo.InvariantCulture));
            if (rootSSHKey != null)
                myParams.Add("rootSSHKey", rootSSHKey);
            return GetResponse<Austin.Linode.DiskIdResponse>("linode.disk.createfromdistribution", myParams);
        }