Class: Aws::S3::Waiters::ObjectNotExists

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ObjectNotExists

Returns a new instance of ObjectNotExists.

Parameters:

  • options (Hash)

Options Hash (options):

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


150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/aws-sdk-s3/waiters.rb', line 150

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



173
174
175
# File 'lib/aws-sdk-s3/waiters.rb', line 173

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :bucket (required, String)
  • :if_match (String)

    Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).

  • :if_modified_since (Time, DateTime, Date, Integer, String)

    Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).

  • :if_none_match (String)

    Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).

  • :if_unmodified_since (Time, DateTime, Date, Integer, String)

    Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).

  • :key (required, String)
  • :range (String)

    Downloads the specified range bytes of an object. For more information about the HTTP Range header, go to www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.

  • :version_id (String)

    VersionId used to reference a specific version of the object.

  • :sse_customer_algorithm (String)

    Specifies the algorithm to use to when encrypting the object (e.g., AES256).

  • :sse_customer_key (String)

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key. The key must be appropriate for use with the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm header.

  • :sse_customer_key_md5 (String)

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure the encryption key was transmitted without error.

  • :request_payer (String)

    Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html

  • :part_number (Integer)

    Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a ‘ranged’ HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.

Returns:



168
169
170
# File 'lib/aws-sdk-s3/waiters.rb', line 168

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