Austin.Linode.LinodeClient.NodeBalancer_Config_Update C# (CSharp) Метод

NodeBalancer_Config_Update() публичный Метод

Updates a Config's properties
possible errors: NOTFOUND,VALIDATION
public NodeBalancer_Config_Update ( int ConfigID, string Algorithm = null, string check = null, string check_attempts = null, string check_body = null, int check_interval = null, bool check_passive = null, string check_path = null, string check_timeout = null, string cipher_suite = null, int Port = null, string Protocol = null, string ssl_cert = null, string ssl_key = null, string Stickiness = null ) : void
ConfigID int
Algorithm string Balancing algorithm. One of 'roundrobin', 'leastconn', 'source'
check string Perform active health checks on the backend nodes. One of 'connection', 'http', 'http_body'
check_attempts string Number of failed probes before taking a node out of rotation. 1-30
check_body string When check=http, a regex to match within the first 16,384 bytes of the response body
check_interval int Seconds between health check probes. 2-3600
check_passive bool Enable passive checks based on observing communication with back-end nodes.
check_path string When check=http, the path to request
check_timeout string Seconds to wait before considering the probe a failure. 1-30. Must be less than check_interval.
cipher_suite string SSL cipher suite to enforce. One of 'recommended', 'legacy'
Port int Port to bind to on the public interfaces. 1-65534
Protocol string Either 'tcp', 'http', or 'https'
ssl_cert string SSL certificate served by the NodeBalancer when the protocol is 'https'
ssl_key string Unpassphrased private key for the SSL certificate when protocol is 'https'
Stickiness string Session persistence. One of 'none', 'table', 'http_cookie'
Результат void
        public void NodeBalancer_Config_Update(
                int ConfigID,
                string Algorithm = null,
                string check = null,
                string check_attempts = null,
                string check_body = null,
                int? check_interval = null,
                bool? check_passive = null,
                string check_path = null,
                string check_timeout = null,
                string cipher_suite = null,
                int? Port = null,
                string Protocol = null,
                string ssl_cert = null,
                string ssl_key = null,
                string Stickiness = null)
        {
            var myParams = new Dictionary<string, string>();
            myParams.Add("ConfigID", ConfigID.ToString(CultureInfo.InvariantCulture));
            if (Algorithm != null)
                myParams.Add("Algorithm", Algorithm);
            if (check != null)
                myParams.Add("check", check);
            if (check_attempts != null)
                myParams.Add("check_attempts", check_attempts);
            if (check_body != null)
                myParams.Add("check_body", check_body);
            if (check_interval != null)
                myParams.Add("check_interval", check_interval.Value.ToString(CultureInfo.InvariantCulture));
            if (check_passive != null)
                myParams.Add("check_passive", check_passive.Value ? "true" : "false");
            if (check_path != null)
                myParams.Add("check_path", check_path);
            if (check_timeout != null)
                myParams.Add("check_timeout", check_timeout);
            if (cipher_suite != null)
                myParams.Add("cipher_suite", cipher_suite);
            if (Port != null)
                myParams.Add("Port", Port.Value.ToString(CultureInfo.InvariantCulture));
            if (Protocol != null)
                myParams.Add("Protocol", Protocol);
            if (ssl_cert != null)
                myParams.Add("ssl_cert", ssl_cert);
            if (ssl_key != null)
                myParams.Add("ssl_key", ssl_key);
            if (Stickiness != null)
                myParams.Add("Stickiness", Stickiness);
            GetResponse<object>("nodebalancer.config.update", myParams);
        }