Class: Aws::EC2::Waiters::SnapshotImported

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ SnapshotImported

Returns a new instance of SnapshotImported.

Parameters:

  • options (Hash)

Options Hash (options):

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


1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
# File 'lib/aws-sdk-ec2/waiters.rb', line 1097

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_import_snapshot_tasks,
      acceptors: [
        {
          "expected" => "completed",
          "matcher" => "pathAll",
          "state" => "success",
          "argument" => "import_snapshot_tasks[].snapshot_task_detail.status"
        },
        {
          "expected" => "error",
          "matcher" => "pathAny",
          "state" => "failure",
          "argument" => "import_snapshot_tasks[].snapshot_task_detail.status"
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (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.



1129
1130
1131
# File 'lib/aws-sdk-ec2/waiters.rb', line 1129

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :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`.

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

    The filters.

  • :import_task_ids (Array<String>)

    A list of import snapshot task IDs.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned ‘NextToken` value.

  • :next_token (String)

    A token that indicates the next page of results.

Returns:



1124
1125
1126
# File 'lib/aws-sdk-ec2/waiters.rb', line 1124

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