ConoHaNet.OpenStackMember.UpdateHealthMonitor C# (CSharp) Method

UpdateHealthMonitor() public method

public UpdateHealthMonitor ( string monitorId, int delay, int maxRetries, string urlPath ) : HealthMonitor
monitorId string
delay int
maxRetries int
urlPath string
return HealthMonitor
        public HealthMonitor UpdateHealthMonitor(string monitorId, int delay, int maxRetries, string urlPath)
        {
            return NetworksProvider.UpdateHealthMonitor(monitorId, delay, maxRetries, urlPath, this.DefaultRegion, this.Identity);
        }

Usage Example

        public void UpdateHealthMonitorTest()
        {
            var os = new OpenStackMember(UserName, Password, TenantName, TenantId);

            string monitorType = "TCP"; // PING or TCP or HTTP
            int delay = 5; // 5-10
            int maxRetries = 1; // 1-5
            string urlPath = null;
            string expectedCodes = null;

            // create
            var monitor = os.CreateHealthMonitor(monitorType, delay, maxRetries, urlPath, expectedCodes);

            try
            {
                // update
                int newDelay = 6;
                int newMaxRetries = 3;
                string newUrlPath = "http://www.google.com";
                monitor = os.UpdateHealthMonitor(monitor.Id, newDelay, newMaxRetries, newUrlPath);

                Assert.IsNotNull(monitor);
            }
            finally
            {
                Assert.IsTrue(os.DeleteHealthMonitor(monitor.Id));
            }
        }
OpenStackMember