Class: Aws::BedrockAgentCoreControl::Waiters::PolicyGenerationCompleted

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

Overview

Wait until policy generation is completed

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ PolicyGenerationCompleted

Returns a new instance of PolicyGenerationCompleted.

Parameters:

  • options (Hash)

Options Hash (options):

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


354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'gems/aws-sdk-bedrockagentcorecontrol/lib/aws-sdk-bedrockagentcorecontrol/waiters.rb', line 354

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_generation,
      acceptors: [
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "success",
          "expected" => "GENERATED"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "retry",
          "expected" => "GENERATING"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "GENERATE_FAILED"
        },
        {
          "matcher" => "path",
          "argument" => "status",
          "state" => "failure",
          "expected" => "DELETE_FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :policy_generation_id (required, String)

    The unique identifier of the policy generation request to be retrieved. This must be a valid generation ID from a previous StartPolicyGeneration call.

  • :policy_engine_id (required, String)

    The identifier of the policy engine associated with the policy generation request. This provides the context for the generation operation and schema validation.

Returns:



393
394
395
# File 'gems/aws-sdk-bedrockagentcorecontrol/lib/aws-sdk-bedrockagentcorecontrol/waiters.rb', line 393

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