Class: Aws::ECR::Waiters::LifecyclePolicyPreviewComplete

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

Overview

Wait until a lifecycle policy preview request is complete and results can be accessed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ LifecyclePolicyPreviewComplete

Returns a new instance of LifecyclePolicyPreviewComplete.

Parameters:

  • options (Hash)

Options Hash (options):

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


131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/aws-sdk-ecr/waiters.rb', line 131

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 20,
    delay: 5,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_lifecycle_policy_preview,
      acceptors: [
        {
          "state" => "success",
          "matcher" => "path",
          "argument" => "status",
          "expected" => "COMPLETE"
        },
        {
          "state" => "failure",
          "matcher" => "path",
          "argument" => "status",
          "expected" => "FAILED"
        }
      ]
    )
  }.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.



163
164
165
# File 'lib/aws-sdk-ecr/waiters.rb', line 163

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :registry_id (String)

    The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.

  • :repository_name (required, String)

    The name of the repository.

  • :image_ids (Array<Types::ImageIdentifier>)

    The list of imageIDs to be included.

  • :next_token (String)

    The ‘nextToken` value returned from a previous paginated
 `GetLifecyclePolicyPreviewRequest` request where `maxResults` was used and the
 results exceeded the value of that parameter. Pagination continues from the end of the
 previous results that returned the `nextToken` value. This value is
 `null` when there are no more results to return. This option cannot be used when you specify images with `imageIds`.

  • :max_results (Integer)

    The maximum number of repository results returned by ‘GetLifecyclePolicyPreviewRequest` in
 paginated output. When this parameter is used, `GetLifecyclePolicyPreviewRequest` only returns
 `maxResults` results in a single page along with a `nextToken`
 response element. The remaining results of the initial request can be seen by sending
 another `GetLifecyclePolicyPreviewRequest` request with the returned `nextToken`
 value. This value can be between 1 and

    1. If this
 parameter is not used, then

    ‘GetLifecyclePolicyPreviewRequest` returns up to
 100 results and a `nextToken` value, if
 applicable. This option cannot be used when you specify images with `imageIds`.

  • :filter (Types::LifecyclePolicyPreviewFilter)

    An optional parameter that filters results based on image tag status and all tags, if tagged.

Returns:



158
159
160
# File 'lib/aws-sdk-ecr/waiters.rb', line 158

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