-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add EC2::Snapshot#wait_until_completed waiter #735
Comments
Thanks for the suggestion. This should be part of the next release. |
Is this supposed to work?
|
The Snapshot#wait_until_completed method is defined only for the Resource snapshot - it looks like you have the snapshot response from a Client call - its confusing and a weakness of the current way we do Resources (the object oriented model for interacting with services). To use the Resource snapshot you can do something like: resource = Aws::EC2::Resource.new(region: 'us-west-2')
snapshot = resource.create_snapshot(create_snapshot_opts) # this snapshot will now be an Aws::EC2::Snapshot object and NOT a Aws::EC2::Types::Snapshot
snapshot.wait_until_completed
# Alternative
snapshot = Aws::EC2::Snapshot.new(id: snapshot_id)
snapshot.wait_until_completed |
Alright, thanks for explaining! After reading up on it this is mentioned in the readme/docs, though I must admit it wasn't super-obvious. Perhaps you can use some Anyway, thanks for helping out @alextwoods! ⭐ |
Yeah - using |
It's currently possible to use
Aws::EC2::Client.new.wait_until(:snapshot_completed, snapshot_ids: [snapshot.id])
, I think it would be convenient to also be able to callsnapshot.wait_until_completed
.The text was updated successfully, but these errors were encountered: