public void ElasticLoadBalancingDescribeInstanceHealth()
        {
            #region elb-describe-instance-health-1

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

            List <InstanceState> instanceStates = response.InstanceStates;

            #endregion
        }
Пример #2
0
 private Amazon.ElasticLoadBalancing.Model.DescribeInstanceHealthResponse CallAWSServiceOperation(IAmazonElasticLoadBalancing client, Amazon.ElasticLoadBalancing.Model.DescribeInstanceHealthRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Elastic Load Balancing", "DescribeInstanceHealth");
     try
     {
         #if DESKTOP
         return(client.DescribeInstanceHealth(request));
         #elif CORECLR
         return(client.DescribeInstanceHealthAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }