Class: Aws::BedrockAgentCoreControl::Waiters::PolicyDeleted

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-bedrockagentcorecontrol/lib/aws-sdk-bedrockagentcorecontrol/waiters.rb

Overview

Wait until a Policy is deleted

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ PolicyDeleted

Returns a new instance of PolicyDeleted.

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 60
  • :delay (Integer) — default: 2
  • :before_attempt (Proc)
  • :before_wait (Proc)


197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'gems/aws-sdk-bedrockagentcorecontrol/lib/aws-sdk-bedrockagentcorecontrol/waiters.rb', line 197

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 60,
    delay: 2,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_policy,
      acceptors: [
        {
          "matcher" => "error",
          "state" => "success",
          "expected" => "ResourceNotFoundException"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "DELETING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "DELETE_FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetPolicyResponse

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :policy_engine_id (required, String)

    The identifier of the policy engine that manages the policy to be retrieved.

  • :policy_id (required, String)

    The unique identifier of the policy to be retrieved. This must be a valid policy ID that exists within the specified policy engine.

Returns:



229
230
231
# File 'gems/aws-sdk-bedrockagentcorecontrol/lib/aws-sdk-bedrockagentcorecontrol/waiters.rb', line 229

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end