You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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):
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:The text was updated successfully, but these errors were encountered: