Class: Aws::ECR::Waiters::ImageScanComplete

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

Overview

Wait until an image scan is complete and findings can be accessed

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ImageScanComplete

Returns a new instance of ImageScanComplete.

Parameters:

  • options (Hash)

Options Hash (options):

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


86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'gems/aws-sdk-ecr/lib/aws-sdk-ecr/waiters.rb', line 86

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 60,
    delay: 5,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_image_scan_findings,
      acceptors: [
        {
          "state" => "success",
          "matcher" => "path",
          "argument" => "image_scan_status.status",
          "expected" => "COMPLETE"
        },
        {
          "state" => "failure",
          "matcher" => "path",
          "argument" => "image_scan_status.status",
          "expected" => "FAILED"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Parameters:

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

    a customizable set of options

Options Hash (params):

  • :registry_id (String)

    The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.

  • :repository_name (required, String)

    The repository for the image for which to describe the scan findings.

  • :image_id (required, Types::ImageIdentifier)

    An object with identifying information for an image in an Amazon ECR repository.

  • :next_token (String)

    The nextToken value returned from a previous paginated DescribeImageScanFindings 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.

  • :max_results (Integer)

    The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings 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 DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.

Returns:



113
114
115
# File 'gems/aws-sdk-ecr/lib/aws-sdk-ecr/waiters.rb', line 113

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