Class: Aws::Inspector2::Waiters::ConnectorConnected
- Inherits:
-
Object
- Object
- Aws::Inspector2::Waiters::ConnectorConnected
- Defined in:
- gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/waiters.rb
Overview
Wait until a connector reaches the CONNECTED health status, typically after CreateConnector or UpdateConnector + ConnectorEnabled. Caller MUST filter ListConnectors by the specific connector ARN so the matchers apply only to the target connector. Success when all returned items have health.connectorStatus == CONNECTED. Failure when any item is in health.connectorStatus == FAILED_TO_CONNECT or enablementStatus == FAILED_TO_ENABLE.
Instance Method Summary collapse
-
#initialize(options) ⇒ ConnectorConnected
constructor
A new instance of ConnectorConnected.
-
#wait(params = {}) ⇒ Types::ListConnectorsResponse
Returns a response object which responds to the following methods:.
Constructor Details
#initialize(options) ⇒ ConnectorConnected
Returns a new instance of ConnectorConnected.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/waiters.rb', line 87 def initialize() @client = .fetch(:client) @waiter = Aws::Waiters::Waiter.new({ max_attempts: 5, delay: 30, poller: Aws::Waiters::Poller.new( operation_name: :list_connectors, acceptors: [ { "matcher" => "pathAll", "argument" => "items[].health.connector_status", "state" => "success", "expected" => "CONNECTED" }, { "matcher" => "pathAny", "argument" => "items[].health.connector_status", "state" => "failure", "expected" => "FAILED_TO_CONNECT" }, { "matcher" => "pathAny", "argument" => "items[].enablement_status", "state" => "failure", "expected" => "FAILED_TO_ENABLE" } ] ) }.merge()) end |
Instance Method Details
#wait(params = {}) ⇒ Types::ListConnectorsResponse
Returns a response object which responds to the following methods:
- #items => Array<Types::Connector>
- #next_token => String
120 121 122 |
# File 'gems/aws-sdk-inspector2/lib/aws-sdk-inspector2/waiters.rb', line 120 def wait(params = {}) @waiter.wait(client: @client, params: params) end |