Class: Aws::EC2::Waiters::ImageUsageReportAvailable

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ImageUsageReportAvailable

Returns a new instance of ImageUsageReportAvailable.

Parameters:

  • options (Hash)

Options Hash (options):

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


497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/waiters.rb', line 497

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 40,
    delay: 15,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_image_usage_reports,
      acceptors: [
        {
          "state" => "success",
          "matcher" => "pathAll",
          "argument" => "image_usage_reports[].state",
          "expected" => "available"
        },
        {
          "state" => "failure",
          "matcher" => "pathAny",
          "argument" => "image_usage_reports[].state",
          "expected" => "failed"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :image_ids (Array<String>)

    The IDs of the images for filtering the reports. If specified, only reports containing these images are returned.

  • :report_ids (Array<String>)

    The IDs of the image usage reports.

  • :next_token (String)

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

  • :filters (Array<Types::Filter>)

    The filters.

    • creation-time - The time when the report was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2025-11-29T11:04:43.305Z. You can use a wildcard (*), for example, 2025-11-29T*, which matches an entire day.

    • state - The state of the report (available | pending | error).

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • :max_results (Integer)

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

Returns:



524
525
526
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/waiters.rb', line 524

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