Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waiters API does not expose the response that satisfied the waiting condition #815

Closed
pditommaso opened this issue Aug 17, 2016 · 1 comment
Assignees
Labels
feature-request A feature should be added or improved.

Comments

@pditommaso
Copy link

A common pattern for the waiters API consists to wait for an EC2 instance status and then access the attributes in the returned describe response.

Take in consideration the following example waiting for the EC2 instance ids of a spot request (groovy code):

 // -- wait for the fulfilment of the spot request
 def waiter = ec2client.waiters().spotInstanceRequestFulfilled()
 def describeInstances = new DescribeSpotInstanceRequestsRequest().withSpotInstanceRequestIds(spotIds)
 waiter.run( new WaiterParameters<>().withRequest(describeInstances)  )

The waiters API does not provide a way to access the DescribeSpotInstanceRequestsRequest response that satisfied the waiting condition, thus it's necessary to submit an extra request to fetch the IDs of the instance launched:

//-- submit a describe request to access the instance IDs
def result = ec2client.describeSpotInstanceRequests(describeInstances)
return result.spotInstanceRequests *. instanceId
@shorea shorea added the feature-request A feature should be added or improved. label Aug 20, 2016
@debora-ito
Copy link
Member

Hi @pditommaso, the SDK team has reviewed the feature request list for V1, and since they're concentrating efforts on V2 new features they decided to not implement this one in V1. It still being considered for the Waiters refactor in V2, see the referenced issue above. I'll go ahead and close this one.

Please feel free to comment on the V2 issue with your use case, and reach out if you have further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants