I am trying to filter out EC2 instances using the AWS SDK in .NET, and although I have seen a lot of threads on SO and on other sites of people solving this problem, I have not tried anything at my end.
So, as a last resource, I come to you guys for help. Can anyone shed some light on what I am missing? I know that it is very likely that I am doing something stupid, but I can not afford to spend too much time solving this problem.
This is a piece of code that I use to filter out an EC2 instance (get its metadata) using this tag name:
DescribeInstanceStatusRequest req = new DescribeInstanceStatusRequest (); req.Filters.Add (new Filter() { Name = "tag:Name", Values = new List <string> () { "some_random_name" } });
But I continue to work on this exception:
Invalid filter tag: name '
I replaced the filter name ("tag: Name" in the example) with several filters listed in the documentation (for example, "tag-key", "tag-value", "tag: key = value"), but nothing works.
Thanks to everyone in advance :)
source share