I am trying to get the status of my Load Balancers programmatically and that proves quite problematically as I have to enter an incredibly long string for the ARN (Or I guess with the Name, which is shorter, I get the same result, but that's beside the point). If I keep setting up new ELBs and deleting the old ones (just assume I would do such a weird thing) I'm having a hard time keeping track of all of my ELBs that are currently set up.
Ideally, I would want to use a command that outputs a list of all of my ELB's Names or ARNs and with that, I can call the API as in the sample below.
AmazonElasticLoadBalancingV2Client balancingClient = newAmazonElasticLoadBalancingV2Client(region: regEndpoint);
var response = balancingClient.DescribeLoadBalancers(new DescribeLoadBalancersRequest
{
LoadBalancerArns =
{
//Incredibly long string
//Might be amazing to replace this
//with a fancy little Method that just
//returns a string or an array of strings
}
});
var loads = response.LoadBalancers;
Do you by any chance know a way to get that?
If you just call
DescribeLoadBalancers()
without passing it a list of load balancers to describe, it will return a list of all your load balancers.