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

Linode_Disk_CreateFromStackScript() public method

possible errors: NOTFOUND,VALIDATION
public Linode_Disk_CreateFromStackScript ( int DistributionID, string Label, int LinodeID, string rootPass, int Size, int StackScriptID, string StackScriptUDFResponses, string rootSSHKey = null ) : Austin.Linode.DiskIdResponse
DistributionID int Which Distribution to apply this StackScript to. Must be one from the script's DistributionIDList
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
StackScriptID int The StackScript to create this image from
StackScriptUDFResponses string JSON encoded name/value pairs, answering this StackScript's User Defined Fields
rootSSHKey string Optionally sets this string into /root/.ssh/authorized_keys upon distribution configuration.
return Austin.Linode.DiskIdResponse
        public Austin.Linode.DiskIdResponse Linode_Disk_CreateFromStackScript(
                int DistributionID,
                string Label,
                int LinodeID,
                string rootPass,
                int Size,
                int StackScriptID,
                string StackScriptUDFResponses,
                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));
            myParams.Add("StackScriptID", StackScriptID.ToString(CultureInfo.InvariantCulture));
            myParams.Add("StackScriptUDFResponses", StackScriptUDFResponses);
            if (rootSSHKey != null)
                myParams.Add("rootSSHKey", rootSSHKey);
            return GetResponse<Austin.Linode.DiskIdResponse>("linode.disk.createfromstackscript", myParams);
        }