Esempio n. 1
0
        public void ElasticLoadBalancingDescribeInstanceHealth()
        {
            #region elb-describe-instance-health-1

            var client   = new AmazonElasticLoadBalancingClient();
            var response = client.DescribeInstanceHealth(new DescribeInstanceHealthRequest
            {
                LoadBalancerName = "my-load-balancer"
            });

            List <InstanceState> instanceStates = response.InstanceStates;

            #endregion
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonElasticLoadBalancingConfig config = new AmazonElasticLoadBalancingConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonElasticLoadBalancingClient client = new AmazonElasticLoadBalancingClient(creds, config);

            DescribeInstanceHealthResponse resp = new DescribeInstanceHealthResponse();
            DescribeInstanceHealthRequest  req  = new DescribeInstanceHealthRequest
            {
            };

            resp = client.DescribeInstanceHealth(req);
            CheckError(resp.HttpStatusCode, "200");

            foreach (var obj in resp.InstanceStates)
            {
                AddObject(obj);
            }
        }