0

Is it possible to fetch EC2 in batches using the Fog gem? The Amazon API has support for NextToken, and MaxResults to enable this, but I can't seem to find this in Fog anywhere:

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceStatus.html#API_DescribeInstanceStatus_RequestParameters

r-hall
  • 11
  • 2

1 Answers1

0

I think you can get this by passing NextToken/MaxResults in to the describe_instance_status request for AWS connections, more details should be available here: https://github.com/fog/fog/blob/master/lib/fog/aws/requests/compute/describe_instance_status.rb#L9

geemus
  • 2,522
  • 16
  • 22
  • Ahh sorry, I posted the API docs for DescribeInstanceStatus, while I really meant to post DescribeInstances (I was looking at DescribeInstanceStatus because I knew that fog already had support for it :)) AFAICT there is no reference to these params here: https://github.com/fog/fog/blob/master/lib/fog/aws/requests/compute/describe_instances.rb. This might be better suited for Github issues, I was just unsure if I had missed something. – r-hall Dec 17 '14 at 16:03
  • Ah, ok. I kind of wondered (since it seemed like you were describing one thing but linking to another, I just went with it). I think you are correct that describe_instances doesn't yet support this. It certainly could though, just have to find somebody willing to do the legwork. Thanks! – geemus Dec 17 '14 at 16:20
  • In case anyone finds this later and/or is following along, the related pull request is here: https://github.com/fog/fog/pull/3354 – geemus Dec 18 '14 at 15:48