Class: Aws::EC2::Waiters::KeyPairExists
- Inherits:
-
Object
- Object
- Aws::EC2::Waiters::KeyPairExists
- Defined in:
- lib/aws-sdk-ec2/waiters.rb
Instance Attribute Summary collapse
- #waiter ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(options) ⇒ KeyPairExists
constructor
A new instance of KeyPairExists.
-
#wait(params = {}) ⇒ Types::DescribeKeyPairsResult
Returns a response object which responds to the following methods:.
Constructor Details
#initialize(options) ⇒ KeyPairExists
Returns a new instance of KeyPairExists.
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 |
# File 'lib/aws-sdk-ec2/waiters.rb', line 784 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 6, delay: 5, poller: Aws::Waiters::Poller.new( operation_name: :describe_key_pairs, acceptors: [ { "expected" => true, "matcher" => "path", "state" => "success", "argument" => "length(key_pairs[].key_name) > `0`" }, { "expected" => "InvalidKeyPair.NotFound", "matcher" => "error", "state" => "retry" } ] ) }.merge()) end |
Instance Attribute Details
#waiter ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
815 816 817 |
# File 'lib/aws-sdk-ec2/waiters.rb', line 815 def waiter @waiter end |
Instance Method Details
#wait(params = {}) ⇒ Types::DescribeKeyPairsResult
Returns a response object which responds to the following methods:
-
#key_pairs => Array<Types::KeyPairInfo>
810 811 812 |
# File 'lib/aws-sdk-ec2/waiters.rb', line 810 def wait(params = {}) @waiter.wait(client: @client, params: params) end |