Class: Aws::EC2::Waiters::BundleTaskComplete

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) ⇒ BundleTaskComplete

Returns a new instance of BundleTaskComplete.

Parameters:

  • options (Hash)

Options Hash (options):

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


119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/aws-sdk-ec2/waiters.rb', line 119

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_bundle_tasks,
      acceptors: [
        {
          "expected" => "complete",
          "matcher" => "pathAll",
          "state" => "success",
          "argument" => "bundle_tasks[].state"
        },
        {
          "expected" => "failed",
          "matcher" => "pathAny",
          "state" => "failure",
          "argument" => "bundle_tasks[].state"
        }
      ]
    )
  }.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.



151
152
153
# File 'lib/aws-sdk-ec2/waiters.rb', line 151

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :bundle_ids (Array<String>)

    The bundle task IDs.

    Default: Describes all your bundle tasks.

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

    The filters.

    • ‘bundle-id` - The ID of the bundle task.

    • ‘error-code` - If the task failed, the error code returned.

    • ‘error-message` - If the task failed, the error message returned.

    • ‘instance-id` - The ID of the instance.

    • ‘progress` - The level of task completion, as a percentage (for example, 20%).

    • ‘s3-bucket` - The Amazon S3 bucket to store the AMI.

    • ‘s3-prefix` - The beginning of the AMI name.

    • ‘start-time` - The time the task started (for example, 2013-09-15T17:15:20.000Z).

    • ‘state` - The state of the task (`pending` | `waiting-for-shutdown` | `bundling` | `storing` | `cancelling` | `complete` | `failed`).

    • ‘update-time` - The time of the most recent update for the task.

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

Returns:



146
147
148
# File 'lib/aws-sdk-ec2/waiters.rb', line 146

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