Class: Aws::EC2::Waiters::ImageExists
- Inherits:
-
Object
- Object
- Aws::EC2::Waiters::ImageExists
- Defined in:
- gems/aws-sdk-ec2/lib/aws-sdk-ec2/waiters.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ ImageExists
constructor
A new instance of ImageExists.
-
#wait(params = {}) ⇒ Types::DescribeImagesResult
Returns a response object which responds to the following methods:.
Constructor Details
#initialize(options) ⇒ ImageExists
Returns a new instance of ImageExists.
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/waiters.rb', line 450 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 40, delay: 15, poller: Aws::Waiters::Poller.new( operation_name: :describe_images, acceptors: [ { "matcher" => "path", "expected" => true, "argument" => "length(images[]) > `0`", "state" => "success" }, { "matcher" => "error", "expected" => "InvalidAMIID.NotFound", "state" => "retry" } ] ) }.merge()) end |
Instance Method Details
#wait(params = {}) ⇒ Types::DescribeImagesResult
Returns a response object which responds to the following methods:
- #images => Array<Types::Image>
- #next_token => String
476 477 478 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/waiters.rb', line 476 def wait(params = {}) @waiter.wait(client: @client, params: params) end |